Articles

In this article, I will explain how to execute a Java method once or on Mulesoft Application Startup. With this approach, we can add or execute some needed tasks before a Mule Application fully deployed such as User Notification or Data Clean-Up (Truncation of Database Tables or purging of files from the temporary storage within the server).

First, we need to create a Custom Java Class that implements the interface MuleContextNotificationListener<MuleContextNotification> and override the onNotification() method. We also need to make sure that our startup logic should run after the Mule Context started.

Source de l’article sur DZONE


A Quick Recap 

Last time, we looked at how to leverage the SAP HANA R integration, which opens the door to about 11,000 packages. So, if you feel like the built-in libraries (APL and PAL) don’t offer what you need or if you feel like doing something your way too, now you can!

I hope you all managed to try this out, and probably some of you already started comparing the PAL implementation with R algorithms. Feel free to share your feedback!


Source de l’article sur DZONE (AI)


A Quick Recap

Last time, we looked at how to import data in SAP HANA express, and we used the dataset provided by the SAP Predictive Analytics tools (and available online).

But the main idea was to show you how you can import more or less any kind of text/CSV files in your HXE instances.


Source de l’article sur DZONE (AI)

About a year ago, we told a beautiful story about how KNIME Analytics Platform can be used to automate an established modeling process using the KNIME Model Factory. Recently, our Life Science team faced an exhausting and frightening exercise of building, validating, and scoring models for more than 1500 data sets.

We want to share with you how we adapted the KNIME Model Factory for this monstrous application. We hope this will show you how to implement your own model building routines in the KNIME Model Factory. We will also demonstrate how to scale model building processes to very large tasks using KNIME Server Distributed Executors.


Source de l’article sur DZONE (AI)

When writing unit tests, it is common to initialize method input parameters and expected results in the test method itself. In some cases, using a small set of inputs is enough; however, there are cases in which we need to use a large set of values to verify all of the functionality in our code. Parameterized tests are a good way to define and run multiple test cases, where the only difference between them is the data. They can validate code behavior for a variety of values, including border cases. Parameterizing tests can increase code coverage and provide confidence that the code is working as expected.

There are a number of good parameterization frameworks for Java. In this article, we will look at three different frameworks commonly used with JUnit tests, with a comparison between them and examples of how the tests are structured for each. Finally, we will explore how to simplify and expedite the creation of parameterized tests.

Source de l’article sur DZONE

MongoDB is always one step ahead of other database solutions in providing user-friendly suplog port with advance features rolled out to ease operations. The OpLog feature was used extensively by MongoDB connectors to pull out data updates and generate stream. OpLog feature banked on MongoDB’s internal replication feature. While the feature was highly useful, it was complex and necessarily mean tailing of logs.

To simplify things, Change Streams as subscriber to all insert, update, delete MongoDB collection operations was introduced, which should go well with Node.js event-based architecture. 

Source de l’article sur DZONE


What Is NumPy?

NumPy is a powerful Python library that is primarily used for performing computations on multidimensional arrays. The word NumPy has been derived from two words — Numerical Python. NumPy provides a large set of library functions and operations that help programmers in easily performing numerical computations. These kinds of numerical computations are widely used in tasks like:

  • Machine Learning Models: while writing Machine Learning algorithms, one is supposed to perform various numerical computations on matrices. For instance, matrix multiplication, transposition, addition, etc. NumPy provides an excellent library for easy (in terms of writing code) and fast (in terms of speed) computations. NumPy arrays are used to store both the training data as well as the parameters of the Machine Learning models.
  • Image Processing and Computer Graphics: Images in the computer are represented as multidimensional arrays of numbers. NumPy becomes the most natural choice for the same. NumPy, in fact, provides some excellent library functions for fast manipulation of images. Some examples are mirroring an image, rotating an image by a certain angle, etc.
  • Mathematical tasks: NumPy is quite useful to perform various mathematical tasks like numerical integration, differentiation, interpolation, extrapolation, and many others. As such, it forms a quick Python-based replacement of MATLAB when it comes to Mathematical tasks.

NumPy Installation

The fastest and the easiest way to install NumPy on your machine is to use the following command on the shell: pip install numpy.

Source de l’article sur DZONE

In many of my previous articles, I have posted about Association Rule Learning, what it’s about, and how it is performed. In this article, we are going to use Association Rule Learning to actually see it in action, and for this purpose, we are going to use KSAI, a machine learning library purely written in Scala. So, let’s begin.

Adding KSAI to Your Project

You can add KSAI in your SBT project using the following import line:


Source de l’article sur DZONE (AI)

In this article, I will explain how to create a global function that can be access or reuse by other Transform Message Component within a Mule Application.

First, We need to create a Dataweave File (.dwl) and save it in src/main/resources/modules/. Now,we can define our global custom functions here by using the fun directive and global variable by using var directive. Also note thatthis dwl file should not contain an output directory, body expression, or the separator (—) between header and body sections.

Source de l’article sur DZONE

Up to this point, our users can send and receive messages, but we don’t have a way to show them all of their conversations, only one conversation at a time and they have to guess who messaged them before they can see those, which is not very useful. What we need is a directory of all the conversations our user is part of. Let’s go ahead and add this feature to tie things together.

In our Conversations class, we will add a new method "getConversations":

Source de l’article sur DZONE