text:
# Working with files and directories
Here we are going to look at some more ways to learn about and manipulate file and directories at the command line. If you'd like to follow along, but need to pull up the proper working environment again, revisit [here](shell-getting-started-01.html#how-to-access-the-shell-for-now) and then come back 🙂

---

To be sure we are starting in the same place, let's run:

```bash
cd ~/shell_intro
```

---

## Working with files
We will often want to get a look at a file to see how it's structured. We've already used a very common tool for peeking at files, the **`head`** command. There is also **`tail`**, which prints the last 10 lines of a file:

```bash
head example.txt
tail example.txt
```

This is especially helpful if a file is particularly large, as **`head`** will just print the first ten lines and stop. **This means it will be just as instantaneous whether the file is 10KB or 10GB.**

Another standard useful program for viewing the contents of a file is **`less`**. This opens a searchable, read-only program that allows you to scroll through the document:

```bash
less example.txt
```

To exit the **`less`** program, press the "**q**" key.

The **`wc`** (**w**ord **c**ount) command is useful for counting how many lines, words, and characters there are in a file:

```bash
wc example.txt
```

PRACTICE!

How can we get only the number of lines in a file from the `wc` command?

    Solution

wc -l example.txt

We could find this out by looking at `man wc`, running `wc --help`, or by visiting our good friend Google 🙂

Printing out how many lines are in a file like this is super-useful for things like quickly seeing how many rows are in a large table, or how many sequences are in a file.

The most common command-line tools like these and many others we'll see are mostly only useful for operating on what are known as **plain-text files** – also referred to as "flat files".

### BONUS ROUND: What's a plain-text file?
A general definition of a plain-text file is a text file that doesn't contain any special formatting characters or information, and that can be properly viewed and edited with any standard text editor.

Common types of plain-text files are those ending with extensions like ".txt", ".tsv" (**t**ab-**s**eparated **v**alues), or ".csv" (**c**omma **s**eparated **v**alues). Some examples of common file types that are *not* plain-text files would be ".docx", ".pdf", or ".xlsx". This is because those file formats contain special types of compression and formatting information that are only interpretable by programs specifically designed to work with them.

> **A note on file extensions**

> File extensions themselves do not actually do anything to the file format. They are *mostly* there just for our convenience/organization – "mostly" because some programs require a specific extension to be present for them to even try interacting with a file. But this has nothing to do with the file contents, just that the program won't let you interact with it unless it has a specific extension.

### Copying, moving, and renaming files

WARNING!
Using commands that do things like create, copy, and move files at the command line will overwrite files if they are in the same directory and have the same name. And using commands that delete things will do so permanently. Use caution while getting used to things – and then forever after 🙂

The commands **`cp`** and **`mv`** (**c**o**p**y and **m**o**v**e) have the same basic structure. They both require two positional arguments – the first is the file you want to act on, and the second is where you want it to go (which can include the name you want to give it).

To see how this works, let's make a copy of "example.txt":

```bash
ls
cp example.txt example_copy.txt
ls
```

By just giving the second argument a name and nothing else (meaning no path in front of the name), we are implicitly saying we want it copied to where we currently are.

To make a copy and put it somewhere else, like in our subdirectory "data", we could change the second positional argument using a **relative path** ("relative" because it starts from where we currently are):

```bash
ls data/
cp example.txt data/example_copy.txt
ls data/
```

To copy it to that subdirectory but keep the same name, we could type the whole name out, but we can also just provide the directory but leave off the file name:

```bash
cp example.txt data/
ls data/
```

If we wanted to copy something *from somewhere else to our current working directory* and keep the same name, we can use another special character, a period (**`.`**), which specifies the current working directory:

```bash
ls
cp experiment/notes.txt .
ls
```

The **`mv`** command is used to move files. Let's move the "example_copy.txt" file into the "experiment" subdirectory:

```bash
ls
ls experiment/
mv example_copy.txt experiment/
ls
ls experiment/
```

The **`mv`** command is also used to *rename* files. This may seem strange at first, but remember that the path (address) of a file actually includes its name too (otherwise everything in the same directory would have the same path).

```bash
ls
mv notes.txt notes_old.txt
ls
```

To delete files there is the **`rm`** command (**r**e**m**ove). This requires at least one argument specifying the file we want to delete. But again, caution is warranted. There will be no confirmation or retrieval from a waste bin afterwards.

```bash
ls
rm notes_old.txt
ls
```

### A terminal text editor
It is often very useful to be able to generate new plain-text files quickly at the command line, or make some changes to an existing one. One way to do this is using a text editor that operates at the command line. Here we're going to look at one program that does this called **`nano`**.

When we run the command **`nano`** it will open a text editor in our terminal window. If we give it a file name as a positional argument, it will open that file if it exists, or it will create it if it doesn't. Here we'll make a new file:

```bash
nano sample_names.txt
```

When we press return, our environment changes to this:

Now we can type as usual. Type in a couple of sample names, one on each line – it doesn't matter what the names are.

Afterwards, to save the file and exit, we need to use some of the keyboard shortcuts listed on the bottom. "WriteOut" will save our file, and the **`^O`** represents pressing ctrl + o together (it doesn't need to be a capital "O"). This will ask us to either enter or confirm the file name, we can just press return. Now that it is saved, to exit we need to press ctrl + x.

And now our new file is in our current working directory:

```bash
ls
head sample_names.txt
```

>**NOTE:** Quickly googling how to get out of things like **`nano`** the first 15 times we use them is 100% normal!

## Working with directories
Commands for working with directories for the most part operate similarly. We can make a new directory with the command **`mkdir`** (for **m**a**k**e **dir**ectory):

```bash
ls
mkdir subset
ls
```

And similarly, directories can be deleted with **`rmdir`** (for **r**e**m**ove **dir**ectory):

```bash
rmdir subset/
ls
```

The command line is a little more forgiving when trying to delete a directory. If the directory is not empty, **`rmdir`** will give you an error.

```bash
rmdir experiment/
```

## Summary
So far we've only seen individual commands and printing information to the screen. This is useful for in-the-moment things, but not so much for getting things done. Next we're going to start looking at some of the things that make the command line so versatile and powerful, starting with [redirectors and wildcards!](shell-wild-redirectors-03.html)

Commands introduced:

|| | ||
||:----------:|:------------------:||
||**Command**     |**Function**          ||
||**`tail`**| prints the last few lines of a file ||
||**`less`**| allows us to browse a file (exit with q key) ||
||**`wc`** |count lines, words, and characters in a file ||
||**`cp`** | copy a file or directory ||
||**`mv`**| move or rename a file or directory ||
||**`rm`**| delete a file or directory ||
||**`mkdir`**| create a directory ||
||**`rmdir`**| delete a directory ||
||**`nano`**| create and edit plain text files at the command line ||
|| | ||

Special characters introduced:

|| | ||
||:----------:|:------------------:||
||**Characters**     |  **Meaning**  ||
|| **`.`** | specifies the current working directory ||
|| | ||

---

Previous: Getting started
Next: Redirectors and wildcards

	ANGUS Home

repository: ngs-docs/angus

repo_name: ngs-docs/angus


text:
---
title: "Connect to Azure IoT Hub"
permalink: /docs/projects/connect-iot-hub
excerpt: "Connect DevKit to an Azure IoT hub that you create, collect the temperature and humidity data from sensors and send the data to IoT hub."
header:
  overlay_image: /assets/images/projects-iothub.jpg
  overlay_full: true
  teaser: /assets/images/projects-iothub-th.jpg
variable:
  - platform: windows
    name: Windows
  - platform: macos
    name: macOS
last_modified_at: 2017-06-28
---

{% include toc icon="columns" %}

## What you do

Connect DevKit to an Azure IoT hub that you create, collect the temperature and humidity data from sensors and send the data to IoT hub.

## What you learn

* How to create an IoT Hub and register a device for MXChip IoT DevKit.
* How to collect sensor data by running a sample application on MXChip IoT DevKit.
* How to send the sensor data to your IoT hub.

## What you need

Finish the [Getting Started Guide]({{"/docs/get-started/" | absolute_url }}) to:

* Have your DevKit connected to WiFi
* Prepare the development environment

## Step 1. Create an IoT Hub and register a device for MXChip IoT DevKit

### A. Create an IoT Hub

1. In the [Azure portal](https://portal.azure.com/){:target="_blank"}, click **New** > **Internet of Things** > **IoT Hub**.

   ![Create an IoT Hub in the Azure portal]({{"/assets/images/happy-path-create-azure-iot-hub-portal.png" | absolute_url }})
2. In the **IoT hub** pane, enter the following information for your IoT hub:

   **Name**: It is the name for your IoT hub. If the name you enter is valid, a green check mark appears.

   **Pricing and scale tier**: Select the free F1 tier. This option is sufficient for this demo. See [pricing and scale tier](https://azure.microsoft.com/pricing/details/iot-hub/){:target="_blank"}.

   **Resource group**: Create a resource group to host the IoT hub or use an existing one. See [Using resource groups to manage your Azure resources](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-portal){:target="_blank"}.

   **Location**: Select the closest location to you where the IoT hub is created.

   **Pin the dashboard**: Check this option for easy access to your IoT hub from the dashboard.

   ![Fill in the fields for creating your Azure IoT hub]({{"/assets/images/happy-path-fill-in-fields-for-azure-iot-hub-portal.png" | absolute_url }})

3. Click **Create**. It could take a few minutes for your IoT hub to be created. You can see the progress in the **Notifications** pane.

   ![See notifications of your IoT hub creation progress]({{"/assets/images/happy-path-notification-azure-iot-hub-creation-progress-portal.png" | absolute_url }})

4. Once your IoT hub is created, click it from the dashboard. Make a note of the **Hostname**, and then click **Shared access policies**.

   ![Get the hostname of your IoT hub]({{"/assets/images/happy-path-get-azure-iot-hub-hostname-portal.png" | absolute_url }})

5. In the **Shared access policies** pane, click the **iothubowner** policy, and then make a note of the **Connection string** of your IoT hub. For more information, see [Control access to IoT Hub](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-security){:target="_blank"}.

   ![Get your IoT hub connection string]({{"/assets/images/happy-path-get-azure-iot-hub-connection-string-portal.png" | absolute_url }})

### B. Register a device in the IoT Hub

1. In the [Azure portal](https://portal.azure.com/){:target="_blank"}, open your IoT hub.

2. Click **Device Explorer**.

3. In the Device Explorer pane, click **Add**, and then enter the following information to create a device in your IoT hub:

   **Device ID**: The ID of the new device.

   **Authentication Type**: Select **Symmetric Key**.

   **Auto Generate Keys**: Check this field.

   **Connect device to IoT Hub**: Click **Enable**.

   ![Add a device in the device explorer of your IoT hub]({{"/assets/images/happy-path-add-device-in-azure-iot-hub-device-explorer-portal.png" | absolute_url }})

4. Click **Save**.

5. After the device is created, open the device in the **Device Explorer** pane.

6. Make a note of the primary key of the **device connection string**.

   ![Get the device connection string]({{"/assets/images/happy-path-get-device-connection-string-in-device-explorer-portal.png" | absolute_url }})

## Step 2. Connect MXChip IoT DevKit with your computer

Use the Micro USB to Type A USB cable to connect MXChip IoT DevKit to your computer.

## Step 3. Collect sensor data and send it to your IoT hub

In this section, you deploy and run a sample application on MXChip IoT DevKit. The sample application blinks the LED on MXChip IoT DevKit and sends the temperature and humidity data collected from the sensor to your IoT hub.

### A. Get the sample application

1. In Visual Studio Code, press `F1` or `Ctrl + Shift + P` to open the command palette, and then type `Arduino: Examples`.

2. In the `Arduino Examples` tab, expand `Examples for MXCHIP AZ3166` > `AzureIoT`, and then click `GetStarted`.

### B. Install required libraries

1. In the Visual Studio Code, press `F1` or `Ctrl+Shift+P` to open command palette, type **Arduino: Library Manager**.

2. Search for the `ArduinoJson` library and click **Install**.

### C. Configure device connection string to DevKit (Windows)

{% include switch.html content = page.variable %}

#### Windows

1. Download and install [PuTTY](http://www.putty.org/){:target="_blank"}.

2. Configure PuTTY with the following settings in the sequence they are listed:
   * **Connection type**: select **Serial**.
   * **Serial line**: Enter the port that MXChip IoT DevKit uses to connect to your computer. For example, you enter `COM4`. You can find the port on the status bar of Visual Studio Code.
   * **Speed**: Enter `115200`.

3. Click **Open** to open a PuTTY command-line window.

   ![putty-config]({{"/assets/images/happy-path-putty-config.png" | absolute_url }})

4. On MXChip IoT DevKit, press and hold button A, press the Reset button, and then release button A.
   This makes the PuTTY command-line to start with a `#` prompt.

5. Configure the device connection string for MXChip IoT DevKit by running the following command in the PuTTY command-line window:
   ```bash
   set_az_iothub [device connection string]
   ```

   If the configuration is successful, the following information is displayed:
   ```bash
   INFO: Set Azure Iot hub connection string successfully.
   ```
   Now close the PuTTY command-line window.

#### macOS

1. With your DevKit connected to computer, open the terminal.

2. List relevant serial port:
 ```bash
 ls -l /dev/cu.*
 ```
 You get following outputs like:
 ```bash
 crw-rw-rw-  1 root  wheel   20,   1 May 17 18:36 /dev/cu.Bluetooth-Incoming-Port
 crw-rw-rw-  1 root  wheel   20,  33 May 18 18:11 /dev/cu.usbmodem1423
 ```
 The later one ended with `usbmodem1423` is the actual serial port of the DevKit.

3. Open serial monitor:
 ```bash
 screen /dev/cu.usbmodem1423 115200
 ```

4. Get into configuration mode:
 Hold down button A, then push and release the reset button.

5. In the prompt of the serial port with `#`, configure your connection string you get from previous step:
 ```bash
 set_az_iothub [your connection string]
 ```
 You will see the information once configuration is successful:
 ```bash
 INFO: Set Azure Iot hub connection string successfully.
 ```
 Now exit the serial monitor by first type `Ctrl+A` and then `Ctrl+\` and type 'y'.

### D. Deploy the sample application to MXChip IoT DevKit

1. In Visual Studio Code, click `COM<Port>` on the status bar, and then click `COM<Port> STMicroelectronics` in the command palette.

2. Press `F1` or `Ctrl + Shift + P`, type `arduino:upload`, and then click `Arduino: Upload` to build and deploy the sample application to MXChip IoT DevKit.

### E. Verify the sample application is running successfully

In Visual Studio Code, click the power plug icon in the status bar to open the Serial Monitor.

The sample application is running successfully when you see the following results:

* The Serial Monitor displays the same information as the content in the screenshot below.
* The LED on MXChip IoT DevKit is blinking.

![Final output in VS Code]({{"/assets/images/happy-path-vscode-final-output.png" | absolute_url }})

## Problems and feedback

You can find [FAQs]({{"/docs/faq/" | absolute_url }}) if you encounter problems or reach out to us from the channels below.

## Next steps

You have successfully connected an MXChip IoT DevKit to your IoT Hub, and sent the captured sensor data to your IoT hub.

To continue getting started with IoT Hub and to explore other IoT scenarios, see:

- [Manage cloud device messaging with iothub-explorer](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-explorer-cloud-device-messaging){:target="_blank"}
- [Save IoT Hub messages to Azure data storage](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-store-data-in-azure-table-storage){:target="_blank"}
- [Use Power BI to visualize real-time sensor data from Azure IoT Hub](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-power-bi){:target="_blank"}
- [Use Azure Web Apps to visualize real-time sensor data from Azure IoT Hub](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-web-apps){:target="_blank"}
- [Weather forecast using the sensor data from your IoT hub in Azure Machine Learning](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-weather-forecast-machine-learning){:target="_blank"}
- [Device management with iothub-explorer](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-device-management-iothub-explorer){:target="_blank"}
- [Remote monitoring and notifications with Logic Apps](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-monitoring-notifications-with-azure-logic-apps){:target="_blank"}

license: MIT

repository: calebjenkins/azure-iot-developer-kit

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: calebjenkins/azure-iot-developer-kit


text:
---
layout: default
---

# 1995-09-10 - Re: Bizdos citizenship?

## Header Data

From<EMAIL_ADDRESS>(Andrew Spring)

To<EMAIL_ADDRESS>Message Hash: 520464793e8019d3fb382d84d2a4e026bf6527614b03c39b8607aea9d07a589f

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-09-10 20:10:58 UTC

Raw Date: Sun, 10 Sep 95 13:10:58 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Andrew Spring)
Date: Sun, 10 Sep 95 13:10:58 PDT
To<EMAIL_ADDRESS>Subject: Re: Bizdos citizenship?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

>In correspondence with someone outside the US regarding ITAR regulations,
the remark was made that Jim Bizdos was Greek and not a U.S. citizen.  Is
this statement in the same class as an Elvis sighting?  Or if it is true,
what impact would ITAR have on foreign nationals working for a US company
involved with export restricted crypto?
>
>Please don't get carried away and turn this into a Net rumor.  I'm just
curious if anyone on the list can confirm or deny the citizenship comment.

Jim Bidzos is a US Permanent Resident Alien and Greek citizen.  He has a
Green Card.  It doesn't have any ITAR impact, since the ITAR term 'Foreign
Person' doesn't include Green Carded Resident Aliens.

It probably wouldn't have any impact anyway, since he's a business weenie,
and not a software weenie.  Now, if he had a _programmer_ that wasn't a US
Citizen, that would be a-whole-nother kettle of fish.

He's previously stated that he would become a US Citizen, if it were not for
the fact that Greece would require him to give up his Greek (and hence his
EC) citizenship.  See Simson Garfinkle's book on PGP for more details.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMFMZFI4k1+54BopBAQGK7gP+Oq+FjqjCeQziC16Ryq64i1tXMAhV/jaX
86TBumss/GPpaVfLGtDS3FZARK9eTo4gVPTfABtvIa/u6QzZGL9zCT5z5nWT5QJ4
Koj5jnGsnNpXx3YGa1bJfZOI4ctkRovPWpyPa4jWOEooJz5UbvCCwGW/YoYMlvCs
sQ//Qs7uDPs=
=ARLj
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [September 1995](/archive/1995/09)

+ Return to<EMAIL_ADDRESS>(Andrew Spring)](/authors/andrew_spring_at_ping_be_andrew_spring_)"

+ 1995-09-10 (Sun, 10 Sep 95 13:10:58 PDT) - Re: Bizdos citizenship? -<EMAIL_ADDRESS>(Andrew Spring)_

gha_license_id: MIT


text:
### 2.5.0
- Upgraded to Xcode 9.4
- Upgraded to Swift version 4.1.2 (swiftlang-902.0.54 clang-9<IP_ADDRESS>)
- Added subscript setter for FREArray i.e. myFreArray[0] = myFREObject
- Added iterator for FREArray i.e. for freObject in myFreArray { }
- Added subscript for setProp i.e. myFreObject["propName"] = myFREObject
- Improve UIImage Extension
- sendEvent is renamed to dispatchEvent

### 2.4.0
- Upgraded to Xcode 9.3
- Upgraded to Swift version 4.1 (swiftlang-902.0.48 clang-9<IP_ADDRESS>)
- Upgraded to AIR SDK 29

### 2.3.0
- SwiftLint
- added tvOS support
- Merge OSX, iOS, tvOS into same project

### 2.2.0
- Added UIColor.toFREObject()
- Improved performance for Number,Int conversion

### 2.1.0
- Added subscript for getProp i.e. myFreObject["propName"]
- Added subscript for FREArray i.e. myFreArray[0]
- Added support for ARGB in UIColor / NSColor
- Improve UIImage Extension

### 2.0.0
- Upgraded to Xcode 9.1
- Upgraded to Swift version 4.0.2 (swiftlang-9<IP_ADDRESS> clang-900.0.38)
- Upgraded to AIR SDK 28

### 1.3.0
- Upgraded to Xcode 8.3.3
- Added starter project
- Added conversions for Bool, String, Double, Int Arrays
- Fixed Dictionary conversion for Objects with null values

### 1.2.1
- Set bitcode enabled to false
- Improve FreBitmapData

### 1.2.0
- Refactor FreSwift

### 0.0.7
- Convert FreXxxxSwift classes to camel case.
- Change FRENamedFunction array to prevent ARC of strings.
- Prevent XCode from overwriting -Swift header. Optimised values are maintained.

### 0.0.6
- Added getFunctions(). Functions are defined here. Removes need to edit -Swift.h bridging header
- Update to Swift 3.1 + Xcode 8.3

### 0.0.5
- Restructure

### 0.0.4
- Rewrite of API. Now similar to the Air Native Extension API for Android.

### 0.0.3
- Added remaining FRE methods

### 0.0.2
- Ported FlashRuntimeExtensions to Swift. Allows calling FRE functions from within Swift

### 0.0.1
- initial version

repository: DmitryF/Swift-IOS-ANE

repo_name: DmitryF/Swift-IOS-ANE


text:
---
title:  "Temporal Models"
date:   2017-10-29 20:44:00
category: til
tags: ["machine", "learning", "machine learning", "artificial", "intelligence", "artificial intelligence", "ai", "AI", "A.I", "math", "probability", "statistics"]
---

TIL how to create a temporal model of a system using some simplifying assumptions for ease of computation.

## What is a Temporal Model

A `temporal model` is a representation of a stochastic process **over time.**

In a temporally modeled system, the world is described as a series of snapshots, or `time slices`. Each slice is a distinct view of the world at time `t`. We can use time slices collected during observation of the system to perform `inference`, and make predictions on future states or re-calculate past states with better accuracy.

Temporal models have sets of possible `states`, `transitions` between those states (and their likelihood), and sets of `evidence` (observations) that provide clues as to what state the system is currently in.

For example, consider a system where the state `X` consists of the random variable `R`, indicating whether it is raining at time `t`. Observable evidence for this system might include whether a coworker brought an umbrella to work `U`, which influences knowledge about `R` at time t when the umbrella observation was made.

## Transitions Models and Markov Processes

The `transition model` (how the world evolves over time) for a system is specified as `P(Xt | X0:t-1)`, or, in other words, **the probability of X at time t=now given the probability of X at all times prior to now**. This poses a problem: since t can be infinitely large, X0:t-1 can become extremely difficult or impossible to calculate.

This issue is solved by making a simplifying assumption known as a `Markov Assumption`: **the current state at time t only depends on a finite fixed number of previous states from time 0 <= k < t.**

The most simplifying of these assumptions is that the current state only depends on the direct predecessor `Xt-1` (one prior state). A system modeled in this way is called a `first-order markov process`, and the probability of Xt can be simplified to `P(Xt | Xt-1)`. When you make this assumption, you are suggesting that knowledge of the previous state makes the future conditionally independent of the past. To write this statement as a probability formula: `P(Xt | X0:t-1) = P(Xt | Xt-1)`.

To bring it back to our weather predicting example above of Rain at a given time: if we model this system as a first-order markov process, we are implying that rain two days (assuming units on t is day) that it does not have any impact on whether it will rain today.

Note that in some situations, modeling a temporal system as a first-order markov process is too simplifying... to increase the accuracy of your model, you can **evolve your model** into a second or third order markov process (where systems depend on more than 1 prior state). You can also **increase the set of state variables** you are tracking by adding additional sensors, which will provide more information about the world at time `t` allowing you to make better approximations of the

## Sensor Model

After specifying a transition model for our system, we also need to specify a `sensor model` for how our sensors detect information about the current state in the form of Evidence variables.

Sensors *could* be influenced by previous states in the system, or even previous evidence variables collected by other sensors, but we make another `Markov Assumption` for the sake of simplification: **evidence variables are produced only by the state at current time t, and are not influenced by other collected evidence variables.** To write this statement as a probability formula: `P(Et | X0:t, E0:t-1) = P(Et | Xt)`.

Let's apply the sensor model above to our weather prediction system. In the case of our Evidence variable `Umbrella`, the simplifying markov assumption applied to our sensor model means that if it rained yesterday our coworker would not have left their umbrella at work so it would still be present today. If we observe an umbrella today at time `t`, our markov assumption for our sensor model implies that it could only have been caused by a rain event R today at time `t`.

## Joint Probability at time t

Once we've defined our `transition model` (how our system evolves) and our `sensor model` (how our evidence variables get their values) we can calculate the joint probability distribution of our states X and evidence variables E at time t with the following formula:

```
                      t
P(X0:t, E1:t) = P(X0) Π P(Xi|Xi-1)*P(Ei|Xi)
                     i=1
```

Where `P(Xi|Xi-1)` represents our first-order markov process transition model and `P(Ei|Xi)` represents our simplified sensor model. `P(X0)` is the probability of X at time t=0, which kicks off the state of the world before observations begin.

gha_language: HTML


text:
InfyOm Laravel Generator
==============================

[![Total Downloads](https://poser.pugx.org/majuansari/laravel-generator/downloads)](https://packagist.org/packages/majuansari/laravel-generator)
[![Monthly Downloads](https://poser.pugx.org/majuansari/laravel-generator/d/monthly)](https://packagist.org/packages/majuansari/laravel-generator)
[![Daily Downloads](https://poser.pugx.org/majuansari/laravel-generator/d/daily)](https://packagist.org/packages/majuansari/laravel-generator)
[![Latest Stable Version](https://poser.pugx.org/majuansari/laravel-generator/v/stable)](https://packagist.org/packages/majuansari/laravel-generator)
[![Latest Unstable Version](https://poser.pugx.org/majuansari/laravel-generator/v/unstable)](https://packagist.org/packages/majuansari/laravel-generator)
[![License](https://poser.pugx.org/majuansari/laravel-generator/license)](https://packagist.org/packages/majuansari/laravel-generator)

Documentation is located [here](http://labs.infyom.com/laravelgenerator)

repository: majuansari/laragen

path: /README 2.md

filename: README 2.md

gha_language: PHP

repo_name: majuansari/laragen


text:
# JiffleQuiz

A quiz application that takes a json and converts it into an interactive quiz with a final status report at the end

DEMO: https://jifflequiz.herokuapp.com

---

### First page of the app

### Report Page

---

## How to run

1. Install all the dependencies
`npm install`

2. Start the server
`npm start`

repository: aelor/quiz

repo_name: aelor/quiz


text:
# Commerce Integration Framework Introduction

Adobe’s Commerce Integration Framework (CIF) is Adobe's recommended pattern to integrate and extend commerce services from Magento and other third party commerce solutions with the Experience Cloud. This enables Adobe Customers to deliver extraordinary and personalized omnichannel shopping experience based on state-of-the-art technology.

The Commerce Integration Framework is an add-on module for AEM and provides a set of authoring tools, components, and a reference storefront to accelerate integrations between AEM and commerce solutions. CIF is supported on all AEM offerings (On-Premise, Managed Services, & Cloud Service). There are some differences in the deployment model for the different AEM offerings. This set of documentation provides details for CIF on AEM On-Premise and AEM Managed Service. For more details on CIF on Cloud Service, refer to [AEM Commerce as a Cloud Service](https://docs.adobe.com/content/help/en/experience-manager-cloud-service/commerce/home.html)

## CIF Benefits

The main benefits are:

- The integration is an abstraction layer to standardize and encapsulate integrations with multiple systems.

- CIF supports headless/omnichannel experiences:

    - Single Page applications and Multi Page Applications
    - GraphQL endpoints

- CIF provides serverless, microservice-based process and business logic layer for customization and extension of commerce services

- CIF provides out-of-the-box integrations with Adobe solutions such as AEM, and Magento

## CIF on Adobe I/O Runtime

The CIF on Adobe I/O Runtime enables two use-cases: 1. Third party integrations via microservice layer and 2. Extensibility of microservices. This architecture is based on [OpenWhisk](https://openwhisk.apache.org) & [Adobe I/O Runtime](https://www.adobe.io/apis/cloudplatform/runtime.html). The main building blocks of the commerce services are serverless functions (OpenWhisk actions). These actions run on Adobe I/O Runtime inside an isolated container, stateless and serverless interacting with the commerce backend system or other endpoints via their APIs.

## CIF Elements

#### AEM CIF Cloud Connector

The connector connects AEM with Magento Cloud GraphQL endpoint or Adobe I/O Runtime GraphQL. The connector allows AEM to retrieve commerce data.

#### AEM CIF Core Components

The AEM components are server-side and client-side rendered components with Magento GraphQL support. They're used to create static, cacheable and SEO-friendly commerce storefornt based on AEM technologies.

#### AEM CIF Archetype with AEM Venia Storefront

The AEM CIF Archetype is a Maven project to provide a starting point for AEM commerce projects. It provides a B2C storefront for AEM (Author, Preview, Deploy) and supports Adobe Commerce GraphQL endpoints. It uses [AEM CIF Core Components](https://github.com/adobe/aem-core-cif-components) & [AEM Sites Core Components](https://github.com/adobe/aem-core-wcm-components).

#### CIF Extension Layer

The CIF extension layer is a middle layer to host complex business logic. It runs on the Adobe I/O Runtime platform which is Adobe's serverless platform. It allows you to extend end-to-end service calls by injecting business and process logic on a microservice level. Business logic would be for example to use location and channel to determine an inventory strategy. Process logic would be for example to retrieve personalized information.

#### CIF Integration Layer

The CIF integration layer is used to standardize integrations with other commerce solutions. It runs on the Adobe I/O Runtime platform which is Adobe's serverless platform and enables integrations at a microservice level by mapping third party APIs against the Adobe Commerce APIs. To help you get started on building third party integrations with AEM, we have created a [reference implementation](https://github.com/adobe/commerce-cif-graphql-integration-reference) to demonstrate how a non-Magento commerce backend can be integrated with the AEM CIF Cloud Connector and AEM CIF Core Components via Adobe Commerce APIs (Magento GraphQL APIs).

#### Campaign Integration

The [Campaign integration](https://github.com/adobe/commerce-cif-cart-abandonment) provides extensible microservices on I/O Runtime that enriches _cart abandonment_ events with live data before calling Campaign. It calls Magento to get cart details and calls Campaign's APIs to provide data. This is a reference to showcase Campaign-Magento integration using I/O Runtime.

## AEM-Commerce Integration Patterns

Some of the commonly implemented AEM-Commerce integration patterns are shown below.

![AEM CIF Integration Patterns](images/aem-cif-integration-patterns-updated.JPG)

#### Integration Pattern 1

This is our recommended integration pattern where AEM owns the entire glass and integrates commerce services via Adobe Commerce GraphQL APIs. This pattern unlocks AEM's full flexibility to tailor rich media site designs across devices. This integration pattern is supported by CIF as an out-of-the-box solution.

#### Integration Pattern 2

This pattern depicts a fully headless way of delivering content and commerce. The delivery is fully client-side. In this pattern content is delivered via API and HTML and Commerce data is delivered via GraphQL. This pattern is currently not supported by CIF out-of-the-box.

#### Integration Pattern 3

In this pattern, Magento owns the glass and embeds AEM authored content. The AEM authored content can be delivered via Experience Fragments or Content Fragments. This integration pattern will require project-specific work and cannot be implemented out-of-the-box with CIF.

#### Integration Pattern 4

This is a common integration pattern where the glass or presentation layer is split between AEM and a Commerce solution. Usually, the Commerce solution delivers the non-marketing pages such as checkout and my account and AEM delivers the marketing pages and store front catalog experience. In this pattern, you need to ensure that carts and user sessions are handled properly between the two systems to avoid a disjointed user experience. For e.g. Magento stores the cart & user session in a cookie, which can be shared between AEM & Magento. This pattern will require project-specific work and cannot be implemented out-of-the-box with CIF.

repository: AdobeDocs/commerce-cif-documentation

gha_language: CSS

repo_name: AdobeDocs/commerce-cif-documentation


text:
---
title:  "Swfit Sample"
date:   2016-02-01 12:18:00
description: Swift
---

# Swift Tips
## Data Types
### Printing

```swift
var m = 78
print (m, appendNewline: true)
```
### String Interpolation

You can insert values from constants and variables in to strings with string interpolation.

```swift
var m = 78
var s = "This is an ordinary string with an embedded value of something."
print s
```
### Assertions

An assertion is a runtime check to determine whether a particular condition is true.

```swift
x = 5
assert (x>6, "x must be greater than 6")
//Will halt with runtime error
```
### Scoping of Variables

Whenever a variable is declared it is done so in a particular scope, meaning a location where that variable is known and can be used.

### Underscore Character

An underscore (_), also known as wildcard, is used in Swift in a number of differernt situations.

```swift
for _ in cities {
print ("One iteration")
}
```
## Set

To create a new set, you initialize it using the following syntax:
``` var fruits = Set<String>()```

### Using NSString

```swift
var s = "12345"
var m = (s as! NSString).intValue
print(m)
```
## Tuples

A tuple can also define names for its components:

```swift
var returnThis = (code: 283, text: "Error: Bad syntax")

var errorCode = returnThis.code
var errrorText = returnThis.text

func getPlayerNameAndNumberOfHomeRunsThisYear() -> (name:String, runs: Int) {
var PlayerName = "Babe Ruth"
var PlayerRuns = 55
return (PlayerName, PlayerRuns)
```

## Optional Values

Swift has a capability for quickly catching errors resulting from the absence of values. The rule is that reference to an optional data type that is made without unwrapping it will cause a runtime error.

> The best practice here is to use what is known as optional binding.

```swift
var n: Int? = 5
if let p = n {
print ("The unwrapped value is \(p)")
}
else {
print("There is no value")
}
```

![Kobito.A8EuEv.png](https://qiita-image-store.s3.amazonaws.com/0/60780/cf415f8d-7079-720b-bd2a-ab60b5a528ad.png "Kobito.A8EuEv.png")

extension: markdown


text:
## esnstrument.js

Command-line utility to perform instrumentation

    node src/js/instrument/esnstrument.js -h
    usage: esnstrument.js [-h] [--initIID] [--noInstrEval]
                      [--inlineIID] [--dirIIDFile DIRIIDFILE] [--out OUT]
                      file

Positional arguments:

    file                  file to instrument

Optional arguments:

    -h, --help            Show this help message and exit.
    --initIID             Initialize IIDs to 0
    --noInstrEval         Do not instrument strings passed to evals
    --inlineIID           Inline IIDs in the instrumented file
    --dirIIDFile DIRIIDFILE
                        Directory containing jalangi_sourcemap.js and
                        jalangi_initialIID.json
    --out OUT             Instrumented file name (with path). The default is to
                        append _jalangi_ to the original JS file name

## instrument.js

Utility to apply Jalangi instrumentation to files or a folder.

    node src/js/commands/instrument.js -h
    usage: instrument.js [-h] [-a2] [-x EXCLUDE]
                     [--only_include ONLY_INCLUDE] [-i] [--analysis ANALYSIS]
                     [--initParam INITPARAM] [-d] [--selenium]
                     [--in_memory_trace] [--inbrowser] [--smemory] [-c]
                     [--extra_app_scripts EXTRA_APP_SCRIPTS] [--no_html]
                     --outputDir OUTPUTDIR
                     inputFiles [inputFiles ...]

Positional arguments:

    inputFiles            either a list of JavaScript files to instrument, or a
                        single directory under which all JavaScript and HTML
                        files should be instrumented (modulo the --no_html
                        and --exclude flags)

Optional arguments:

    -h, --help            Show this help message and exit.
    -a2, --analysis2      use analysis2
    -x EXCLUDE, --exclude EXCLUDE
                        do not instrument any scripts whose file path
                        contains this substring
    --only_include ONLY_INCLUDE
                        list of path prefixes specifying which
                        sub-directories should be instrumented, separated by
                        path.delimiter
    -i, --instrumentInline
                        instrument inline scripts
    --analysis ANALYSIS   Analysis script for 'inbrowser'/'record' mode.
                        Analysis must not use ConcolicValue
    --initParam INITPARAM
                        initialization parameter for analysis, specified as
                        key:value
    -d, --direct_in_output
                        Store instrumented app directly in output directory
                        (by default, creates a sub-directory of output
                        directory)
    --selenium            Insert code so scripts can detect they are running
                        under Selenium. Also keeps Jalangi trace in memory
    --in_memory_trace     Insert code to tell analysis to keep Jalangi trace in
                        memory instead of writing to WebSocket
    --inbrowser           Insert code to tell Jalangi to run in 'inbrowser'
                        analysis mode
    --smemory             Add support for shadow memory
    -c, --copy_runtime    Copy Jalangi runtime files into instrumented app in
                        jalangi_rt sub-directory
    --extra_app_scripts EXTRA_APP_SCRIPTS
                        list of extra application scripts to be injected and
                        instrumented, separated by path.delimiter
    --no_html             don't inject Jalangi runtime into HTML files
    --outputDir OUTPUTDIR
                        directory in which to place instrumented files
                        Utility to apply Jalangi instrumentation to files or a folder

    node src/js/commands/instrument.js -h
    usage: instrument.js [-h] [-s] [-x EXCLUDE] [--only_include ONLY_INCLUDE] [-i]
                     [--analysis ANALYSIS] [-d] [--selenium]
                     [--in_memory_trace] [--inbrowser] [--smemory] [-c]
                     [--extra_app_scripts EXTRA_APP_SCRIPTS] [--no_html]
                     --outputDir OUTPUTDIR
                     inputFiles [inputFiles ...]

## direct2.js

Command-line utility to perform Jalangi's analysis2

    node src/js/commands/direct2.js -h
    usage: analysis2.js [-h] [--analysis ANALYSIS] [--initParam INITPARAM] ...

Positional arguments:

    script_and_args       script to record and CLI arguments for that script

Optional arguments:

    -h, --help            Show this help message and exit.
    --analysis ANALYSIS   absolute path to analysis file to run
    --initParam INITPARAM
                        initialization parameter for analysis, specified as
                        key:value

## direct.js

Command-line utility to perform Jalangi's direct analysis

	node src/js/commands/direct.js -h
    usage: direct.js [-h] [--smemory] [--analysis ANALYSIS]
                 [--initParam INITPARAM]
                 ...

Positional arguments:

	script_and_args      script to record and CLI arguments for that script

Optional arguments:

	-h, --help           Show this help message and exit.
    --smemory            Use shadow memory
    --analysis ANALYSIS  absolute path to analysis file to run
    --initParam INITPARAM
                        initialization parameter for analysis, specified as
                        key:value
## record.js

Command-line utility to perform Jalangi's record phase

    node src/js/commands/record.js --help

    usage: record.js [-h] [--smemory] [--tracefile TRACEFILE]
                     [--analysis ANALYSIS]
                     ...

Positional arguments:

    script_and_args       script to record and CLI arguments for that script

Optional arguments:

    -h, --help            Show this help message and exit.
    --smemory             Use shadow memory
    --tracefile TRACEFILE
                        Location to store trace file
    --analysis ANALYSIS   analysis to run during record

## replay.js

Command-line utility to perform Jalangi's replay phase

	node src/js/commands/replay.js --help
	usage: replay.js [-h] [--smemory] [--tracefile TRACEFILE]
                 	[--analysis ANALYSIS]

Optional arguments:

	-h, --help            Show this help message and exit.
	--smemory             Use shadow memory
	--tracefile TRACEFILE
                        Location to store trace file
    --analysis ANALYSIS   analysis to run during replay

## symbolic.js

Command-line utility to perform Jalangi's pure symbolic execution

	node src/js/commands/symbolic.js -h
	usage: symbolic.js [-h] analysis ...

Positional arguments:

	analysis         path to symbolic execution code
	script_and_args  script to run symbolically and its arguments

Optional arguments:

	-h, --help       Show this help message and exit.

gha_language: JavaScript


text:
# Readme Generator

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)

## Table of Contents

 * [Installation](#installation)
 * [Usage](#usage)
 * [Credits](#credits)
 * [License](#license)

## Description

Creates a readme so you dont have to everytime.

[![Readme Gen in Action](demo.jpg)](https://drive.google.com/file/d/1XMQKi-CydOZ0Jfl0_FUr2h_yIOW7_Mqo/view "Readme Generator")

**Click the Image above for a video demonstration.**

## Usage

Inquirer prompts you questions and based off of those questions it generates a readme

## Installation

>npm install inquirer

## Languages

JavaScript ,ES6 ,Node

## Questions

### AdamR-Work

https://github.com/AdamR-Work/Readme-Gen

## Contributing

## Tests

>none.

## Credits

repository: AdamR-Work/Readme-Gen

branch_name: refs/heads/main

repo_name: AdamR-Work/Readme-Gen


text:
# RKE Backup and Restore Example

Setting up recurring backups for Rancher server is an important part of making Rancher production-ready. Rancher relies on `etcd` for persisting its configuration and state. Although `etcd` is a distributed data store, it is not impervious to hardware failure. Consistent backups is your best defense against this type of failure, so this example will help you understand how to set this up in your own instance of Rancher.

Below is an example of automation to produce recurring backups in Rancher as well as the automation to perform a recovery from backup. First we are going to create an RKE cluster using terraform and EC2, and then we'll configure the backup job.

## Requirements
 - Terraform
 - AWS
 - RKE

 If you are on a Mac you can install Terraform and RKE with Homebrew by running: `brew install terraform` & `brew install rke`.

## Configuring Backup

### Setp 1 - Start two EC2 Servers
First create a file called `terraform.tfvars` that contains the following:

```
ssh_keypair = ""
vpc_id = "
resource_prefix = "my-name-or-unqiue-id"
```

Replace the variables with values that correspond to your environment. These values will be used by Terraform to build EC2 instances in your AWS account. You also should have a set of AWS credentials defined per the [TF module's instructions](https://www.terraform.io/docs/providers/aws/index.html#authentication)

Then run:

```
terraform init
```

and subsequently

```
terraform up
```

You should now have two Ubuntu servers running in EC2. Take note of their IP addresses for the next step.

### Step 2 - Configure RKE cluster.yml
Now we are going to configure RKE to connect to these servers to build a Kubernetes cluster. This is also where we will configure the backup job. Edit the file called `cluster.yml` in the root of this repo to reflect the correct IP addresses of the two servers you just created.

Next we want to configure the backup settings for the cluster. Our Terraform plan from above created an S3 bucket we can use for this called `demo-rke-backup-bucket`. Update the section under the key `etcd` in the `cluster.yml` to reflect the correct settings for your AWS account. You'll need to provide it with AWS credentials that the automated job can use to upload. We recommend you create a narrow-scoped IAM user profile for this purpose.

You'll notice the etcd section of `cluster.yml` has a couple of parameters pertaining to backup behavior:

```
      interval_hours: 12
      retention: 6
```

These settings control how often backups will occur and how many points in time should be kept in storage. Modify these to suit your needs. An active cluster might benefit from a 6 hour backup interval to capture changes to the state.

### Step 3 - Deploying Kubernetes and starting Backup Job
Now we can apply our settings with RKE:

```
rke up --ssh-agent-auth
```

This will install Kubernetes on these nodes and configure automated backup. You may need to add the SSH key you are using in AWS to your agent by running `ssh-add /path/to/key`

That's it. Now you have an automated backup job running periodically to protect your cluster from data loss.

## Configuring Restore

In the event of a etcd failure or corruption, we can use our snapshot to restore the Rancher cluster state. Note that this is a destructive step to the existing etcd running in your cluster, so only do this if you want to replace the running state with the data in the backup.

To preform a restore, we'll re-use much of the information from the previous example to construct the restore command:

```
rke etcd snapshot-restore --config cluster.yml --name snapshot-name \
--s3 --access-key S3_ACCESS_KEY --secret-key S3_SECRET_KEY \
--bucket-name demo-rke-backup-bucket --s3-endpoint s3.amazonaws.com
```

Be sure to replace "snapshot-name" with the correct name of an actual snapshot. Also replace "access-key" and "secret-key" with the same keys we used previously to write the snapshots.


text:
# Definitions
These files are required in order to run the extension. They can be downloaded from Turner's CDN by running the following command in this folder:

```shell
wget -i definitions.txt
```

## What?
FFH's definitions are XML files that contain data, mainly pertaining to:

* Missions
* Actors
  - Heroes
  - Enemies
  - Breakables
  - Bosses
* Effects
* Stats

Note: Not all this data is used server side, but may be loaded anyways for ease of development.

## Versions
Compatibility with older definitions is not guaranteed, but you can still grab them if you wish.
Simply swap the datecode in the URLs with one of the following:

```
20130221
20130305
20130313
20130320
20130321
20130327
20130509
20130619
20130701
```

repository: Juansecu/HeroesExtension

repo_name: Juansecu/HeroesExtension


text:
#### scan

* `lands.scan() ⇒ promise`
* `lands.scan(<callback>)`
* `lands.scan({ExclusiveStartKey: <startkey>}) = promise`

Scans and returns all items in a table as an array of objects.

You can optionally pass in the LastEvaluatedKey from a previously executed scan operation as the ExclusiveStartKey to implement paginated scans (when you have more than 1 MB of data and can't get it all in one go).

```js
lands
    .scan()
    .then(function(allLands) {
        // Iterate through allLands here and do stuff with it.
    });
```

repository: victorquinn/dynasty

gha_language: CoffeeScript

repo_name: victorquinn/dynasty


text:
## 0.1.2

### New Queries

* The `js/missing-origin-check` query has been added. It highlights "message" event handlers that do not check the origin of the event.
  The query previously existed as the experimental `js/missing-postmessageorigin-verification` query.

repository: github/codeql

gha_language: CodeQL

repo_name: github/codeql


text:
# Android Essentials
Automates installation of your favorite apps on your new android device.
No setup needed, just run a script.

* Start installation by running this
   ```
   $ python main.py
   ```

* Set env variable DEBUG to enable debug logs
   ```
     $ DEBUG=true python main.py
   ```


text:
# reactpositories
This project was bootstrapped with `create react-app --template typescript`

An application made in react to show repositories using Api from Github. This was a challenge proposed by Rocketseat Education.

repository: thalesmacena/reactpositories

repo_name: thalesmacena/reactpositories


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

### Description

In Poppler 0.54.0, a memory leak vulnerability was found in the function gmalloc in gmem.cc, which allows attackers to cause a denial of service via a crafted file.

### POC

#### Reference
- https://bugs.freedesktop.org/show_bug.cgi?id=100775

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

repository: trickest/cve

repo_name: trickest/cve


text:
DiseaseDynamics
===============

This is my current project to use R, Shiny, and deSolve and create simple ODE models for disease dynamics (e.g., SIR, SEIR).
The other projects (BasicSIR, BasicSEIR, OpenSEIR) were all starting points to get familiar with Shiny, but this project should replace them in both functionality and priority.
To see the code in action, go to: See the code in action at: http://spark.rstudio.com/mkiang/DiseaseDynamics/

Short blog post describing the parameters: http://mathewkiang.com/2013/12/20/shiny-desolve-interactive-ode-models/

repository: thanhleviet/DiseaseDynamics

repo_name: thanhleviet/DiseaseDynamics


text:
---
title: QMotion QzHub
layout: pagetoc
notice: DoNotEdit, created automatically from the driver metadata, must be updated on the driver itself
---
QMotion QzHub
================================================================================
The QMotion QzHub driver on the Beolink Gateway integrates all the Shade Groups configured in the QzHub gateway.
The standard SHADE commands SET LEVEL, RAISE, LOWER and STOP are available.
The standard SHADE LEVEL status is not available on this first version.

Connecting to the system
--------------------------------------------------------------------------------
On the QMotion QzHub App open the navigation menu, tap on Settings and select the hub.
Under actions there is an "Integrate" option that will provide the integration code needed
to connect, copy it into the corresponding channel argument and hit apply.

* Channel settings are:
  - **\_Gateway Id**: Is behind the gateway with the following prefix "SGW-".
  - **_Integration Code**: Integration code from the QMotion QzHub App.

Available resources
--------------------------------
* **Group**: Any Group of Blinds/Shades in the installation.

Resource Address
-------------------
* **Group**: Every Group of shades is uniquely identified by an id provided by the gateway.

Commands, Events and States
-------------------------------
* Commands:
  - **SET**: Set level position of Group/Shade.
  - **RAISE**: Set to maximum level of Group/Shade.
  - **LOWER**: Set to minimum level of Group/Shade.
  - **STOP**: Stop level transition of Group/Shade.

Resource discovery
------------------
QMotion QzHub Driver of BeoLink Gateway has the capability of import all Groups of Shades/Blinds in QzHub gateway configuration.

Changelog
---------
   - V0.1 | 2020-12-03
      - Initial version.


text:
# Term and Definition

### Data Analysis
> Data analysis is a process of inspecting, cleansing, transforming, and
modeling data with the goal of discovering useful information, informing
conclusions, and supporting decision-making. - [Data Analysis, Wikipedia](https://en.wikipedia.org/wiki/Data_analysis)

### Data Science
> Data science is a multi-disciplinary field that uses scientific methods,
processes, algorithms and systems to extract knowledge and insights from
structured and unstructured data. - [Data Science, Wikipedia](https://en.wikipedia.org/wiki/Data_science)

### Machine Learning
> Machine learning (ML) is the scientific study of algorithms and statistical
models that computer systems use in order to perform a specific task
effectively without using explicit instructions, relying on patterns and
inference instead. - [Machine Learning, Wikipedia](https://en.wikipedia.org/wiki/Machine_learning)

### Artificial Intelligence
> Colloquially, the term "artificial intelligence" is used to describe
machines/computers that mimic "cognitive" functions that humans
associate with other human minds, such as "learning" and "problem
solving". - [Artificial Intelligence, Wikipedia](https://en.wikipedia.org/wiki/Artificial_intelligence)

Think of AI as a destination and machine learning as one path to get there. AI
research and development aims to mimic human cognitive functions, including
decision making. Machine learning is the most promising attempt toward AI to date.

### Deep Learning
> Deep learning (also known as deep structured learning or hierarchical
learning) is part of a broader family of machine learning methods based on
artificial neural networks. - [Deep Learning, Wikipedia](https://en.wikipedia.org/wiki/Deep_learning)

Deep learning refers to a family of ML methods that deal with neural networks.
Neural networks usually need much more data to train than other ML methods.
Deep learning offers exceptional performance in some, but not all domains. It
shines in domains like computer vision, natural language processing, and audio
processing.

## Key machine learning terms and concepts
Machine learning terms can be confusing. Here are definitions of key terms to help you.

- **Data exploration** is the process of gathering information about a large and often unstructured data set in order to find characteristics for focused analysis.
- **Data mining** refers to automated data exploration.

- **Descriptive analytics** is the process of analyzing a data set in order to summarize what happened. The vast majority of business analytics - such as sales reports, web metrics, and social networks analysis - are descriptive.

- **Predictive analytics** is the process of building models from historical or current data in order to forecast future outcomes.

### Supervised and unsupervised learning

- **Supervised learning algorithms** are trained with labeled data - in other words, data comprised of examples of the answers wanted. For instance, a model that identifies fraudulent credit card use would be trained from a data set with labeled data points of known fraudulent and valid charges. Most machine learning is supervised.

- **Unsupervised learning** is used on data with no labels, and the goal is to find relationships in the data. For instance, you might want to find groupings of customer demographics with similar buying habits.
- **Data Analysis:** The process of inspecting, cleaning, transforming and modeling data for business decision-making.
- data analyst:A person whose job is to examine information in order to find something out or to help with making decisions.
- data type:A classification that determines the possible values for the type and the way the values can be stored.
- record:A set of fields in a database related to one entity.
- common concatenation:Creating a single field for first and last name.
- syntax:The spelling and grammar of a programming language.
- join clause:Combines records from two or more tables in a relational database.
- workflow diagram:Depicts a series of actions that define a job or how work should be done. A workflow diagram visualizes how tasks will flow between resources, whether they’re machines or people, and what conditions allow the sequence to move forward.
- data governance:Defined process an organization follows to ensure high-quality data exists throughout the complete lifecycle.
- **Data Dictionary:** Maps and defines data, and oftentimes shows the relationship.

> Machine learning (ML) is an artificial intelligence branch where we define algorithms, with the aim of learning about a model that describes and extracts meaningful information from data.

### Statistics terms and definitions

- binomial random variable:The result of an experiment that has only two possible outcomes
- mean:The average of a data set
- median:The midpoint of a data set
- mode:Data point that is most prevalent in the data set
- outlier:Data point that is an abnormal distance from the other values in the data set
- permutations:The number of ways in which objects can be arranged
- probability:The likelihood that a specific event will occur
- range:The difference between the largest and smallest numbers in a data set
- standard deviation:Average distance from the mean
- Z-score:The number of standard deviations data points lie from the mean
- Central Limit Theorem:The more samples you take, the closer the sample means will get to the population means
- hypothesis testing:The collection and measurement of random samples used to support a hypothesis
- inferential statistics:Meaningful statistics that provide information about a population
- sample:A small subset of measurements
- standard error:The standard deviation of proportion distribution
- Type One Error:A false positive
- Type Two Error:A false negative

repository: sanikamal/machine-learning-atoz

repo_name: sanikamal/machine-learning-atoz


text:
# LearningX Examples and Tutorials

We provide here a suite of Python examples that walk you through concepts in:

* Classical & Deep Reinforcement Learning

* Basic & Advanced Machine Learning

Usage of the examples is simple: just run the main file for each project. Each project example contains its own `README.md` file discussing the theory and applications.

# Classical Reinforcement Learning

### [The Multi-Armed Bandit Problem](classical_RL/multiarmed_bandit)

### [Q-Learning in GridWorld](classical_RL/gridworld)

### [Optimal Blackjack Strategy](classical_RL/blackjack)

# Deep Reinforcement Learning

### [Balancing Cartpole Beam on OpenAI gym](deep_RL/cartpole)

### [Playing Pong from pixels on OpenAI gym](deep_RL/pong)

# Basic Machine Learning

### [Classification](basic_ML/classification)

* Decision Tree, K-Nearest Neighbours, Logistic Regression (Gradient Descent)

### [Regression](basic_ML/regression)

* Linear Regression (Gradient Descent / Stochastic Gradient Descent)

### [Unsupervised Learning](basic_ML/unsupervised)

* K-means Clustering

# Advanced Machine Learning

### [Building Model Trees](advanced_ML/model_tree)

### [Tree Ensembles: Bagging and Boosting](advanced_ML/tree_ensembles)

### Author

Anson Wong

repository: himanshuRepo/LearningX

repo_name: himanshuRepo/LearningX


text:
# jitsu [![Build Status](https://secure.travis-ci.org/nodejitsu/jitsu.png?branch=master)](http://travis-ci.org/nodejitsu/jitsu)
*Flawless command line deployment of Node.js apps to the cloud*

## Overview

[Jitsu](https://github.com/nodejitsu/jitsu) is a [Command Line Tool (CLI)](http://en.wikipedia.org/wiki/Command-line_interface) for managing and deploying Node.js applications. It's open-source and easy to use. [We've](https://github.com/nodejitsu) designed `jitsu` to be suitable for command line beginners, but still be powerful and extensible enough for production usage.

`jitsu` requires `npm`, the [node package manager](http://npmjs.org).

## One-line jitsu install

    [sudo] npm install jitsu -g

## Features

`jitsu` is built on some amazing technologies which we've been actively building with the community since 2009. `jitsu` is fully extendable and extremely modular ( see [Libraries](#Libraries) section ).

 - Allows for seamless deployment of your Node.js applications to the cloud
 - Ships with use-full boilerplates and sample applications through [Node Apps](https://github.com/nodeapps) project integration
 - Fully supports `npm` dependency resolution on deployment to [Nodejitsu](http://nodejitsu.com)
 - Full support of [Nodejitsu's API](https://github.com/nodejitsu/nodejitsu-api) ( a plethora of node.js goodies )
 - Integrated multi-level multi-transport logging support via [Winston](https://github.com/flatiron/winston)
 - Too many to list... seek [further knowledge ](https://github.com/nodejitsu/handbook) or just try it out!

# One-Line Node App Installation

**If you don't have an application yet, you can use one of ours!**

     jitsu install

# One-Line Node App Deployment

     jitsu deploy

*( inside the path of your Node.js application )*

This will create a new application, package.json, and deploy your path to [Nodejitsu](http://nodejitsu.com). If it's your first deployment, you'll be prompted for some information such as *subdomain* and *start script* but it's really easy and we promise it will only take a few seconds.

If you have any issues deploying your node.js application please feel free to open up an issue on the [Github Issues](https://github.com/nodejitsu/jitsu/issues) section of this page, we'll have someone get back to you in a flash!

## Usage

`jitsu` is mostly self documenting. After installation, run the `jitsu` command from your command line.

If it's your first time using `jitsu`, you will be prompted to login with an existing account or create a new account.

## After you've logged in, you can start deploying apps immediately!

## Command Line Usage

`jitsu` is mostly self-documenting. Try any of these commands to get started.

   **Usage:**

     jitsu <resource> <action> <param1> <param2> ...

   **Common Commands:**

   *To sign up for [Nodejitsu](http://nodejitsu.com)*

     jitsu signup

   *To log into [Nodejitsu](http://nodejitsu.com)*

     jitsu login

   *To install a pre-built application*

     jitsu install

   *Deploys application in the current path to [Nodejitsu](http://nodejitsu.com)*

     jitsu deploy

   *Lists all applications for the current user*

     jitsu list

   *Additional Commands*

     jitsu apps
     jitsu snapshots
     jitsu users
     jitsu logs
     jitsu databases
     jitsu conf
     jitsu logout

### Help

`jitsu` is mostly self documenting. We suggest just trying it out. All commands will yield friendly messages if you specify incorrect parameters. If you find anything difficult to use, please open up a [Github issue](https://github.com/nodejitsu/jitsu/issues) or pull request!

     jitsu help
     jitsu help apps
     jitsu help snapshots
     jitsu help users
     jitsu help logs
     jitsu help databases
     jitsu help config

## .jitsuconf file

All configuration data for your local `jitsu` install is located in the *.jitsuconf* file in your home directory. Directly modifying this file is not really advised. You should be able to make all configuration changes via:

    jitsu config

If you need to have multiple configuration files, use --localconf or --jitsuconf options.

Some Examples:

    jitsu config set colors false   # disable colors
    jitsu config set timeout 480000 # set request timeouts to 8 minutes
    jitsu config set noanalyze true  # disable package analyzer
    jitsu config set protocol https # Always use HTTP Secure

##jitsu options

    jitsu [commands] [options]

    --version             print jitsu version and exit
    --localconf           search for .jitsuconf file in ./ and then parent directories
    --jitsuconf [file]    specify file to load configuration from
    --noanalyze           skip require-analyzer: do not attempt to dynamicially detect dependencies

##jitsu behind proxy

If you are behind a proxy and you haven't configured jitsu to use it, `jitsu` will throw an error, `Jitsu requires you to connect to Nodejitsu's stack (api.nodejitsu.com)`.
In order to solve this issue, you can configure jitsu to use a proxy by executing the following command.

    jitsu config set proxy http://proxy.domain.com:3128/

If you need to authenticate yourselves to the proxy, you can try this command.

    jitsu config set proxy http://user:pass@proxy.domain.com:3128/

##jitsu hooks

You can add pre-deploy and post-deploy hooks to jitsu for running build scripts, tagging releases or anything else you want to do. These are hooks that are executed before or after deploying your application on the local machine. They are stored in your package.json:

    {
      "name": "test-app",
      "subdomain": "test-app",
      "scripts": {
        "predeploy": "echo This will be run before deploying the app",
        "postdeploy": "echo This will be run after deploying the app",
        "start": "app.js"
      },
      "engines": {
        "node": "0.6.x"
      },
      "version": "0.0.0"
    }

Which results in the following output when deploying:

    $ jitsu deploy
    info:    Welcome to Nodejitsu nodejitsu
    info:    It worked if it ends with Nodejitsu ok
    info:    Executing command deploy
    info:    Analyzing your application dependencies in app.js
    info:    Checking app availability test-app
    info:    Creating app test-app
    This will be run before deploying the app
    info:    Creating snapshot 0.0.0
    info:    Updating app test-app
    info:    Activating snapshot 0.0.0 for test-app
    info:    Starting app test-app
    info:    App test-app is now started
    info:    http://test-app.jit.su on Port 80
    This will be run after deploying the app
    info:    Nodejitsu ok

## Libraries
`jitsu` is built on a few well developed, well maintained Node.js libraries. The [Nodejitsu](http://nodejitsu.com) team and friends have been building and using these projects actively for the past two years. They are the most used Node libraries (see: [http://search.npmjs.org/](http://search.npmjs.org/)) and are actively maintained by Nodejitsu and other core members of the Node.js community. Each library serves a specific function and we highly suggest you check each one out individually if you wish to increase your knowledge of Node.js

- [npm](http://npmjs.org) - Node Package Manager
- [colors](https://github.com/marak/colors.js) - Terminal Colors module
- [optimist](https://github.com/substack/node-optimist) - CLI Options Parsing
- [request](https://github.com/mikeal/request) - http request module
- [async](https://github.com/caolan/async) - Asynchronous Iteration
- [vows](http://vowsjs.org) - Asynchronous BDD testing library
- [winston](https://github.com/flatiron/winston) - Multi-transport logging library

### Need more?
The documentation for `jitsu` and the [Nodejitsu](http://nodejitsu.com) APIs is open-source and a work in-progress. For more information checkout the [Nodejitsu Handbook](https://github.com/nodejitsu/handbook)

#### (C) Copyright 2010 - 2013, [Nodejitsu](http://nodejitsu.com) Inc.

repository: fractor/nntailoring

gha_language: TypeScript

repo_name: fractor/nntailoring


text:
# `/home/sam/.local/dotfiles`

This repo contains scripts and configuration for various programs I use.

Maybe you'll also be interested in my [website](https://afuera.me.uk).

## Installation

Make sure you have cloned with all submodules available.

Then use Meson to install:

    mkdir build
    cd build
    meson .. --prefix=$HOME
    ninja install

## License

All code within is [MIT licensed](https://en.wikipedia.org/wiki/MIT_License)
unless otherwise noted.

repository: ssssam/dotfiles

repo_name: ssssam/dotfiles


text:
# Dash Summarization

This app lets you chat with [DialoGPT](https://huggingface.co/transformers/model_doc/dialogpt.html), a chatbot based on GPT that was trained on 147M comments+replies from Reddit. The model was developed by [Microsoft Research](https://github.com/microsoft/DialoGPT), and it is hosted on [Huggingface's model repository](https://huggingface.co/microsoft/DialoGPT-large).

![demo](demo.gif)

## Instructions

To get started, first clone this repo:
```
git clone https://github.com/plotly/dash-sample-apps.git
cd dash-sample-apps/apps/dash-chatbot
```

Create a conda env (or venv) and install the requirements:
```
conda create -n dash-chatbot python=3.7.6
conda activate dash-chatbot
pip install -r requirements.txt
```

You can now run the app:
```
python app.py
```

and visit http://<IP_ADDRESS>:8050/.

repository: nupurdogra/dash-sample-apps

repo_name: nupurdogra/dash-sample-apps


text:
# v0.1.0 (Tue Mar 19 2019)

#### 🚀  Enhancement

- Styled components [#9](https://github.com/intuit/qb-animation-library/pull/9<EMAIL_ADDRESS>
#### 🏠  Internal

- change badge style to default [#8](https://github.com/intuit/qb-animation-library/pull/8) ([@hipstersmoothie](https://github.com/hipstersmoothie))
- add npm badges [#7](https://github.com/intuit/qb-animation-library/pull/7) ([@hipstersmoothie](https://github.com/hipstersmoothie))

---

# v0.0.3 (Sat Jan 19 2019)

#### 🏠  Internal

- use package lock and switch to `npm ci` for ci build [#6](https://github.com/intuit/qb-animation-library/pull/6) ([@hipstersmoothie](https://github.com/hipstersmoothie))
- update auto... again [#5](https://github.com/intuit/qb-animation-library/pull/5) ([@hipstersmoothie](https://github.com/hipstersmoothie))

---

# v0.0.2 (Fri Jan 18 2019)

#### 🐛  Bug Fix

- add circle config [#1](https://github.com/intuit/qb-animation-library/pull/1) ([@hipstersmoothie](https://github.com/hipstersmoothie))

#### 🏠  Internal

- add publish config [#4](https://github.com/intuit/qb-animation-library/pull/4) ([@hipstersmoothie](https://github.com/hipstersmoothie))
- update auto [#3](https://github.com/intuit/qb-animation-library/pull/3) ([@hipstersmoothie](https://github.com/hipstersmoothie))
- Add automated releases [#2](https://github.com/intuit/qb-animation-library/pull/2) ([@hipstersmoothie](https://github.com/hipstersmoothie))

#### Authors: 1

- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))

---

# Changelog

Notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.0 - 2018-12-03

### Added

- This animation library is meant to be a starting point for adding motion to web UI elements via CSS or SCSS.

repository: brettlyne/qb-animation-library

repo_name: brettlyne/qb-animation-library


text:
# Explore AppDynamics

Download linux version of [AppDynamics](https://www.appdynamics.com/)

The Docker file is based on Debian

    docker build -t appdynamics .

    docker run -it appdynamics --name appdynamics -p 8088:8080 appdynamics

repository: rockie-yang/explore-appdynamics

repo_name: rockie-yang/explore-appdynamics


text:
---
title: Lab 5 - Home Assistant
date: "2019-12-02"
description: Lab 5 for IT441. In this lab, Home Assistant is implemented to run the mosquitto broker and run the garage sensors and actors
github_link: "https://github.com/mattrobertson14/it441-home-assistant"
---

### Objectives

The purposes of this lab are to:
* Install an open source home automation platform
* Interface this platform via MQTT with your various devices
* Use Home Assistant to monitor the state of the garage door, and whether the car is parked in the garage.

### Materials

The materials used for this lab were
* Personal computer (MacBook Pro)
* 3 x ESP8266 Wemos D1 Mini (Microcontroller)
* 3 x USB -> MicroUSB cable for connecting the Microcontroller to the computer
* 3 x Breadboard
* 1 x Stop light LED component with built in resistors
* 1 x Hypersonic distance detector
* 1 x Magnetic door sensor
* 9 x Male to male jumper cables
* 1 x Raspberry Pi 3

### References

1. [Arduino IDE Examples](https://www.arduino.cc/en/Tutorial/BuiltInExamples)
2. [PubSubClient Docs](https://github.com/knolleary/pubsubclient)
3. [Arduino IDE](https://www.arduino.cc/en/main/software)
4. [Install Home Assistant](https://www.home-assistant.io/getting-started/)
5. [Connecting Home Assistant to WiFi](https://unix.stackexchange.com/questions/420640/unable-to-connect-to-any-wifi-with-networkmanager-due-to-error-secrets-were-req)
6. [Connecting Home Assistant to IFTTT](https://www.home-assistant.io/integrations/ifttt/)

### Procedures

1. Download Hassio Home Assistant onto the Raspberry pi using the following instructions:
    * https://www.home-assistant.io/getting-started/
2. Next, you will need to make sure that you set up the network correctly. For me, I wasn't able to get the suggested USB network configuration file to work. Instead I used the `nmcli` approach.
    * First login to hassio with the command `login` after bootup (using root as the username)
    * Use the following command to see if the ssid you're going to try and connect to exists
    ```bash
    nmcli con show
    ```
    * Use the following command to delete that connection if it exists and make sure that you are starting from scratch
    ```bash
    nmcli con delete <SSID>
    ```
    * Use the following command to (re)add the new connection
    ```bash
    nmcli dev wifi connect <SSID> password <password>
    ```
    * Start up the new connection
    ```bash
    nmcli con up <WiFi Name>
    ```
3. Now you can connect to your new Home Assistant instance at the IP address it has or if you have mDNS discovery on your network you can go to `http://hassio.local:8123
4. Once you are connected to Home Assistance, you need to install the MQTT Add On
    * Go to the Hass.io Page and select the Add On tab
    * Search for MQTT
    * Click on the mosquitto broker and install it
    * Go to `Configuration > Users` and add a new username and password for the user that will be used to connect all the ESP-8266
5. Rewrite all of the Arduino code to connect to the new Home Assistant MQTT broker. After you have done this, remove all the logic from the stop-light that decided on what light it should be set to. This logic is going to be moved into home assistant using automations. You will need to add the following line to each of the setup functions of each Arduino.
```c#
client.connect((char*) device_id.c_str(), "[username]", "[password]");
client.publish("homeassistant/sensor/garage/[dev_name]/config", "{\"name\": \"[Device Name]\", \"state_topic\": \"/[Publish Topic]\"}");
```
6. Now that you have all of your devices registering themselves with home assistant you are ready to create your dashboard. You can do this by going to the `Overview` and click the edit button (it is a pencil).
    * You will then go to the add FAB at the bottom to add a card.
    * Select sensor and select the 3 entities: door, distance-sensor, and stop-light
    * Now you will be able to see the state of these three different entities.
7. Now it's time to add the logic to actually make the stop light work again. As previously stated, this logic is now going to be in Home Assistant. That means that we are going to need to add a hand full of automations. You should put an automation that will trigger on the mqtt topic of the distance sensor but only if the door sensor is open.
8. Once you have these automations up and running, you'll need to then set up some kind third party automation. I chose to use IFTTT to make it so that I would get a notification if the Garage Door was left open too long.
9. To set up IFTTT, you need to do the following
    * Register with an IFTTT account on https://ifttt.com
    * Add webhook Applet and configure it to send a notification on the webhook of the garage door being left open
    * Then add an automation in Home Assistant that will hit that webhook on the trigger of the garage door being open for 10s and there is no change in the stoplight.
10. Now you have a home assistant client that is set up to correctly change a stoplight and will send you a notification if your garage door has been left open for too long.

### Thought Questions

1. #### Which version of Home Assistant did you choose to install? (Docker-based Hass.io, Raspbian-based Hassbian, or install it yourself?) Why did you choose this particular version?
I used the Raspbian based Hass.io image. I used this because I was familiar with the installation process. I did try the .vhdx of hass.io but it was having some kernal issues when I was installing it with Hyper-V so I changed to the raspberry pi image.
2. #### How should you decide which logic to perform in Home Assistant versus coding the logic directly into the devices? What guiding principles would you establish for future devices?
In my mind it matters most about how quickly triggers need to cause things to happen in the system. In this case, where the stoplight needs to change super quickly as things change then the logic needs to be close to the stoplight. The stoplight should probably have the logic inside of it so it is the most repsonsive. However, if something doesn't need to be super responsive the logic can be in Home Assistant or the like.
3. #### What features do you like the most about Home Assistant?
The feature I like most about home assistant is the automation part. I really like that you can just set arbitrary triggers and have them set something into motion. This seems like it is extremely extendible. I also really like how you can have conditional triggers as well. It makes it so that the integrations can be much larger.
4. #### Please estimate the total time you spent on this lab and report.
9 hrs

### Certification of Work

I certify that the solution presented in this lab represents my own work. In the case where I have borrowed code or ideas from another person, I have provided a link to the author’s work in the references, and included a citation in the comments of my code.

-- Matthew Robertson

### Appendix
#### Appendix 1: DIAGRAMS

Logical Layout
![Logical Layout](logical-diagram.png)

#### Appendix 2: Code
Available on [GitHub](https://github.com/mattrobertson14/it441-home-assistant)


text:
# Runtimes Tests Dockerfiles

The Dockerfiles defined under this path are configured to host the execution of
the runtimes language tests. Each Dockerfile can support the language indicated
by its directory.

The following runtimes are currently supported:

-   Go 1.12
-   Java 11
-   Node.js 12
-   PHP 7.3
-   Python 3.7

### Building and pushing the images:

The canonical source of images is the
[gvisor-presubmit container registry](https://gcr.io/gvisor-presubmit/). You can
build new images with the following command:

```bash
$ cd images
$ docker build -f Dockerfile_$LANG [-t $NAME] .
```

To push them to our container registry, set the tag in the command above to
`gcr.io/gvisor-presubmit/$LANG`, then push them. (Note that you will need
appropriate permissions to the `gvisor-presubmit` GCP project.)

```bash
gcloud docker -- push gcr.io/gvisor-presubmit/$LANG
```

#### Running in Docker locally:

1) [Install and configure Docker](https://docs.docker.com/install/)

2) Pull the image you want to run:

```bash
$ docker pull gcr.io/gvisor-presubmit/$LANG
```

3) Run docker with the image.

```bash
$ docker run [--runtime=runsc] --rm -it $NAME [FLAG]
```

Running the command with no flags will cause all the available tests to execute.

Flags can be added for additional functionality:

-   --list: Print a list of all available tests
-   --test <name>: Run a single test from the list of available tests
-   --v: Print the language version

repository: comzyh/gvisor

repo_name: comzyh/gvisor


text:
# Tensorflow-singularity-container-with-GPU-support
This repository provides a bootstrap definition file to build Tensorflow singularity container with Nvidia GPU support. Most of scripts are based on Ignor's work (refer to [Singularity group GPU thread] (https://groups.google.com/a/lbl.gov/forum/m/#!msg/singularity/CezfXNjLGe0/JIv6ay4CBwAJ), where igor provided scripts to build scientific linux 7 GPU container)

## How to build
 1. Install [singularity](https://github.com/gmkurtzer/singularity) from master branch. You can see the installation instructions on [singularity homepage](http://singularity.lbl.gov/#install) (section: Build an RPM from the source).
 2. Download nvidia driver (NVIDIA-Linux-x86_64-352.93.run), cuda 7.5 (cuda_7.5.18_linux.run) and cudnn5 (cudnn-7.5-linux-x64-v5.1.tgz) (Here I assume that the same nvidia driver/cuda have been installed in your host machine) and store the downloaded files and above scripts under /root
 3. sudo into the root ( sudo -s) and
 4. cd into /root and run 'sh build.sh'
 5. copy ubuntu_tensorflow_GPU.img into your own local folder and change its owner and group (sudo chown your_user_id:your_group_id ubuntu_tensorflow_GPU.img) so that you can run it with local user.
 6. Run "singularity exec ubuntu_tensorflow_GPU.img python hello_world.py" to check whether it works.

## Trouble shooting
#### I don't have root access. How can I install it?
Install virtualbox and vagrant. You can build container image inside a linux VM (e.g. ubuntu 14.04) and copy it into your host machine with Nvidia GPU card.

#### My nvidia driver/cuda versions are different from those in the above scripts. How can I modify the above scripts?
At the first step, you need to run 'nvidia-smi' to identify your nvidia driver version in your host machine. Then you can download the corresponding nvidia driver
(NVIDIA-Linux-x86_64-$driver_version.run ) and cuda/cudnn version and modify the script "tensorflow.sh".


text:
# BulkUploadable
Quick bulk insert to database. It comes handy when data needs to be populated from csv or excel files.

Tested on rails 3.2.13 and ruby 2.1.0

## Installation

Add this line to your application's Gemfile:

    gem 'bulk_uploadable'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install bulk_uploadable

## Usage

  Include following code to you gem file

    include BulkUploadable

    Model.bulk_upload([:column1, :column2], [["value1", "value2"], ["value1", value2]])

  e.g:

    class User < ActiveRecord::Base
      attr_accessible :email, :name
      include BulkUploadable
    end

    with out transaction
    User.bulk_upload([:email, :name]<EMAIL_ADDRESS>"Petrik"]<EMAIL_ADDRESS>"Jhon"]])

    with transaction
    User.bulk_upload([:email, :name]<EMAIL_ADDRESS>"Petrik"]<EMAIL_ADDRESS>"Jhon"]], true)

## Contributing

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


text:
KORE Core integration/staging repository
=====================================

KORE is an open source crypto-currency focused on security and privacy with fast private transactions consisting of low transaction fees & environmental footprint.  It utilizes a custom Proof of Stake protocol for securing its network.

### Coin Specs

Pre Fork Algo	Momentum

Post Fork Algo	Yescrypt R32

Block Time	60 Seconds

Difficulty Retargeting	Every Block

Max Coin Supply	12,000,000 KORE

### PoS Rewards Breakdown

To be Added!!!

### Installation Steps

Note1: that you can speed up the compilation using the option -j when using make, for example: make -j3

Note2: If you machine has less than 3G memory, you should use a swapfile.

a) enabling swap

```bash
    sudo dd if=/dev/zero of=/swapfile bs=4096 count=1048576
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
```

b) disabling swap

```bash
    sudo swapoff -v /swapfile
    sudo rm /swapfile
```

### 1. Installating dependencies

```bash
sudo apt-get update
sudo apt-get install -y git curl jq
sudo apt-get install -y software-properties-common
sudo apt-get install -y autotools-dev autoconf automake build-essential
sudo apt-get install -y qttools5-dev-tools qttools5-dev libprotobuf-dev libqrencode-dev
sudo apt-get install -y libtool pkg-config protobuf-compiler python3
sudo apt-get install -y devscripts debhelper

```

### 2. Building KORE dependencies

```bash
cd depends
make
```

### 3. Building KORE source

```bash
cd ..
./autogen.sh
./configure --with-gui=qt5 --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests  --enable-tor-browser

make
```

### 4. Generating the installer (.deb)
#### First, Download Go
```bash
From a web browser open and save the following link:
  https://golang.org/doc/install?download=go1.12.7.linux-amd64.tar.gz
```

#### Second, Install Go
```bash
cd ~/Downloads
sudo tar -C /usr/local -xzf go1.12.7.linux-amd64.tar.gz
```

#### Third, make Go available
```bash
in a terminal make go available, with the following command:
export PATH=$PATH:/usr/local/go/bin
```

#### Fourth, generate the (.deb)
```bash
from the kore root directory, give the command:
make deploy
```

### 5. Installing kore (.deb)
```bash
  The installer is generated in the share folder, so in order to install it, give the following command:
  cd <kore-dir>/share
  sudo apt install ./kore_<version>_amd64.deb
  * <kore-dir> is the directory where you download the kore git repository
  * <version> is this source code version
  ** if you get problems with old version, you can remove with the command:
    sudo apt-get remove kore --purge -y
```

repository: Kore-Core/KORE

gha_language: C

repo_name: Kore-Core/KORE


text:
### NOTE regarding GitHub 2 Factor Auth

* If you have 2FA enabled on your GitHub account, you will need to provide a *Personal Access Token* when prompted for your password
* Tokens can be generated at [github.com/settings/tokens](https://github.com/settings/tokens)
* The token must have a minimum of `repo` access, and `delete_repo` access to automate the creation and cleanup of your new bot


text:
---
layout: publication
title: "Opportunities to Use DNA Methylation to Distil Functional Elements in Large Crop Genomes"
image: /images/publications/Crisp2019_opinion.png
authors: Crisp PA, Noshay JM, Anderson SN, Springer NM
year: 2019
ref: Crisp et al. 2019. Molecular Plant.
journal: Molecular Plant
pdf:
doi: 10.1016/j.molp.2019.02.006
supplement:
---

DNA methylation is a chromatin modification that is often associated with the exciting and sometimes unpredictable patterns of inheritance that can unfold with epigenetic phenomena. The stability and heritability of DNA methylation patterns perhaps allow us to utilize DNA methylation profiles to distil the suite of potentially functional elements in large crop genomes. Here, we discuss the potential and possible ways to use the absence of DNA methylation to identify potential regulatory regions within intergenic sequences and the presence of DNA methylation to identify pseudogenes.