Posts

Showing posts from March, 2024

Are you still using macros? Be sure you read this.

Image
  You still use a lot of macros in your code, don't you? Of course you should: Macros, as per Microsoft,  are p recompiler directives are processed before the code is compiled. The directives declare and handle macros and their values. The directives are removed by the precompiler so that the X++ compiler never encounters them. The X++ compiler only sees the sequence of characters written into the X++ code by the directives. However macros, are not quite recomended by Microsoft. They are slow, they can be subsequently deorectaed at any later time.  The Macros are  actually  a type of classes, only that they are not instantiated and not need be defined as classes. Hence runtime garbage collection could be a huge issue, consquently (a class when gets out of scope, gets garbage-collected owing to the destructor classes of DOT net instrumentation classes). Summing up, macrros are a bit old way of writing code. Use static classes instead. public static class MyIdentifierMarcoClass. And

Using Python to fetch data from D365 Finance & operations

Image
  This short article can help you fetch data from D365FinOps, which a. You can subsequently analyse b. You can perfrom further predictive modelling based on this data  c. Understanding and forcasting the direction in which business is going and so on. And it's quite straight forward. Step 1. Define your Azure app registrations (AKA Microsoft Entra-ID). Step 2. Enasure that the Azure App is registered in D365FO end by enabling the same through System Admin \\Setup\\ Microsoft Entra ID Applications   Step 3. We are going to use Jupyter Notebook here, for our code. This could be easily launched, if you have installed Anaconda as your IDE and then simply going to Windows \\ Jupyter. This will prompt you with an intermittent DOS prompt like this: And will eventually open the Jupyter browser which looks lot like this: Step 4: We are going to use the following modules for our code: import requests import json   The former handles the requests and responses from API calls while the latte

An example of predictive modelling using Decision trees, Python - step by step

Image
.  The aim is to how accurately your system can predict the future. All around the globe, we are seeing organizations and enterprises are preparing applications that can read, and understand the psyche of the buyers and thereby predicting what they could come up to buy in another 3-4 months. This is exactly how you see 'Customers who have brought this, have also brought that' on Amazon or 'People similar to your profile' on LinkedIn. The idea is to feed your system with more and more data. As you pour in more data to train your machine, easier it gets for the machine to understand the pattern. And more accurate is the result. A typical machine learning process consists of the following steps: Import the data: This is where we feed the data into the system. Clean the data: the most essential part of the process that demands to clean the data beforehand to get rid of duplicate data, repetitive data, data with null values, etc. Each project has a different modus operandi

Creating a chatbot program that can learn as you interact

Image
   ¡Hola!  As we delve deeper into AI and machine learning saga, here is a very cool Python code that could help you create a small Chatbot program, that can  a. Learn from you as you chat with it b. Save information, so that when you reopen the program it can remember what it has learned for so long. c. And it should be pretty fast to respond. The below code is very basic and could be exercised to include more and more features as you go through it.  And I used Python as my code; alternatively, you can also write the same using C#, if that's what you are comfortable with. The algorithm: I am creating a file called: questionBank.json and saving it as a physical file, and which starts with a couple of very basic questions: I am chatting with my chatbot like this: And when I ask it something it doesn't know: So that when you ask it next time: Pretty cool, eh? Let me show you, how this has been done. Step 1: I am using Spyder3.11, as my IDE, but alternatively you can use anything