Welcome to the Real-Time Predictive Maintenance Solution with Cortana Intelligence Workshop!
Build an end-to-end real-time predictive maintenance solution using Azure Machine learning, IoT Hubs, Stream Analytics, and Power BI. In this workshop you'll also learn how to store and manipulate massive amounts of data using Azure Data Lake Store and Azure Data Warehouse. The workshop is heavily focused on:
The workshop is presented by:
The architecture of the predictive maintenance solution built during this workshop is shown on the following diagram:
An Azure subscription and a Power BI account are required to complete the KiZAN Cortana Intelligence workshop. If you do not have these accounts already, this section will walk you through the process of activating free trials.
NOTE: If you have an Azure subscription already, you can skip this section. If you have a Visual Studio subscription (formerly known as an MSDN account), you get free Azure credits every month. Check out the next section for activating these benefits.
There are several ways to get an Azure subscription, such as the free trial subscription, the pay-as-you-go subscription, which has no minimums or commitments and can be canceled any time or an Enterprise agreement subscription. You can buy an Azure subscription directly from Microsoft or from a Microsoft Value Added Reseller. In this exercise, you'll create a free trial subscription.
Browse to the following page http://azure.microsoft.com/en-us/pricing/free-trial/ to obtain a free trial account.
Click Start free.
If you have a Microsoft account, enter the credentials for the Microsoft account that you want to use. You will be redirected to the Sign up page.
NOTE: If you do not have a Microsoft account, click Create a new Microsoft account and complete the following steps:.
Complete a 4-part registration form
NOTE: Your credit card will not be charged unless you explicitly transition to a paid plan. When your trial period expires or if you run out of credit, your services will be shut down unless you choose to be billed.
Your free subscription will be set up, and you will soon be ready to start using it.
Log into https://portal.azure.com to access your subscription.
If you happen to be a Visual Studio subscriber (formerly known as MSDN) you can activate your Azure Visual Studio subscription benefits. You can use your MSDN software in the cloud, and most importantly, you get up to $150 in Azure credits every month (as well as additional benefits).
NOTE: If you are not a Visual Studio subscriber, please skip this exercise.
To active the Visual Studio subscription benefits, browse to the following URL: http://azure.microsoft.com/en-us/pricing/member-offers/msdn-benefits-details/
Scroll down to see the full list of benefits you will get for being a MSDN member and read the FAQ section for additional details.
Click Activate to activate the benefits.
You will need to enter your Microsoft account credentials to verify the subscription and complete the activation steps.
If you already have a Power BI account, you can use it to complete this workshop. If you do not have a Power BI account, follow the steps below to sign up for your free account:
To sign up for a free Power BI service, navigate to: https://powerbi.microsoft.com/ and click on the Sign up free button in the upper right corner.
Scroll down to the Power BI Cloud collaboration and sharing section and click the TRY FREE button, which will redirect you to the start of the sign-up process.
Enter your work email address and press the Sign up button.
NOTE: Power BI Service requires a work email address, which will be different from the account you used to set up a trial Azure subscription. You will be unable to register with a Microsoft account, such as @hotmail.com or @outlook.com or with other consumer-oriented email accounts.
If you are using your work email address with other Microsoft services (such as Office 365), you will be asked to sign in with your existing account.
If you do not have an existing account, you will be asked to create one.
After creating an account or signing in, follow the prompts to complete your sign up for the Power BI account.
At the end of the process, you should be able to reach your personal Power BI workspace, which will look something like this:
NOTE: A free Power BI account will be sufficient to complete the exercises in this workshop. However, you will be unable to share your content or collaborate with other users. Optionally, you may choose to try Power BI Pro free for 60 days. Power BI Pro has all the features of the free version of Power BI, and additional sharing and collaboration features. To try a 60-day free trial of Power BI Pro, sign into Power BI, and try one of the Power BI Pro features, such as create an app workspace or sharing a dashboard. When you try any of these features, you will be prompted to start your free trial.
Azure Resource groups are resources that serve as "containers" for collections of other resources. The benefit of resource groups is that they allow an Azure administrator to roll-up billing and monitoring information for resources within a resource group and manage access to those resources as a set. We will place all resources for the Predictive Maintenance solution into a common resource group.
Log into your Azure Portal by navigating to https://portal.azure.com.
Click on the "+" sign in the upper left corner and type in the term "Resource Group" in the Search bar, then select "Resource Group" from the list of matching resource types.
Review the description of the resource you are about to create and press the Create button.
NOTE: The process of finding a desired type of a new resource to be created is applicable to all types of resources. You will do this frequently throughout this workshop.
Enter the name of resource group, confirm subscription to which the resource group belongs and select a location for the resource group.
Confirm that the resource group was created successfully.
A key part of the predictive maintenance solution that we are about to build is a machine learning model that will estimate the useful life of an electrical motor based on various factors. This machine learning model will be designed in the Azure Machine Learning Studio. To use Azure Machine Learning Studio, you need to have a Machine Learning workspace, which contains the tools you need to create, manage, and publish advanced analytics solutions in the cloud, as well as collaborate with your colleagues on the development of these solutions.
As part of setting up a Machine Learning Workspace, we will also create a Machine Learning Web Service Plan. After you have developed an experiment in Machine Learning Studio, we will deploy the experiment as a web service hosted on Azure. The costs associated with web services are managed under web service pricing plans that you will select.
Click on the "+" sign in the upper left corner and type in the term "Machine Learning" in the Search bar, then select "Machine Learning workspace" from the list of matching resource types.
Review the description of the resource you are about to create and press the Create button.
Specify the properties of the Machine Learning workspace.
NOTE: Machine Learning Web Service Plans allow you to customize your costs based on the number of transactions and compute hours used by your active web services per month. A free DEVTEST Web service plan will be sufficient for the purposes of this workshop. However, you may need to upgrade to another tier depending on how much you use this web service.
During this exercise, you will start developing a machine learning model using Azure Machine Learning Studio. The purpose of the model is to predict the remaining useful life of an electrical motor based on its attributes and operating conditions.
After logging into the Azure portal, navigate to the Machine Learning Workspace:
From the Machine Learning Workspace overview blade, launch the Machine Learning Studio.
Sign into the Machine Learning Studio.
From the experiments area of the Machine Learning Studio, create a new Experiment.
We will start with a blank experiment, by clicking the "Blank Experiment" tile, which will open a new experiment design area.
The experiment design area consists of an experiment canvas in the center, a navigation bar with a list of available modules on the left and a properties pane on the right.
We will add the first module to our machine learning experiment, which will import the raw data for the model. Expand the Data Inputs and Outputs folder, find the Import Data module and drag it onto the experiment canvas.
Now, let's configure the Import Data Module by clicking on the Launch Import Data Wizard, and selecting Web URL via HTTP from the list of available sources.
On the next step of the wizard, provide the Data Source URL:
Select CSV data format and indicate that the CSV file has a header row:
Complete the Import Data Wizard configuration.
After configuring the data import wizard, let's run the experiment to make sure that the data can be imported.
You should see a green check mark indicating that the module has run successfully. Now, let's examine and visualize the content of the dataset that we have just imported by right-clicking on the Import Data module, clicking on "Results dataset" and clicking on "Visualize."
You will observe column and row counts, a sample of data, as well as histograms depicting the distribution of values in each column.
NOTE: It is a good practice to review each column carefully to identify any anomalies or data quality issues that need to be addressed before training your machine learning model. You can click on the heading of each column to see basic descriptive statistics for column values, as well as a a more detailed histogram of value distribution.
Now that we know that the data has been imported successfully, let's configure the Import Data Module to Use cached results, since we do not expect our source data to change.
By default, our experiment is titled Experiment created on {date}. Let's give a more descriptive name to our experiment by selecting the current title in the title bar and replacing it with a more suitable title, such as Predictive Maintenance.
We are now ready to save the draft of the experiment.
While reviewing imported dataset, we noticed two columns containing categorical values (Motor Type and Device Type). Let's indicate that these columns contain categorical data to ensure that they are handled properly by various machine learning algorithms. To help us with this task, we will use the Edit Metadata module. Let's find this module by typing the phrase Edit metadata in the search bar. Then, let's drag the Edit Metadata module to the design surface of the experiment.
Connect the output of the Import Data module to the input of the Edit Metadata module.
Launch column selector.
Select Motor Type and Device Type columns:
Make selected columns categorical.
During the data preparation phase of the data science process, we may need to handle the possibility of encountering missing data in one or more columns of certain records. For this experiment, let's replace missing values with the average (mean) of other values in the corresponding column.
Find the Clean Missing Data module by typing the word Clean in the search bar. Then, drag the Clean Missing Data module onto the design surface.
Connect the output of the Edit Metadata module to the input of the Clean Missing Data module.
Launch column selector and select all columns, except for Motor Type, Device Type and Remaining Useful Life.
Configure the cleaning mode to Replace missing values with the mean.
When we develop machine learning models, it may be possible to train a model that can make accurate predictions for those records that have been used to train the model. Yet, our objective is to train a model that can make accurate predictions for new data (data that the model has not previously seen). One of the simplest ways to simulate the "new" data is by splitting our original dataset into partitions:
NOTE: In more advanced data science processes, it is common to split the data into three sets: the training set that is used to train several models, the validation set that is used to estimate prediction error in order to select the best model, and the test set that is used to estimate the prediction error of the final model that gets selected. For simplicity, we will only use the training and validation sets in this experiment.
Find the Split Data module by typing the word Split in the search bar. Then, drag the module onto the design surface.
Connect the output of the Clean Missing Data module to the input of the Split Data module.
Configure the Split Data module by setting the fraction of rows in the first output dataset to 0.7
Find the Train Model module by typing the phrase Train Model in the search bar. Then, drag the module onto the design surface.
Connect the first output of the Split Data module to the second input of the Train Model module.
We will use the Boosted Decision Tree Regression to predict the Remaining Useful Life of electrical motors. Let's initialize the machine learning model by selecting the appropriate algorithm and specifying the algorithm parameters.
NOTE: The process of selecting a suitable algorithm and the selection of optimal algorithm parameters is a crucial part of the data science process. While some algorithms may be suitable for certain types of machine learning problems, it is often necessary to try and compare multiple algorithms and multiple combinations of algorithm parameters. For simplicity, we will only use a single algorithm with a basic set of parameters in this exercise.
Find the Boosted Decision Tree Regression module by typing the word Boosted in the search bar. Drag the module onto the design surface. Then, drag the output of the Boosted Decision Tree Regression module to the first input of the Train Model module.
Configure the Train Model module by launching the column selector and selecting the Remaining Useful Life column (as the variable to be predicted).
Configure the parameters of the Boosted Decision Tree Regression module as illustrated below:
During the scoring process, we will use the newly trained Boosted Decision Tree Regression model to predict the remaining useful life of records in the validation dataset.
Find the Score Model module by typing the phrase Score Model in the search bar. Drag the module onto the design surface.
Drag the output of the Train Model module to the first input of the Score Model module. Then, drag the second output of the Split Data module to the second input of the Score Model module.
Configure the Score Model module by ensuring that the Append score columns to output option is checked.
To evaluate the machine learning model, we will compare the predictions of remaining useful life made by the model with actual remaining useful life of motors in our validation dataset.
Find the Evaluate Model module by typing the word Evaluate in the search bar. Drag the module onto the design surface. Then, connect the output of the Score Model module to the first input of the Evaluate Model module.
Now that the machine learning model is built, we can run the entire experiment.
Press the Run button at the bottom of the screen and click the Run button in the pop-up menu to run the entire experiment.
After running the experiment, we can review the accuracy of the machine learning model. Right-click on the Evaluate Model module. Click on Evaluation results and click on Visualize.
You will observe a summary describing the error rate of the machine learning model you had built.
You may also visualize the decision trees that have been constructed while training the Machine Learning model. Right-click on the Train Model module. Click on Trained Model and click on Visualize.
You will see a screen with a list of all decision trees, and the capabilities for interactive exploration of the splits in the decision tree.
Confirm that your completed experiment looks similar to the following diagram.
Save the experiment.
After creating and training the machine learning model, we will operationalize the model by creating a Web Service that will enable us to make predictions of remaining useful life of electrical motors. Later on, we will use this web service in conjunction with a Stream Analytics job to predict and track the health of electrical motors in near-real-time.
If necessary, open the machine learning experiment that you had created in the previous section. Then, click on the Set Up Web Service button and click on Predictive Web Service [Recommended].
Machine Learning Studio will automatically generate a Web Service experiment based on the model that you had previously created, which will look as follows:
We will need to make several modifications to this draft of the Web Service experiment to customize it for our needs.
First, we will need to make sure that remaining useful life is not expected as a web service parameter. Rearrange the layout of modules in the predictive experiment and remove the connection between the Import Data module and the Edit Metadata module.
Find the Select Columns in Dataset module by typing the phrase Select Columns in the search bar. Drag the Select Columns in Dataset module onto the design surface and place it between the Import Data and Edit Metadata modules. Connect the output of the Import Data module to the input of the Select Columns in Dataset module.
Launch column selector and exclude the Remaining Useful Life column from the dataset.
Connect the output of the Select Columns in Dataset module to the input of the Edit Metadata module.
Let us adjust the outputs of the web service such that it returns only the predictions of the remaining useful life and no other data.
First, remove the connection between the Score Model module and the Web service output module.
Find the Select Columns in Dataset module by typing the phrase Select Columns in the search bar. Drag the Select Columns in Dataset module onto the design surface and place it between the Score Model module and the Web service output modules. Connect the output of the Score Model module to the input of the Select Columns in Dataset module.
Launch column selector and include the Scored Labels column from the dataset (while excluding all others).
Connect the output of the Select Columns in Dataset module to the input of the *Web service output" module.
Your predictive experiment should now look something like the following diagram:
Let's run the entire predictive experiment:
Save the predictive experiment.
Once the predictive experiment has been run, deploy the predictive web service. Press the Deploy Web Service button and click Deploy Web Service [New] Preview.
Specify the name, storage account and price plan for the web service. Then, click Deploy.
You will be redirected to the web service management portal. Click on the Use Web Service link.
In the list of basic consumption information, note the Primary Key and Request-Response values - you would use these values to access your Machine Learning Web Service programmatically. You do not need to record these values for the purposes of this workshop.
The architecture of most IoT solutions includes several common components, such as a hub that receives messages from connected devices and a big data store that could be used to permanently store the data collected from the devices. We will create both of these resources during this section of the workshop.
Let us create an Azure IoT Hub to serve as a central ingestion point for telemetry data sent by our connected devices. Azure IoT Hub supports billions of clients that can securely send data to the hub to report on their state and operating conditions. Azure IoT Hub supports bi-directional communications by allowing cloud-to-device messages to be sent to the devices.
Log into your Azure Portal by navigating to https://portal.azure.com.
Click on the "+" sign in the upper left corner and type in the term "IoT Hub" in the Search bar, then select "IoT Hub" from the list of matching resource types.
Review the name of the resource and click on the Create button.
Specify the parameters of the IoT Hub:
NOTE: The name of the IoT Hub must be globally unique across all Azure subscriptions. If the name you tried to use is not available, please specify a different name.
Once the IoT Hub has been created, take a few moments to review the IoT Hub blade in your Azure Portal and familiarize yourself with the features and parameters of the IoT Hub.
NOTE: Provisioning of an IoT Hub is a key part of building a real-time analytics solution for connected devices. During this workshop, we will be using an IoT Hub provisioned by KiZAN. Therefore, the IoT Hub that you had just provisioned will be present in your subscription, but will not be actively used throughout the remainder of the workshop.
Let us create a data lake store to store to store the telemetry data from our IoT devices. Azure Data Lake Store is a secure, massively-scalable big data storage service for unstructured, semi-structured, and structured data. Azure Data Lake Store can store trillions of files with individual files being over a petabyte in size, which makes it ideal for a variety of enterprise and scientific applications. The Data Lake Store can be used to capture data of any size, type and velocity to support operational and exploratory analytics.
Log into your Azure Portal by navigating to https://portal.azure.com.
Click on the "+" sign in the upper left corner and type in the term "Data Lake" in the Search bar, then select "Data Lake Store" from the list of matching resource types.
Review the name of the resource and click on the Create button.
Specify the parameters of the Data Lake Store:
NOTE: The name of the data lake store must be globally unique across all Azure subscriptions. If the name you intended to use is not available, please specify a different name.
NOTE: It is typically a good practice to provision related data-intensive resources in the same location - this will help to minimize latency and maximize throughput while one service accesses resources stored in another service. This approach also helps to minimize egress charges (charges for data leaving an Azure data center or data being moved from one data center to another data center). While not every resource type is available in every Azure location, we will plan to provision most of the resources in the East US 2 Azure location during this workshop.
Once telemetry data from our connected devices has been ingested, we can use use Azure Stream Analytics to perform real-time processing and analysis of massive volumes of data in motion. Azure Stream Analytics supports connectivity to event streams (such as IoT Hubs and Event Hubs), as well as to reference data that changes infrequently. Azure Stream Analytics transformations are defined using a simple SQL-like language that has been extended to support the temporal (time-based) nature of the data. Azure Stream Analytics is capable of processing complex events in a variety of formats.
Log into your Azure Portal by navigating to https://portal.azure.com.
Click on the "+" sign in the upper left corner and type in the term "IoT Hub" in the Search bar, then select "IoT Hub" from the list of matching resource types.
Review the name of the resource and click on the Create button.
Specify the parameters of the Stream Analytics Job:
Once the Stream Analytics job has been created, take a few moments to review the Stream Analytics blade in your Azure Portal and familiarize yourself with the features and parameters of this resource.
A stream analytics job must have one or more input and one or more output. Our job will have two inputs and two outputs. Let's start by creating our first input.
NOTE: Names and configuration settings described in this exercise must match those listed in the instructions.
Navigate to the Overview blade of your Stream Analytics job and click on the Inputs tile.
Click on the Add button to add your first input.
Define the details for the input:
In addition to the streaming events, a Stream Analytics Job may utilize reference data, such as device metadata or other types of data that do not change frequently. We will join device metadata with reference data in order to enrich the outputs of the Stream Analytics Job.
Navigate to the Overview blade of your Stream Analytics job and click on the Inputs tile.
Click on the Add button to add your second input.
Define the details for the input:
Your inputs should now be properly configured.
Your Stream Analytics Job will have two outputs: Power BI for real-time data visualization and Azure Data Lake Store for persistent storage of your telemetry data.
NOTE: Names and configuration settings described in this exercise must match those listed in the instructions.
Click on Outputs in the navigation pane for the Stream Analytics Job, and click on the Add button.
Specify the details for the new output:
Complete configuring the output:
From the Outputs section of the Stream Analytics Job blade, click the Add button.
Specify the details for the new output:
A pop-up window will open allowing you to log into your Power BI Account.
Finish setting up the Power BI output:
Your outputs should now be properly configured.
Your Stream Analytics Function will ingest streaming telemetry data from your connected electrical motors, combine telemetry data with device metadata (such as device types, maintenance history and operating characteristics), and predict the remaining useful life of the device. The prediction of the remaining useful life will be made by calling the Machine Learning Web Service that we have created in an earlier exercise.
To get started, click on Functions in the navigation pane of the Stream Analytics Job blade.
Specify the details for the new function:
Stream Analytics Jobs use a SQL-like query language to define transformations for the streaming data. We will write a query that will perform the following tasks:
Click on Query in the navigation pane for the Stream Analytics Job. You will be directed to a query editor window where you will be able to specify a stream analytics query that will transform the streaming data:
If you are familiar with the Structured Query Language (SQL), you will be right at home with the Stream Analytics Query language. You will discover some constructs that are unique to this language. We encourage you to consult the Stream Analytics Query Language Reference for additional details.
Copy the Stream Analytics Query shown below to your clipboard -- be sure to use the handy Copy button in the upper right corner of the code block. Then, paste the query into the query editor window, and press the Save button.
--Summarize temperature data for each 1-minute period
WITH [TemperatureByDevice1Minute] AS (
SELECT T.deviceId AS [Device Id],
System.Timestamp AS [Event Time],
AVG(CAST(T.tempF as float)) AS [TempF Mean - 1 Minute],
STDEV(CAST(T.tempF as float)) AS [TempF StDev - 1 Minute],
MAX(CAST(T.tempF as float)) - MIN(CAST(T.tempF as float)) AS [TempF Range - 1 Minute],
MAX(CAST(T.tempF as float)) AS [TempF Max - 1 Minute]
FROM
[KiZAN-IoT-Hub] T TimeStamp By [EventEnqueuedUtcTime]
WHERE T.tempF BETWEEN 50 AND 250
GROUP BY HoppingWindow(second, 60, 30),
T.deviceId
)
--Summarize temperature data for each 15-minute period
, [TemperatureByDevice15Minutes] AS (
SELECT T.deviceId AS [Device Id],
System.Timestamp AS [Event Time],
AVG(CAST(T.tempF as float)) AS [TempF Mean - 15 Minutes],
STDEV(CAST(T.tempF as float)) AS [TempF StDev - 15 Minutes],
MAX(CAST(T.tempF as float)) - MIN(CAST(T.tempF as float)) AS [TempF Range - 15 Minutes],
MAX(CAST(T.tempF as float)) AS [TempF Max - 15 Minutes]
FROM
[KiZAN-IoT-Hub] T TimeStamp By [EventEnqueuedUtcTime]
WHERE T.tempF BETWEEN 50 AND 250
GROUP BY HoppingWindow(second, 900, 30),
T.deviceId
)
--Summarize temperatures by device over a 24-hour period
, [TemperaturesByDevice24Hours] AS (
SELECT
System.Timestamp AS [Time Stamp],
T.[deviceId] AS [Device ID],
CEILING(CAST(T.[tempF] as float)) AS [Temperature],
MAX(CAST(T.[runTime] AS bigint)) AS [Run Time],
COUNT(*) AS [Record Count]
FROM
[KiZAN-IoT-Hub] T TimeStamp By [EventEnqueuedUtcTime]
WHERE T.tempF BETWEEN 50 AND 250
GROUP BY HoppingWindow(second, 86400, 30),
T.[deviceId],
CEILING(CAST(T.[tempF] as float))
)
--Summarize excessive temperature events over a 24-hour period
, [TemperatureAlertsByDevice24Hours] AS (
SELECT
system.timestamp AS [Time Stamp],
T.[Device ID],
RD.[Motor Type],
RD.[Device Type],
MAX(T.[Run Time] - CAST(RD.[Maintenance Run Time] as bigint)) AS [Run Time Since Maintenance],
MAX(T.[Run Time] - CAST(RD.[Overhaul Run Time] as bigint)) AS [Run Time Since Overhaul],
MAX(T.[Run Time]) AS [Run Time Since Production],
DATEDIFF(day, CAST(RD.[Overhaul Date] AS datetime), System.Timestamp) AS [Age Since Overhaul],
DATEDIFF(day, CAST(RD.[Production Date] AS datetime), System.Timestamp) AS [Age Since Production],
SUM(
CASE WHEN T.Temperature > (CAST(RD.[Max Operating Temperature] as float))
THEN T.[Record Count]
ELSE 0
END) AS [Observations Above Max Temp - 24 Hours]
FROM
[TemperaturesByDevice24Hours] T
INNER JOIN [KiZAN-IoT-Device-Reference-Data] RD
ON T.[Device Id] = RD.[Device Id]
GROUP BY system.timestamp,
T.[Device ID],
RD.[Motor Type],
RD.[Device Type],
RD.[Overhaul Date],
RD.[Production Date]
)
, DataWithPredictions AS (
SELECT
System.Timestamp AS [Time Stamp],
T1M.[Device ID],
T24H.[Motor Type],
T24H.[Device Type],
T24H.[Run Time Since Maintenance],
T24H.[Run Time Since Overhaul],
T24H.[Run Time Since Production],
T24H.[Age Since Overhaul],
T24H.[Age Since Production],
--Summaries for each 1-minute period
T1M.[TempF Mean - 1 Minute],
T1M.[TempF StDev - 1 Minute],
T1M.[TempF Range - 1 Minute],
T1M.[TempF Max - 1 Minute],
--Summaries for each 15 minute interval
T15M.[TempF Mean - 15 Minutes],
T15M.[TempF StDev - 15 Minutes],
T15M.[TempF Range - 15 Minutes],
T15M.[TempF Max - 15 Minutes],
T24H.[Observations Above Max Temp - 24 Hours],
--Call Azure Machine Learning web service to get a Remaining Useful Life prediction
RemainingUsefulLife(
T24H.[Motor Type],
T24H.[Device Type],
T24H.[Run Time Since Maintenance],
T24H.[Run Time Since Overhaul],
T24H.[Run Time Since Production],
T24H.[Age Since Overhaul],
T24H.[Age Since Production],
T1M.[TempF Mean - 1 Minute],
T1M.[TempF StDev - 1 Minute],
T1M.[TempF Range - 1 Minute],
T1M.[TempF Max - 1 Minute],
T15M.[TempF Mean - 15 Minutes],
T15M.[TempF StDev - 15 Minutes],
T15M.[TempF Range - 15 Minutes],
T15M.[TempF Max - 15 Minutes],
T24H.[Observations Above Max Temp - 24 Hours]
) AS [Remaining Useful Life]
FROM
[TemperatureByDevice1Minute] T1M
INNER JOIN [TemperatureByDevice15Minutes] T15M
ON T1M.[Device Id] = T15M.[Device Id]
AND DATEDIFF(second,T1M,T15M) = 0
INNER JOIN [TemperatureAlertsByDevice24Hours] T24H
ON T1M.[Device Id] = T24H.[Device Id]
AND DATEDIFF(second,T1M,T24H) = 0
)
--Push data with predictions to PowerBI
SELECT *
INTO [PowerBI]
FROM DataWithPredictions
--Store data with predictions in Azure Data Lake Store
SELECT *
INTO [DataLakeStore]
FROM DataWithPredictions
By now, you have defined all major components of a Stream Analytics job, including the inputs, outputs, functions and query.
You can review a graphical diagram that illustrates the structure of your job by going to Job Diagram in the navigation bar.
Take a moment to examine the diagram.
Now, we are ready to star the Stream Analytics Job. Navigate to the Overview blade of the Stream Analytics Job and press the Start button.
You will be directed to a page that will allow you to specify the moment from which the job should start reading data from the data source. Select Now and press the Start button.
It may take a couple of minutes for the Stream Analytics job to start. You will see a confirmation once the job has started successfully.
Once the Stream Analytics got started, it created a streaming dataset in your Power BI account and started pushing data to the data set. We are ready to develop Power BI reports and dashboards to visualize the data.
Log into your Power BI account by navigating to https://app.powerbi.com and logging in with your username and password. After logging in you will see the content of your personal workspace. Click on the down-arrow next to the My Workspace link to expand the navigation menu for your workspace.
You should see a list of Dashboards, Reports, Workbooks and Datasets. You should see a Device Telemetry dataset among your datasets. Click on the Device Telemetry dataset.
NOTE: Unless you have previously created reports, dashboards, workbooks, or other datasets, you will not see any other content in your workspace.
After click on the Device Telemetry dataset, you will see a blank report based on this dataset.
The report design area consists of several main sections:
Let's add the first visual to the report:
At this point you should see a chart that resembles the one shown below:
Let's save your report by expanding the File menu and clicking on Save.
You will be asked to provide the name for your new report. Let's label it Device Telemetry.
Power BI allows you to combine a set of visuals from one or more reports on a dashboard. By combining visuals from multiple reports, the dashboard can provide a convenient, comprehensive picture of a variety of business processes. Power BI dashboards also provide an ideal way of visualizing streaming data, since the dashboard can be refreshed in near-real-time as new records arrive.
First, open the Device Telemetry report that you have created in the previous exercise.
Then, find and click the Pin icon in the upper right corner of the line chart representing device temperatures over time. This icon will allow you to add a visual to a dashboard.
Indicate that you would like to pin the visual to a new dashboard, specify Device Telemetry as the name of the dashboard, and press the Save button.
Once your dashboard has been created, click on Device Telemetry from the list of dashboards in your navigation bar, which will bring you to the Device Telemetry dashboard.
As you observe the dashboard, you will notice that the data on the dashboard will refresh automatically as new records are pushed by the Stream Analytics job to the streaming dataset in Power BI. No manual actions are necessary to refresh the data.
NOTE: The animation above is accelerated. You should expect to see your streaming dataset refresh every 30 seconds, due to the fact that your Stream Analytics job is configured to output events every 30 seconds.
Power BI provides a rich environment for authoring reports, visualizing data and performing exploratory data analysis. While the simple report that we created in one of the previous exercises is sufficient to illustrate the concepts of report development in Power BI, you may want to experiment with creating more advanced reports. The purpose of the following exercise is to encourage independent exploration of features and capabilities of Power BI.
First, add several new visuals to the Power BI report, such as:
When you are finished, your report should look similar to the following illustration.
Once you have enhanced the report, pin the visual that represents estimated remaining useful life by device over time to the Device Telemetry dashboard.
Your enhanced dashboard should look similar to the illustration below:
In this chapter, you'll learn how to create an Azure Data Factory pipeline and copy data from Azure Blob Storage to Azure Data Lake store.
Azure Data Factory is a cloud-based integration service for orchestrating data movements and data transformations. These operations are called pipelines and can be schedule to ingest data from multiple sources, process data using compute services (Azure HDInsight, Hadoop, Spark, Azure Data Lake Analytics, Azure Machine Learning, etc.), and publish to data stores such as Azure Data Lake Store.
Browse to the following page https://portal.azure.com/ and log into your Azure account.
An alternative is to search for Data Factory in the Azure Marketplace.
On the next blade menu click on the Create button to provision the Azure Data Factory.
Specify the properties of the New data factory.
This completes the exercise!
Once the data factory has been created, open the resource and click on Copy data (PREVIEW). This will open a new tab to the Azure Data Factory Copy Wizard.
On the Properties menu of Copy Data complete the following tasks.
On the Source Connection select Azure Blob Storage from the list. Click the Next button to continue.
On the following screen, enter the storage account information. Click the Next button to continue.
On the following screen, select the input folder device-operating-data. Then, click the Choose button.
On the following screen, click the check box for copying files recursively. Click the Next button to continue.
Azure Data Factory will then scan the files selected and automatically detect the File Format settings.
In addition to the settings, a preview of the files will be shown. Once all settings are correct, click the Next button.
On the Destination data store screen, select Azure Data Lake Store from the list. Click the Next button to continue.
Next we will enter the Azure Data Lake Store connection details.
The next step is to control how the data will be copied. The options available are the following.
Select Preserve hierarchy and click the Next button to continue.
The next step is to control how the data gets saved. Make sure the Add header to file checkbox is checked. Click the Next button to continue.
Settings will control how the data is moved in Azure. These settings can be changed to allocate a specific number of resources to copy data. Leaving these at Auto will let Azure determine the proper number of resources. Click the Next button to continue.
The summary screen contains a detail list of the options selected for the Copy Wizard. Click the Authorize button to enter account information required on step 2.9. Click the Next button to continue.
A popup window will prompt for Azure account information. Sign in to continue.
Review the Summary page. Once approved, click the Next button to begin the deployment process of the Azure Data Factory.
Once deployment is complete, follow the Click here to monitor copy pipeline link.
The Azure Data Factory Resource Explorer will be displayed. In the lower middle section, under ACTIVITY WINDOWS, the currently deployed pipeline will be displayed. Monitor the duration to see how long the copy process will take to complete.
This completes the exercise!
In this chapter, you'll create an Azure SQL Data Warehouse, load the data from Azure Data Lake Store using PolyBase and analyze the data using Power BI.
Azure SQL Data Warehouse is a cloud-based massively parallel processing (MPP) relational database, able to handle large enterprise workloads. Designed to efficiently scale up within minutes and integrate across the Azure platform. Azure SQL Data Warehouse compute can be paused and resumed on-demand to eliminate costs during non-business hours. The MPP architecture takes a divide and conquer approach against large distributed datasets. Storage and compute is decoupled allowing more flexibility to grow when required.
Browse to the following page https://portal.azure.com/ and log into your Azure account.
An alternative is to search for SQL Data Warehouse in the Azure Marketplace.
Specify the properties of the New Data Warehouse.
Specify the server for the New Data Warehouse.
NOTE: Passwords must be at least 8 characters long and may not contain the account name of the user. In addition, passwords must contain characters from three of the following categories:
- Uppercase letters (A through Z)
- Lowercase letters (a through z)
- Digits (0 through 9)
- Special characters (e.g. !,$,#,%)
Specify the remaining server properties for the New Data Warehouse.
This completes the exercise!
Before we can access data from the Azure Data Lake Store using Azure SQL Data Warehouse, we will need to create and configure an Azure Active Directory application that will be authorized to have such access.
In the Azure Portal, navigate to the Azure Active Director blade by typing in "Azure Active Directory" in the search bar at the top of the page. Then, select Azure Active Directory from the list of matching resources.
Click on App registrations in the navigation bar.
Click on + New application registration
Specify the details of the new application:
Now that the application has been created, let us find and record several important attributes of the application that we will need in a subsequent exercises:
On the listing of registered apps, click on the Endpoints link.
On the following screen, you will see a list of endpoints associated with this Azure Active Directory APP. Scroll down to the OAUTH 2.0 TOKEN ENDPOINT area and click on the Copy icon to copy the endpoint URL to the clipboard.
Paste and save this URL in a text editor -- you will need it later.
To find the Application Id of the application, navigate to the overview of the registered app, hover over the Application Id and click on the Copy icon that will appear.
Paste and save the Application Id in a text editor -- you will need it later.
Find the Keys link in the Settings blade for the Registered App.
In the Keys blade, create and save a new Key:
When the authentication key is saved, a key value will be automatically generated. Copy this key, paste it to a text editor and save it -- you will need it later.
NOTE: The value of the key will not be visible after you leave the Keys blade - be sure to save it securely.
This completes the exercise!
Now, that the application has been created, let us grant it the necessary permissions to access the Azure Data Lake Store.
In the Azure Portal, navigate to the Azure Data Lake Store blade by typing in "Data Lake Store" in the search bar at the top of the page. Then, select Data Lake Store from the list of matching resources.
Select the Data Lake Store that you had created earlier.
In the Overview blade of the Data Lake Store, click on the Data Explorer link:
Select the root folder of your Azure Data Lake Store in the Data Explorer window.
Click on Access in the toolbar at the top of the screen.
In the Access blade, click on the + Add button.
Click on the Select User or Group link in the Assign Permissions blade.
Search for and select the Azure Active Directory application that you had registered earlier:
Click on the Select Permissions link in the Assign Permissions blade.
Specify the desired permissions:
Now, we can use the identity of the Azure Active Directory application that you had registered to view folder content and read files stored in the appropriate folder of the Azure Data Lake store.
This completes the exercise!
PolyBase is a technology that accesses data outside of the Azure SQL Data Warehouse via T-SQL. It is used to import/export data between Hadoop clusters, Azure Blob Storage, and Azure SQL Data Warehouse.
Open Azure SQL Data Warehouse and click on Query editor (preview) under Common Tasks.
The following message will appear describing the terms of the preview feature. Click the checkbox to accept the terms and then click OK.
Next, sign into the Azure SQL Data Warehouse using the Azure SQL Data Warehouse account from the previous exercise.
Once connected to the Azure SQL Data Warehouse, we can begin writing queries directly in the browser. The following T-SQL script will create a Master Key and Credential to securely connect to Azure SQL Data Warehouse.
NOTE: This exercise uses Application Id, OAuth 2.0 Token Endpoint, and Authentication Key that you have obtained in a previous exercise in this chapter.
CREATE MASTER KEY;
CREATE DATABASE SCOPED CREDENTIAL ADLCredential
WITH
IDENTITY =<EMAIL_ADDRESS>SECRET = '<authentication_key>'
;
-- The identity and secret should look similar to this example:
-- IDENTITY = '87815a3-4873-54fc-e8b1-789154591c0c2@https://login.microsoftonline.com/5b33523-95c5-61ac-a31b-7d0acd0ba8752/oauth2/token',
-- SECRET = 'GdeUjJsEJF7JdKFs+v5HSXyzOL+TkjzvNTxCsds3gWHN='
The next step is to create an external data source that points to the Azure Data Lake Store location, and accessed by using the credential created in the previous step.
CREATE EXTERNAL DATA SOURCE AzureDataLakeStore
WITH (
TYPE = HADOOP,
LOCATION = 'adl://<AzureDataLake account_name>.azuredatalakestore.net',
--For example: 'adl://myazurelakestorename.azuredatalakestore.net'
CREDENTIAL = ADLCredential
);
Next, we need to define the external file format for the PolyBase engine to process the data.
CREATE EXTERNAL FILE FORMAT DeviceTelemetryDelimitedText
WITH (
FORMAT_TYPE = DELIMITEDTEXT
,FORMAT_OPTIONS
(FIELD_TERMINATOR = ','
,STRING_DELIMITER = ''
,DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.fff'
,USE_TYPE_DEFAULT = FALSE
)
);
Now that the credential, data source, and file format have been created, we are ready to define the external table. When a T-SQL query referencing this external table is executed, the PolyBase engine will push down the call to the underlying file system.
CREATE EXTERNAL TABLE dbo.DeviceTelemetryExternal (
[DeviceId] [varchar](100) NULL,
[DateTime] [varchar](100) NULL,
[TempC] [numeric] NULL,
[RunTime] [int] NULL
)
WITH (
LOCATION='/device-operating-data/'
, DATA_SOURCE = AzureDataLakeStore
, FILE_FORMAT = DeviceTelemetryDelimitedText
,REJECT_TYPE = VALUE
,REJECT_VALUE = 100
);
Let us verify that we are able to read the data from the newly created external table by executing a simple SELECT statement:
SELECT TOP 100 *
FROM dbo.DeviceTelemetryExternal
While the PolyBase engine allows ad-hoc queries involving external tables, the best practice is to load external data into the native tables in the Azure SQL Data Warehouse. The next step will load external data from the Data Lake Store into Azure SQL Data Warehouse. We will use the Create Table as Select (CTAS) construct which is a parallelized operation that efficiently creates a table from a large dataset. When defining the query, the distribution can be defined that splits up the data across multiple nodes of the data warehouse. In the script below, the hash of the DeviceId column was selected to split the data across the storage nodes.
CREATE TABLE dbo.DeviceTelemetry
WITH (CLUSTERED COLUMNSTORE INDEX, DISTRIBUTION = HASH(DeviceId))
AS
SELECT
CAST([DeviceId] AS [varchar](100)) AS DeviceId,
CAST([DateTime] AS DATETIME2) AS DateTime,
CAST([TempC] AS [numeric]) AS TempC,
CAST([RunTime] AS [int]) AS RunTime
FROM dbo.DeviceTelemetryExternal
CREATE STATISTICS DeviceTelemetryDeviceIdStats on dbo.DeviceTelemetry(DeviceId);
Now, let's retrieve reference data describing each of the devices. We will retrieve reference data from KiZAN's blob storage account. Before we can access the data, let us create another database-scoped credential.
CREATE DATABASE SCOPED CREDENTIAL AzureStorageCredential
WITH
IDENTITY = 'AzureDWUser',
SECRET = '<azure_storage_account_key>' --This secret key will be provided to you during the workshop.
;
CREATE EXTERNAL DATA SOURCE AzureStorage
WITH (
TYPE = HADOOP,
LOCATION =<EMAIL_ADDRESS>CREDENTIAL = AzureStorageCredential
);
Now that the credentials to the Azure Storage Account have been created, let's create external tables and load the reference data.
CREATE EXTERNAL TABLE dbo.DeviceReferenceExternal (
[Device Id] [varchar](100) NULL,
[Motor Type] [varchar](100) NULL,
[Device Type] [varchar](100) NULL,
[Max Operating Temperature] numeric NULL,
[Production Date] [varchar](100) NULL,
[Overhaul Date] [varchar](100) NULL,
[Overhaul Run Time] int NULL,
[Maintenance Date] [varchar](100) NULL,
[Maintenance Run Time] int NULL
)
WITH (
LOCATION='/DeviceReferenceData.csv'
, DATA_SOURCE = AzureStorage
, FILE_FORMAT = DeviceTelemetryDelimitedText
,REJECT_TYPE = VALUE
,REJECT_VALUE = 100
);
Then, let's create a local table with device reference data. You will notice that this table with reference data is being distributed across storage nodes of the data warehouse in a manner similar to the distribution of the device telemetry data to help optimize join performance.
CREATE TABLE dbo.DeviceReference
WITH (DISTRIBUTION = HASH(DeviceId))
AS
SELECT
[Device Id] AS DeviceId,
[Motor Type] AS MotorType,
[Device Type] AS DeviceType,
([Max Operating Temperature] - 32)/1.8 AS MaxOperatingTemperatureC,
CAST([Production Date] AS date) AS ProductionDate,
CAST([Overhaul Date] AS date) AS OverhaulDate,
[Overhaul Run Time] AS OverhaulRunTime,
CAST([Maintenance Date] as date) AS MaintenanceDate,
[Maintenance Run Time] AS MaintenanceRunTime
FROM dbo.DeviceReferenceExternal
CREATE STATISTICS DeviceReferenceDeviceIdStats ON dbo.DeviceReference (DeviceId);
Finally, we will execute a query that will allow us to join telemetry data with reference data and retrieve the average, minimum and maximum temperatures, as well as the count of records for each combination of device type and motor type.
SELECT R.DeviceType,
R.MotorType,
COUNT(DISTINCT T.DeviceId) AS DistinctDevices,
COUNT(*) AS Observations,
AVG(T.TempC) AS AverageTemperatureC,
MIN(T.TempC) AS MinimumTemperatureC,
MAX(T.TempC) AS MaximumTemperatureC,
CAST(COUNT(CASE WHEN T.TempC > R.MaxOperatingTemperatureC THEN 1 END) AS numeric)/COUNT(*)
AS [ExcessiveTemperature%]
FROM dbo.DeviceTelemetry T
JOIN dbo.DeviceReference R
ON T.DeviceId = R.DeviceId
GROUP BY R.DeviceType,
R.MotorType
ORDER BY R.DeviceType,
R.MotorType
This completes the exercise!
Open Azure SQL Data Warehouse and click on Open in Power BI under Common Tasks.
You may be asked to enter your username and password to log into the Power BI service.
Note: Your credentials to the Power BI account may or may not be the same as your credentials to your Azure subscription.
During the next step, you will confirm the names of the Azure SQL Server and Database. Click Next to continue.
Enter the username and password for the Azure SQL Data Warehouse account that you had created earlier. Then press the Sign In button to connect to the Azure SQL Data Warehouse.
A new Power BI dataset connected to Azure SQL Data Warehouse will be created.
You will see a new report canvas that you will use to create a new report.
Start by creating a bar chart that summarizes average temperatures by device.
Now, let us enhance this chart by representing not only the average temperature, but also the volatility of temperatures for each device.
This completes the exercise!
Congratulations! You have successfully completed the workshop and have built an end-to-end real-time predictive maintenance solution using Azure Machine learning, IoT Hubs, Stream Analytics, and Power BI


Interface IShareClient
Namespace: Picturepark.SDK.V1.Contract
Syntax
public interface IShareClient
Methods
Aggregate(ShareAggregationRequest)
Aggregate
Declaration
ObjectAggregationResult Aggregate(ShareAggregationRequest request)
Parameters
|
ShareAggregationRequest
request
Aggregation request |
Returns
|
ObjectAggregationResult
AggregationResult |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
AggregateAsync(ShareAggregationRequest, CancellationToken)
Aggregate
Declaration
Task<ObjectAggregationResult> AggregateAsync(ShareAggregationRequest request, CancellationToken cancellationToken = null)
Parameters
|
ShareAggregationRequest
request
Aggregation request |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<ObjectAggregationResult>
AggregationResult |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
Create(ShareBaseCreateRequest)
Create - single
Declaration
CreateShareResult Create(ShareBaseCreateRequest request)
Parameters
|
ShareBaseCreateRequest
request
Polymorph create contract. Use either ShareBasicCreateRequest or ShareEmbedCreateRequest |
Returns
|
CreateShareResult
Create result |
Exceptions
|
ApiException
A server side error occurred. |
|
ContentNotFoundException
Submited content could not be found |
|
PermissionException
No permission to share |
|
PictureparkException
Internal server error |
CreateAsync(ShareBaseCreateRequest, CancellationToken)
Create - single
Declaration
Task<CreateShareResult> CreateAsync(ShareBaseCreateRequest request, CancellationToken cancellationToken = null)
Parameters
|
ShareBaseCreateRequest
request
Polymorph create contract. Use either ShareBasicCreateRequest or ShareEmbedCreateRequest |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<CreateShareResult>
Create result |
Exceptions
|
ApiException
A server side error occurred. |
|
ContentNotFoundException
Submited content could not be found |
|
PermissionException
No permission to share |
|
PictureparkException
Internal server error |
DeleteMany(IEnumerable<String>)
Delete - many
Declaration
BulkResponse DeleteMany(IEnumerable<string> ids)
Parameters
|
System.Collections.Generic.IEnumerable<System.String>
ids
A list of shareIds to delete. |
Returns
|
BulkResponse
BusinessProcess |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
DeleteManyAsync(IEnumerable<String>, CancellationToken)
Delete - many
Declaration
Task<BulkResponse> DeleteManyAsync(IEnumerable<string> ids, CancellationToken cancellationToken = null)
Parameters
|
System.Collections.Generic.IEnumerable<System.String>
ids
A list of shareIds to delete. |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<BulkResponse>
BusinessProcess |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
Get(String)
Get - single
Declaration
ShareDetail Get(string id)
Parameters
|
System.String
id
Share Id (not token, use PublicAccess to get share by token) |
Returns
|
ShareDetail
Polymorph share |
Exceptions
|
ApiException
A server side error occurred. |
|
ShareNotFoundException
Submited share could not be found |
|
PictureparkException
Internal server error |
GetAsync(String, CancellationToken)
Get - single
Declaration
Task<ShareDetail> GetAsync(string id, CancellationToken cancellationToken = null)
Parameters
|
System.String
id
Share Id (not token, use PublicAccess to get share by token) |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<ShareDetail>
Polymorph share |
Exceptions
|
ApiException
A server side error occurred. |
|
ShareNotFoundException
Submited share could not be found |
|
PictureparkException
Internal server error |
Search(ShareSearchRequest)
Search
Declaration
ShareSearchResult Search(ShareSearchRequest request)
Parameters
|
ShareSearchRequest
request
Search request |
Returns
|
ShareSearchResult
Share search result |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
SearchAsync(ShareSearchRequest, CancellationToken)
Search
Declaration
Task<ShareSearchResult> SearchAsync(ShareSearchRequest request, CancellationToken cancellationToken = null)
Parameters
|
ShareSearchRequest
request
Search request |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<ShareSearchResult>
Share search result |
Exceptions
|
ApiException
A server side error occurred. |
|
PictureparkException
Internal server error |
Update(String, ShareBaseUpdateRequest)
Update - single
Declaration
ShareDetail Update(string id, ShareBaseUpdateRequest updateRequest)
Parameters
|
System.String
id
The share id. |
|
ShareBaseUpdateRequest
updateRequest
The share update request. |
Returns
|
ShareDetail
Share |
Exceptions
|
ApiException
A server side error occurred. |
|
BusinessProcessWaitTimeoutException
A server side error occurred. |
|
PictureparkException
Internal server error |
UpdateAsync(String, ShareBaseUpdateRequest, CancellationToken)
Update - single
Declaration
Task<ShareDetail> UpdateAsync(string id, ShareBaseUpdateRequest updateRequest, CancellationToken cancellationToken = null)
Parameters
|
System.String
id
The share id. |
|
ShareBaseUpdateRequest
updateRequest
The share update request. |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
|
System.Threading.Tasks.Task<ShareDetail>
Share |
Exceptions
|
ApiException
A server side error occurred. |
|
BusinessProcessWaitTimeoutException
A server side error occurred. |
|
PictureparkException
Internal server error |


{% load static %}
Success!
Your vote has been successfully casted !
Click on OK button and You will be logged out of the system automatically...
OK


Denina is a library intended to allow sandboxed scripting for CMS editors.
Denina was created and is maintained by Deane Barker.
Follow Denina on Twitter: @DeninaScript.


Viz for Condition vs Age vs Gender
Condition
Selected:
reset
Age
Selected:
reset
Gender
Selected:
reset


[§124A-82] Maximum limits. The punishment which a court-martial may direct for an offense may not exceed limits prescribed by this chapter. [L 1982, c 171, pt of §2]


Use chrome.devtools.inspectedWindow
to interact with the inspected window:
obtain the tab ID for the inspected page,
evaluate the code in the context of inspected window,
reload the page,
or obtain the list of resources within the page.
See DevTools APIs summary for general introduction to using Developer Tools APIs.
The $(ref:devtools.inspectedWindow.tabId tabId)
property
provides the tab identifier that you can use with the
chrome.tabs.*
API calls.
However, please note that chrome.tabs.*
API is not
exposed to the Developer Tools extension pages due to security considerations
— you will need to pass the tab ID to the background page and invoke
the chrome.tabs.*
API functions from there.
The reload
method may be used to reload the inspected page.
Additionally, the caller can specify an override for the user agent string,
a script that will be injected early upon page load, or an option to force
reload of cached resources.
Use the getResources
call and the onResourceContent
event to obtain the list of resources (documents, stylesheets, scripts, images
etc) within the inspected page. The getContent
and setContent
methods of the Resource
class along with the
onResourceContentCommitted
event may be used to support
modification of the resource content, for example, by an external editor.
The eval
method provides the ability for extensions to execute
JavaScript code in the context of the inspected page.
This method is powerful when used in the right context
and dangerous when used inappropriately.
Use the $(ref:tabs.executeScript)
method
unless you need the specific functionality
that the eval
method provides.
Here are the main differences between the
eval
and tabs.executeScript
methods:
eval
method does not
use an isolated world for the code being evaluated, so the JavaScript state
of the inspected window is accessible to the code.
Use this method when access to the JavaScript state of the inspected page
is required.
inspect
and $0
.
Important:
Due to the security considerations explained above, the
$(ref:tabs.executeScript)
method is the preferred way for an
extension to access DOM data of the inspected page in cases where the access to
JavaScript state of the inspected page is not required.
Note that a page can include multiple different JavaScript execution contexts. Each frame has its own context, plus an additional context for each extension that has content scripts running in that frame.
By default, the eval
method executes in the context of the main frame of the
inspected page.
The eval
method takes an optional second argument that you can use to specify
the context in which the code is evaluated. This options object can contain one or more of the
following keys:
frameURL
contextSecurityOrigin
useContentScriptContext
The following code checks for the version of jQuery used by the inspected page:
chrome.devtools.inspectedWindow.eval( "jQuery.fn.jquery", function(result, isException) { if (isException) console.log("the page is not using jQuery"); else console.log("The page is using jQuery v" + result); } );
You can find more examples that use Developer Tools APIs in Samples.


We visualize bitcoin!
- optimize interactive partnerships
- benchmark vertical convergence
- unleash innovative communities
- grow proactive supply-chains
- seize end-to-end web-readiness
- envisioneer clicks-and-mortar experiences
- target holistic relationships
- maximize interactive web services
- synthesize customized bandwidth
- reinvent real-time metrics
- empower compelling bandwidth
- redefine out-of-the-box relationships
- engineer real-time synergies
- drive sexy e-services
- synergize end-to-end networks


Barrier Reef Orchestra
PO Box 576, Townsville Qld 4810
p: +61 7 47 222 789
e<EMAIL_ADDRESS>Barrier Reef Orchestra encourages you to contact us either via phone or email for any queries you may have.
Barrier Reef Orchestra
PO Box 576, Townsville Qld 4810
p: +61 7 47 222 789
e: brotownsville@gmail.com


Here where you can:
This Web application is made using Angular CLI application and built with .Net Core.


CONTACT & SUPPORT:
+1800 1234 5678
|
CONTACT US
|
HELP
All Categories
Technology
|
MY ACCOUNT
|
TRACK ORDER
|
LOGIN
0
SHOP EVERYTHING
FASHION STORE
BOOKS & MEDIA
CLEARANCE SALES
MOBILE PHONES
FREE SHIPPING
In Order Min $200
30-DAY RETURNS
Money Back Guarantee
24/7 SUPPORT
Lifestyme Support
TODAY'S DEALS
END IN
01
:
15
:
41
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Go quickly to
Mobiles
:
Sports
:
Tablets
:
Bath Towels
:
LED Bulbs
:
TV
:
Washing Machines
:
Laptops
:
Headphones
:
Fans
:
Travel
:
Books
20% off on Mobiles & more.*

Bags and Wallets
Belts
Bootees
Cold Weather
Jewelry
Ties and Hats
20% off activewear & more.*
Bras
Hair Accessories
Hats and Gloves
Lifestyle
Scarves
Small Leathers
Leatest products
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Clearance Sale
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Your Recently Viewed items
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
Samsung 16GB MicroSD Class 6
Rs499
[30% OFF]
Rs 350
FREE SHIPPING
In Order Min Rs.500
30-DAY RETURNS
Money Back Guarantee
24/7 SUPPORT
Call +1800 1234 567
Copyright © 2015 mocart.com All rights reserved.


Dialogflow v1 & v2 for Flutter apps.
A new Flutter package.
Installation
- Add this to your package's pubspec.yaml file:
dependencies:
flutter_dialogflow: ^0.1.0
- You can install packages from the command line: with Flutter:
$ flutter packages get
- Dialogflow v1 Import it Now in your Dart code, you can use:
import 'package:flutter_dialogflow/flutter_dialogflow.dart';
- Or Dialogflow v2 Import it Now in your Dart code, you can use:
import 'package:flutter_dialogflow/dialogflow_v2.dart';
Usage
Dialogflow v2
- Dialogflow](https://dialogflow.com/) register and create new Agent
- Project Setup and Authentication
- First of all, we need to create a Google Cloud Platform Project using Console Google Cloud
- Create or select an existing GCP project.
- From the GCP console, go to APIs and Services and click on credentials.
- Click on Create credentials and choose Service account key.
- Select your service account from the dropdown, choose JSON and click Create. This will download the JSON key to your computer. Save it securely.
- We downloaded a JSON file with all our data.
- In your project create folder assets(folder name recommended optional)
- Move file json in your project in folder created
- open file pubspec.yaml
flutter:
uses-material-design: true
assets:
- assets/your_file_downloaded_google_cloud.json
- Import dialogflow_v2
import 'package:flutter_dialogflow/dialogflow_v2.dart';
- Code
AuthGoogle authGoogle = await AuthGoogle(fileJson: "Asset Your File Json").build();
// Select Language.ENGLISH or Language.SPANISH or others...
Dialogflow dialogflow =Dialogflow(authGoogle: authGoogle,language: Language.ENGLISH);
AIResponse response = await dialogflow.detectIntent("Your Query");
- Example
AuthGoogle authGoogle = await AuthGoogle(fileJson: "assets/your_file_downloaded_google_cloud.json").build();
Dialogflow dialogflow = Dialogflow(authGoogle: authGoogle,language: Language.ENGLISH);
AIResponse response = await dialogflow.detectIntent("Hi!!!");
print(response.getMessage())
- Or Get List Message type Card
Call function response.getListMessage()
response List<dynamic>
example
new CardDialogflow(response.getListMessage()[0]).title
Convert first item in CardDialogflow for worked easy
CardDialogflow have
- title
- subtitle
- imageUri
- List buttons
- each button have text and postback
Dialogflow v1
- Dialogflow register and create new Agent
- Copy Api key (Token)
- Code
Dialogflow dialogflow = Dialogflow(token: "Your Token");
AIResponse response = await dialogflow.sendQuery("Your Query");
- Example
void Response(query) async {
Dialogflow dialogflow = Dialogflow(token: "10178f9cb6cf12321asdf4aae75c87cd");
AIResponse response = await dialogflow.sendQuery(query);
print(response.getMessageResponse());
}
Getting Started
For help getting started with Flutter, view our online documentation.
For help on editing package code, view the documentation.


All items available on Pre-order
T E R R A
Woodfire Platter
Blue Slate Mugs
Moonshine Bowls
Ocean Spray Bowls
Silver Oak Mugs
Shibori Bowl
Autumn Leaves Bowls
Jade Blossom Mugs
Yin and Yang Bowls
Mirage Platter
Jade Textured Mugs
Blue Temboku Bowls
Acacia Platter
Akira Vase
Aqua Indented Bowl
Leaf Imprinted Bottle


78
Tell the Coming Generation
A MASKIL OF ASAPH.
1 Give ear, O my people, to my teaching;
incline your ears to the words of my mouth!
2 I will open my mouth in a parable;
I will utter dark sayings from of old,
3 things that we have heard and known,
that our fathers have told us.
4 We will not hide them from their children,
but tell to the coming generation
the glorious deeds of the LORD, and his might,
and the wonders that he has done.
5 He established a testimony in Jacob
and appointed a law in Israel,
which he commanded our fathers
to teach to their children,
6 that the next generation might know them,
the children yet unborn,
and arise and tell them to their children,
7 so that they should set their hope in God
and not forget the works of God,
but keep his commandments;
8 and that they should not be like their fathers,
a stubborn and rebellious generation,
a generation whose heart was not steadfast,
whose spirit was not faithful to God.
9 The Ephraimites, armed with the bow,
turned back on the day of battle.
10 They did not keep God's covenant,
but refused to walk according to his law.
11 They forgot his works
and the wonders that he had shown them.
12 In the sight of their fathers he performed wonders
in the land of Egypt, in the fields of Zoan.
13 He divided the sea and let them pass through it,
and made the waters stand like a heap.
14 In the daytime he led them with a cloud,
and all the night with a fiery light.
15 He split rocks in the wilderness
and gave them drink abundantly as from the deep.
16 He made streams come out of the rock
and caused waters to flow down like rivers.
17 Yet they sinned still more against him,
rebelling against the Most High in the desert.
18 They tested God in their heart
by demanding the food they craved.
19 They spoke against God, saying,
“Can God spread a table in the wilderness?
20 He struck the rock so that water gushed out
and streams overflowed.
Can he also give bread
or provide meat for his people?”
21 Therefore, when the LORD heard, he was full of wrath;
a fire was kindled against Jacob;
his anger rose against Israel,
22 because they did not believe in God
and did not trust his saving power.
23 Yet he commanded the skies above
and opened the doors of heaven,
24 and he rained down on them manna to eat
and gave them the grain of heaven.
25 Man ate of the bread of the angels;
he sent them food in abundance.
26 He caused the east wind to blow in the heavens,
and by his power he led out the south wind;
27 he rained meat on them like dust,
winged birds like the sand of the seas;
28 he let them fall in the midst of their camp,
all around their dwellings.
29 And they ate and were well filled,
for he gave them what they craved.
30 But before they had satisfied their craving,
while the food was still in their mouths,
31 the anger of God rose against them,
and he killed the strongest of them
and laid low the young men of Israel.
32 In spite of all this, they still sinned;
despite his wonders, they did not believe.
33 So he made their days vanish like a breath,
and their years in terror.
34 When he killed them, they sought him;
they repented and sought God earnestly.
35 They remembered that God was their rock,
the Most High God their redeemer.
36 But they flattered him with their mouths;
they lied to him with their tongues.
37 Their heart was not steadfast toward him;
they were not faithful to his covenant.
38 Yet he, being compassionate,
atoned for their iniquity
and did not destroy them;
he restrained his anger often
and did not stir up all his wrath.
39 He remembered that they were but flesh,
a wind that passes and comes not again.
40 How often they rebelled against him in the wilderness
and grieved him in the desert!
41 They tested God again and again
and provoked the Holy One of Israel.
42 They did not remember his power
or the day when he redeemed them from the foe,
43 when he performed his signs in Egypt
and his marvels in the fields of Zoan.
44 He turned their rivers to blood,
so that they could not drink of their streams.
45 He sent among them swarms of flies, which devoured them,
and frogs, which destroyed them.
46 He gave their crops to the destroying locust
and the fruit of their labor to the locust.
47 He destroyed their vines with hail
and their sycamores with frost.
48 He gave over their cattle to the hail
and their flocks to thunderbolts.
49 He let loose on them his burning anger,
wrath, indignation, and distress,
a company of destroying angels.
50 He made a path for his anger;
he did not spare them from death,
but gave their lives over to the plague.
51 He struck down every firstborn in Egypt,
the firstfruits of their strength in the tents of Ham.
52 Then he led out his people like sheep
and guided them in the wilderness like a flock.
53 He led them in safety, so that they were not afraid,
but the sea overwhelmed their enemies.
54 And he brought them to his holy land,
to the mountain which his right hand had won.
55 He drove out nations before them;
he apportioned them for a possession
and settled the tribes of Israel in their tents.
56 Yet they tested and rebelled against the Most High God
and did not keep his testimonies,
57 but turned away and acted treacherously like their fathers;
they twisted like a deceitful bow.
58 For they provoked him to anger with their high places;
they moved him to jealousy with their idols.
59 When God heard, he was full of wrath,
and he utterly rejected Israel.
60 He forsook his dwelling at Shiloh,
the tent where he dwelt among mankind,
61 and delivered his power to captivity,
his glory to the hand of the foe.
62 He gave his people over to the sword
and vented his wrath on his heritage.
63 Fire devoured their young men,
and their young women had no marriage song.
64 Their priests fell by the sword,
and their widows made no lamentation.
65 Then the Lord awoke as from sleep,
like a strong man shouting because of wine.
66 And he put his adversaries to rout;
he put them to everlasting shame.
67 He rejected the tent of Joseph;
he did not choose the tribe of Ephraim,
68 but he chose the tribe of Judah,
Mount Zion, which he loves.
69 He built his sanctuary like the high heavens,
like the earth, which he has founded forever.
70 He chose David his servant
and took him from the sheepfolds;
71 from following the nursing ewes he brought him
to shepherd Jacob his people,
Israel his inheritance.
72 With upright heart he shepherded them
and guided them with his skillful hand.


"The cave you fear to enter holds the treasure you seek"
- Joseph Campbell
Welcome to my world! My name is Mark Warness and once you meet me you will never forget me. I am fairly new to the tech scene but definitely not the creative one. I spent the first decade of adulthood diving deep into life, exploring every conceivable curiosity in the process of discovering exactly the person I want to be. Through my professional endeavors some would say I am a 'jack of all trades'. From finance to medicine, construction to entertainment, hospitality to interior design, I'd have to agree. I left no stone unturned. When I stumbled into web development and design in 2018, I knew my journey had finally come to an end... and the start of the rest of my life was about to begin.
You've been warned!A dollop of inspiration. A dash of wit. A ton of weirdness .
Like what you see? Have a project you need completed? Interested in collaborating? Think I'm cute and need a plus one to your cousins wedding? Contact me through any of the links below and I will get back to you ASAP!
Currently still under construction so please come back soon!


Buhari’s third term: APC to expel member calling for Constitutional amendment
by Lukman ABOLADEAdvertisement
THE All Progressives Congress (APC) has promised to expel a ‘self-proclaimed’ party member, Charles Enya who called for a constitutional amendment to enable Nigeria President, Muhammadu Buhari run for a third term in office.
In a press statement signed by the National Publicity Secretary, Lanre Issa-Onilu, he wrote that the party is currently trying to find out the status of Enya who claimed to be a party member and if he is, they shall promptly commence the process of expelling him from the party.
He added that the person in question is a new enemy of the country and is most likely being sponsored by the desperate and misguided opposition.
“As a party, we would not take kindly to anyone or group causing an unnecessary distraction for this administration through anti-democratic actions,” he wrote
Advertisement
He said the party is focused on revamping Nigeria’s moribund infrastructure, growing the economy, fighting corruption, creating the right environment for teeming youths to deploy their creative energies, and providing adequate security for all Nigerians.
Onilu said besides that, at the last National Executive Committee (NEC) meeting of the Party, President Buhari didn’t mince words and he is not the type that talks tongue-in-cheek.
The statement further read that Buhari outrightly said he would abide by the constitution and uphold the oath of office he took, swearing by the holy book he believes in adding that he said his advanced age has made such an idea beyond his contemplation.
“The president said history would not be fair to members, if the APC collapses after his second term. What better proof is required of the President’s resolve to abide by the constitution on term limit?,” Onilu added.
He said, however, the Party is, by this statement sending a strong signal to such other busybodies like Charles Enya who may be contemplating testing the resolve of our government on our mission to work for the best for our country to be ready to face the law.


Planner is now also listed at NexusMods, leave a comment and endorse!
Also don't forget our Facebook group!
If you have any problems / issues / feature requests, don't hesitate to contact me


"Liiper is
a representation
of a students mind
adolscent
multifaceted
and
friendly
"
The name LIIPER (and not Lipper)is derived from the institutes name IIPS.The character appears in Liips a monthly magazine for the institute


{% extends "wagtailadmin/base.html" %} {% block titletag %}Unpublish {{ page.title }}{% endblock %} {% block bodyclass %}menu-explorer{% endblock %} {% block content %} {% include "wagtailadmin/shared/header.html" with title="Unpublish" subtitle=page.title %}
Are you sure you want to unpublish this page?


This plugin provides access to the device's compass. The compass is a sensor that detects the direction or heading that the device is pointed, typically from the top of the device. It measures the heading in degrees from 0 to 359.99, where 0 is north.
Toggle to stop/start orientation watch.
Get Current for one-time orientation reading.
magneticHeading:
trueHeading:
headingAccuracy:


Bangladesh train collision kills 15, toll could rise
DHAKA, Nov 12 — Rescuers in Bangladesh were battling today to pull passengers from mangled wreckage after a head-on collision of two trains killed at least 15 people and injured more than 40, officials said.
A train heading for the southern port city of Chittagong and one bound for Dhaka collided at around 3am (2100 GMT) in Brahmanbaria, about 100 km east of the capital, crumpling three compartments of the Chittagong-bound train.
“So far, 15 bodies have been recovered,” district official Hayat Ud Dowlah Khan told Reuters by telephone from the accident site, warning that the toll could rise during the rescue, mounted by fire, police, border guard and army officials.
“More than 40 injured people have been admitted in hospitals,” Khan said, adding that some were in critical condition.
Most passengers were asleep at the time of the crash.
“Suddenly there was a big bang. I saw people were screaming,” a passenger of the Dhaka-bound train said in television images from the site.
It was not immediately clear how the two trains came to be on the same track, and the government has ordered an investigation.
“One of the trains might have broken the signal, leading to the tragedy,” one police official, Shayamal Kanti Das, told reporters.
Railway accidents in Bangladesh happen relatively frequently, many at unsupervised crossings, and also because of the poor condition of tracks. — Reuters


| 1 | package fr.sii.ogham.core.condition; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | ||
| 5 | import fr.sii.ogham.core.util.StringUtils; | |
| 6 | ||
| 7 | /** | |
| 8 | * Condition that provides a logical AND operation on manipulated conditions. | |
| 9 | * | |
| 10 | * @author Aurélien Baudet | |
| 11 | * | |
| 12 | * @param <T> | |
| 13 | * the type of the object to test | |
| 14 | */ | |
| 15 | public class AndCondition<T> extends CompositeCondition<T> { | |
| 16 | ||
| 17 | /** | |
| 18 | * Initializes the {@code and} operator with none, one or several | |
| 19 | * sub-conditions. | |
| 20 | * | |
| 21 | * <pre> | |
| 22 | * Condition<String> condition1 = ... | |
| 23 | * Condition<String> condition2 = ... | |
| 24 | * AndCondition<String> myCondition = new AndCondition<>(condition1, condition2); | |
| 25 | * </pre> | |
| 26 | * | |
| 27 | * Has the same effect as: | |
| 28 | * | |
| 29 | * <pre> | |
| 30 | * Condition<String> condition1 = ... | |
| 31 | * Condition<String> condition2 = ... | |
| 32 | * AndCondition<String> myCondition = new AndCondition<>(); | |
| 33 | * myCondition.and(condition1); | |
| 34 | * myCondition.and(condition2); | |
| 35 | * </pre> | |
| 36 | * | |
| 37 | * @param conditions | |
| 38 | * the conditions to register (order is important) | |
| 39 | */ | |
| 40 | @SafeVarargs | |
| 41 | public AndCondition(Condition<T>... conditions) { | |
| 42 | super(conditions); | |
| 43 | } | |
| 44 | ||
| 45 | /** | |
| 46 | * Initializes the {@code and} operator with none, one or several | |
| 47 | * sub-conditions. The list must not be null. | |
| 48 | * | |
| 49 | * @param conditions | |
| 50 | * the conditions to register (order is important) | |
| 51 | */ | |
| 52 | public AndCondition(List<Condition<T>> conditions) { | |
| 53 | super(conditions); | |
| 54 | } | |
| 55 | ||
| 56 | @Override | |
| 57 | public boolean accept(T obj) { | |
| 58 | for (Condition<T> condition : getConditions()) { | |
| 59 | // if the condition rejects the object => stop now | |
| 60 |
1
1. accept : negated conditional → RUN_ERROR |
if (!condition.accept(obj)) { |
| 61 |
1
1. accept : replaced boolean return with true for fr/sii/ogham/core/condition/AndCondition::accept → RUN_ERROR |
return false; |
| 62 | } | |
| 63 | } | |
| 64 | // none condition has rejected the object => it is accepted | |
| 65 |
1
1. accept : replaced boolean return with false for fr/sii/ogham/core/condition/AndCondition::accept → RUN_ERROR |
return true; |
| 66 | } | |
| 67 | ||
| 68 | /** | |
| 69 | * Adds a condition to the current condition. For example: | |
| 70 | * | |
| 71 | * <pre> | |
| 72 | * AndCondition<String> myCondition = new AndCondition<>(); | |
| 73 | * myCondition.and(new FixedCondition<>(true)); | |
| 74 | * myCondition.apply("foo"); // will always return true | |
| 75 | * | |
| 76 | * myCondition.and(new FixedCondition<>(false)); | |
| 77 | * myCondition.apply("foo"); // will always return false | |
| 78 | * </pre> | |
| 79 | * | |
| 80 | * The returned instance is the same as {@code myCondition} so you can also | |
| 81 | * write this: | |
| 82 | * | |
| 83 | * <pre> | |
| 84 | * AndCondition<String> myCondition = new AndCondition<>(); | |
| 85 | * myCondition = myCondition.and(new FixedCondition<>(true)); | |
| 86 | * myCondition.apply("foo"); // will always return true | |
| 87 | * | |
| 88 | * myCondition = myCondition.and(new FixedCondition<>(false)); | |
| 89 | * myCondition.apply("foo"); // will always return false | |
| 90 | * </pre> | |
| 91 | * | |
| 92 | * | |
| 93 | * @param condition | |
| 94 | * the condition to add | |
| 95 | * @return this instance for fluent chaining | |
| 96 | */ | |
| 97 | public AndCondition<T> and(Condition<T> condition) { | |
| 98 | addCondition(condition); | |
| 99 |
1
1. and : replaced return value with null for fr/sii/ogham/core/condition/AndCondition::and → RUN_ERROR |
return this; |
| 100 | } | |
| 101 | ||
| 102 | /** | |
| 103 | * Adds several conditions at once to the current condition. This can be | |
| 104 | * useful when you register each sub-condition into a list: | |
| 105 | * | |
| 106 | * <pre> | |
| 107 | * List<Condition<String>> conditions = new ArrayList<>(); | |
| 108 | * conditions.add(...); | |
| 109 | * conditions.add(...); | |
| 110 | * AndCondition<String> myCondition = new AndCondition<>(); | |
| 111 | * myCondition.and(conditions); | |
| 112 | * </pre> | |
| 113 | * | |
| 114 | * @param conditions | |
| 115 | * the list of conditions to register | |
| 116 | * @return this instance for fluent chaining | |
| 117 | */ | |
| 118 | public AndCondition<T> and(List<Condition<T>> conditions) { | |
| 119 | addConditions(conditions); | |
| 120 |
1
1. and : replaced return value with null for fr/sii/ogham/core/condition/AndCondition::and → NO_COVERAGE |
return this; |
| 121 | } | |
| 122 | ||
| 123 | @Override | |
| 124 | public String toString() { | |
| 125 |
1
1. toString : replaced return value with "" for fr/sii/ogham/core/condition/AndCondition::toString → NO_COVERAGE |
return "{" + StringUtils.join(conditions, "} and {") + "}"; |
| 126 | } | |
| 127 | } | |
Mutations | ||
| 60 |
1.1 |
|
| 61 |
1.1 |
|
| 65 |
1.1 |
|
| 99 |
1.1 |
|
| 120 |
1.1 |
|
| 125 |
1.1 |


Source code for segregation.network.network
"""Calculate street network-based segregation measures."""
__author__ = "Elijah Knaap<EMAIL_ADDRESS>Renan X. Cortes<EMAIL_ADDRESS>and Sergio J. Rey<EMAIL_ADDRESS>import numpy as np
import pandas as pd
from warnings import warn
from segregation.util import project_gdf
import os
import sys
# This class allows us to hide the diagnostic messages from urbanaccess if the `quiet` flag is set
class _HiddenPrints: # from https://stackoverflow.com/questions/8391411/suppress-calls-to-print-python
def __enter__(self):
self._original_stdout = sys.stdout
sys.stdout = open(os.devnull, 'w')
def __exit__(self, exc_type, exc_val, exc_tb):
sys.stdout.close()
sys.stdout = self._original_stdout
[docs]def get_osm_network(geodataframe, maxdist=5000, quiet=True, **kwargs):
"""Download a street network from OSM.
Parameters
----------
geodataframe : geopandas.GeoDataFrame
geopandas.GeoDataFrame of the study area.
Coordinate system should be in WGS84
maxdist : int
Total distance (in meters) of the network queries you may need.
This is used to buffer the network to ensure theres enough to satisfy
your largest query, otherwise there may be edge effects.
quiet: bool
If True, diagnostic messages from urbanaccess will be suppressed
**kwargs : dict
additional kwargs passed through to
urbanaccess.ua_network_from_bbox
Returns
-------
pandana.Network
A pandana Network instance for use in accessibility calculations or
spatial segregation measures that include a distance decay
"""
try:
import pandana as pdna
from urbanaccess.osm.load import ua_network_from_bbox
except ImportError:
raise ImportError(
"You need pandana and urbanaccess to work with segregation's network module\n"
"You can install them with `pip install urbanaccess pandana` "
"or `conda install -c udst pandana urbanaccess`")
gdf = geodataframe.copy()
gdf = project_gdf(gdf)
gdf = gdf.buffer(maxdist)
bounds = gdf.to_crs(epsg=4326).total_bounds
if quiet:
print('Downloading data from OSM. This may take awhile.')
with _HiddenPrints():
net = ua_network_from_bbox(bounds[1], bounds[0], bounds[3],
bounds[2], **kwargs)
else:
net = ua_network_from_bbox(bounds[1], bounds[0], bounds[3], bounds[2],
**kwargs)
print("Building network")
network = pdna.Network(net[0]["x"], net[0]["y"], net[1]["from"],
net[1]["to"], net[1][["distance"]])
return network
[docs]def calc_access(geodataframe,
network,
distance=2000,
decay="linear",
variables=None,
precompute=True):
"""Calculate access to population groups.
Parameters
----------
geodataframe : geopandas.GeoDataFrame
geodataframe with demographic data
network : pandana.Network
pandana.Network instance. This is likely created with `get_osm_network`
or via helper functions from OSMnet or UrbanAccess.
distance : int
maximum distance to consider `accessible` (the default is 2000).
decay : str
decay type pandana should use "linear", "exp", or "flat"
(which means no decay). The default is "linear".
variables : list
list of variable names present on gdf that should be calculated
precompute: bool (default True)
whether pandana should precompute the distance matrix. It can only be
precomputed once, so If you plan to pass the same network to this
function several times, you should set precompute=False for later runs
Returns
-------
pandas.DataFrame
DataFrame with two columns, `total_population` and `group_population`
which represent the total number of each group that can be reached
within the supplied `distance` parameter. The DataFrame is indexed
on node_ids
"""
if precompute:
network.precompute(distance)
geodataframe["node_ids"] = network.get_node_ids(geodataframe.centroid.x,
geodataframe.centroid.y)
access = []
for variable in variables:
network.set(geodataframe.node_ids,
variable=geodataframe[variable],
name=variable)
access_pop = network.aggregate(distance,
type="sum",
decay=decay,
name=variable)
access.append(access_pop)
names = ["acc_" + variable for variable in variables]
access = pd.DataFrame(dict(zip(names, access)))
return access


NFL Insider Has Update On Chiefs Star WR Tyreek Hill
by Chris RosvoglouFans in Kansas City held their breath when Tyreek Hill left Monday night’s game with a hamstring injury. Even though he missed all of the second half against the Los Angeles Chargers, it appears his latest injury isn’t too serious.
Earlier this season, the talented wideout missed several games because of a shoulder injury. His return to the team has helped open up the offense in ways they couldn’t before.
Kansas City struggled to push the ball down the field without him this past Monday. It would be a huge blow to the offense if he couldn’t suit up in Week 13 against the Oakland Raiders, but it’s possible he’s ready for that AFC West matchup.
According to NFL Network insider Ian Rapoport, the Chiefs believe Hill’s hamstring injury is minor.
The team is listing him as day-to-day and believes there is a chance he doesn’t miss any time.
Hill reportedly wanted to go back in the game against the Chargers, but the coaching staff wanted to be cautious with their All-Pro wide receiver.
Hill has 33 receptions for 543 yards and five touchdowns this year.
With the playoffs less than two months away, the Chiefs are going to need Hill on the field if they want to make yet another run in the AFC.


Game score: 0
Game speed: 100%
Play
Pause
Stop
Download
Upload
Delete
ID
Score
State
Play
Pause
Stop
Grid
Car lines
Hide car
French mode
Immortal


000 Melwood Ave Pittsburgh, PA 15213
<EMAIL_ADDRESS>+1<PHONE_NUMBER>
We have excellent designers to custom better stampers just for you!


--- layout: default ---
I am a freelance researcher in Mathematics and Computer Science. After a Ph.D. in Number Theory at the University of Lorraine under the supervision of Cécile Dartyge, I am currently working on Cryptoanalysis, Machine Learning and Optimization and the eventual interactions between these fields.


CattyBoard Top 100 Single Charts (11.06.36)
Unknown Artist
2016 . charts . 100 songs
Play all
Add to
More
-
1. One Dance
Crake feat CatKid & Cyla
2:54
CATTY CLOUD SYNC
-
2.Panda
Cattee
4:06
CATTY CLOUD SYNC
-
3. Can't Stop the Feeling!
Catin Cimberlake
3:56
CATTY CLOUD SYNC
-
4. Work From Home
Cat Harmony feat Colla
3:34
CATTY CLOUD SYNC


Hi [NAME],
Thank you for your interest in learning more about Rythmia Life Advancement Center and entering for a chance to win a 7-night stay at our luxury resort and retreat center in Costa Rica. The winner will be randomly selected and announced in next month's newsletter. Winner is notified via the email address provided at time of entry. We run this sweepstakes monthly, so please share this chance with friends and family who you believe would be interested.
You will receive a separate email containing registration instructions for the aftercare portal:
Please let us know if you have any questions, and once again welcome to Rythmia Life!
Have a peaceful day,
The Rythmia Life Team
d


This is line one, try to make page width very small
Same with line 2
------
Simple list in a table. This table cell may wrap.
Second column, unimportant
List in a table, this cell should not wrap
Second column, unimportant


| DOSE: |
1 repeated |
oral |
MDMA |
(pill / tablet) |
Back in 2000 - 2001 I was an extremely heavy user of xtc and its related sister substances. While reading the 'loss of magic' reports I thought my experience/s may well be helpful to some people. Throughout these two years I would have consumed xtc well over 300 times, so much so, that it is impossible to give a definitive number of usages. I loved xtc to such an extent I neglected my life completely, losing most of my friends in the process. With larger (absurd amounts - such as 18 pills in a 36 hour period) and more frequent doses (during the week as well as weekends) I did definitely notice a sharp drop in the 'magic' people speak of.
After my life completely disintergrated, I was also left with psychological issues such as anxiety, on-going hallucinations, and a distinct paranoia that was related to embarressing situations that plagued my memory concerning the way I acted while under the influence. ie. I didn't want to leave my house in case I saw the people who had witnessed my 'crazyness'. I still continued to use xtc occasionally, hoping for a return to the former glory that I used to experience, but on these occasions, I merely experienced a high that was no where near enjoyable. All positive experiences had been replaced with negative ones, I was basically wearing a mask of sanity that was constantly slipping with each dose. It would also take me days to recover, where I was lost in a world of thought, where I was depressed to such a point that it was difficult not to cry in every moment.
So I stopped my relationship with xtc, and set about fixing my life. I had degenerated to such a point that I was working in a factory and was pretty much suicidal all of the time. (I once tore enormous chunks of hair from my head, while screaming about how terrible my life was).
So anyway, after getting my feet back on the ground (literally), I returned to my studies and found a job that was much better than working with a bunch of yokels, with the combined IQ of a seven-year-old, in a factory. It was so difficult to intergrate myself into new situations however, and for the first few weeks of any new experience (returning to university for example) I'd be plagued by serious anxiety. I'd have to use every ounce of my will just to stay in the classroom, constantly telling myself it was okay....
Well that was four years ago now, and after much hard effort and determination with meditation, finding people who could understand my mindstate (friends, not mental health professionals, these experiences are totally subjective, you and only you can fix these issues), and also through the occasional use (not abuse) of psilocybin mushrooms, I totally regained control over myself and my life again. I do have to admit that I am a much wiser more creative person for going through what I did, but I definitely wouldn't recommend this path to anybody.
Back onto the topic of xtc. I am now in a loving relationship with a great girl (during my downfall I had my heart broken, which definitely contributed to my terrible state of mind) and the other night we had xtc together. It was the first time i'd dosed since I'd experienced all of the negativity that can surround this glorious substance, and yes, I was a little nervous. But I stayed with the moment (I can't stress how important not thinking is with any psychodelic experience), the music, and my girl, and I did have a full return to the land of 'magic' that xtc CAN transport you to. The pill I consumed was of average quality, yet I still had an extremely positive experience, with little to no comedown.
Perhaps it's because I'm much older, and understand myself to a much fuller degree, but I can definitively state that there can be a return of the 'magic' once it has been lost. I suggest following Dr. Leary's guide of 'set and setting' with even the milder psychodelics such as xtc, and the experience should be rewarding. I'm just happy to have my old friend back, but I will never, never, never abuse her again, for even though she can make me feel very, very good, if I go into the experience with a bad 'set and setting' (or negative psychological issues of any kind) and abuse her, I will suffer. I hope that this has been informative.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Some terms used
| [ROOT] | this is referred to your project root directory/folder. e.g. /var/www/MyProject/ |
|---|---|
| abcd.123456.com | this is example of your website domain and sub-domain. You can just use "localhost" if you haven't set your domain yet. |
| opened folder (click on it to close) | |
| closed folder (click on it to opem) |


Mdaktari
Griffin Muteti
Logout
My Dashboard
My Account
My Appointments
My Reviews
PERSONAL INFORMATION
NAME
Griffin Muteti
BIRTH DATE
April 1 1994
Gender
Male
Edit Personal Information
PERSONAL INFORMATION
NAME
GENDER
Born On
Month
Day
Year
Select Avatar
Complete
Mdaktari Patient Number
005
CONTACT INFORMATION
EMAIL ADDRESS
<EMAIL_ADDRESS>PHONE NUMBER
+254 702 990 800
Edit Contact
CONTACT INFORMATION
EMAIL ADDRESS
PHONE NUMBER
Complete
ADDRESS
MAILING ADDRESS
P.O. Box 187 00600
Nairobi Kenya
Edit Address
CONTACT INFORMATION
ADDRESS
Complete
PASSWORD
Current Password
*******
Edit Password
Account INFORMATION
PASSWORD
Complete


v2.2.0 - TBD
- NEW Add image to multiple albums*
- NEW Delete images after x time*
- NEW Possible light theme*
- NEW Private Images & Albums
- NEW RSS Feed for the Blog
- NEW Advanced API (create albums etc...)
v2.1.3 - January 13, 2018 - The first update of the year
- NEW Private uploads via API
- IRRELEVANT Removed tmpfile from footer (discontinued for now)
v2.1.2 - October 24, 2017
- NEW Choose x amount of images to display in Images and Albums
- NEW Added links to Images and Albums in Dashboard
- FIXED Albums now show a thumbnail
- FIXED CSS around the site
- REMOVED Email on Registration (2.1.1b)
- REMOVED Recovery of Account (2.1.1b)
v2.1.1 - October 11, 2017
- FIXED Deletion of account now deletes thumbnails
- FIXED Pagination for albums
v2.1.0 - October 9, 2017
- NEW Albums
- NEW Full js/jQuery Rewrite
- NEW Thumbnails to speed up load times in dashboard
- UPDATED Removed /rand/ and replaced with /latest/ (last 30 uploads)
- IRRELEVANT Added CSP (Content-Security-Policy)
v2.0.5 - September 20, 2017
- NEW Moved images to subdomain
- UPDATED Updated API to reflect subdomain change
- IRRELEVANT HTTP Error Pages
v2.0.4 - August 27, 2017
- NEW Direct links to blog posts
v2.0.3 - August 22, 2017
- NEW Add recovery of account
v2.0.2 - August 15, 2017
- NEW Add ProgressBar/percentage display when uploading
- FIXED Checking if an image is a real image on upload
- IRRELEVANT Some styling around the site
v2.0.1 - July 22, 2017
v2.0.0 - July 15, 2017
- NEW Accounts
- NEW Deletion of images
- NEW Download all of your uploaded images
- NEW Upload via URL
- NEW On upload - remove exif data
- NEW Private Images
- NEW View your uploaded images (requires account)
- UPDATED Lowered max size to 40MB
- REMOVED Webm support
- IRRELEVANT No longer using Cloudflare
- IRRELEVANT Rewritten in Django (original was in PHP)
- IRRELEVANT Move the entire service out of the US - to Romania
v1.3.1 - January 20, 2017
v1.3 - January 12, 2017
- NEW Blog Page
- NEW Contact Form
- UPDATED Updated max size to 100MB
- IRRELEVANT Moved to new host
v1.2.1 - December 18, 2016
- NEW Share on Social media buttons
- FIXED Fixed design on /p/ pages
v1.2 - December 17, 2016
- NEW Random Image Page /rand/
- UPDATED Redesign
v1.1 - December 14, 2016
- NEW About and FAQ page
- UPDATED Changed image hash size 6 -> 10 -> 40
v1.0 - December 6, 2016
- NEW Initial Revival Launch
*Feature isn't confirmed, but is being considered for said release or a future release.