<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Diya Vijay</title>
    <description>The latest articles on DEV Community by Diya Vijay (@diyavj).</description>
    <link>https://dev.to/diyavj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F718175%2F76cbede9-62fa-4199-902c-fefea9af0d1d.png</url>
      <title>DEV Community: Diya Vijay</title>
      <link>https://dev.to/diyavj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diyavj"/>
    <language>en</language>
    <item>
      <title>How Can Power Virtual Agents Transform Your Customer Engagement?</title>
      <dc:creator>Diya Vijay</dc:creator>
      <pubDate>Fri, 03 Nov 2023 15:48:46 +0000</pubDate>
      <link>https://dev.to/diyavj/how-can-power-virtual-agents-transform-your-customer-engagement-1c5f</link>
      <guid>https://dev.to/diyavj/how-can-power-virtual-agents-transform-your-customer-engagement-1c5f</guid>
      <description>&lt;p&gt;Are you a student with a groundbreaking startup idea or an entrepreneur aiming to elevate your business to new heights? In today's fast-paced digital landscape, effective customer engagement is the key to success. But how can you stay ahead in this ever-evolving world of innovation?&lt;/p&gt;

&lt;p&gt;Introducing Power Virtual Agents (PVA) – a true game-changer in the realm of conversational AI (Artificial Intelligence). Whether you're a student start-up with a vision or a seasoned entrepreneur seeking to revolutionize your project, this is an opportunity you won't want to miss.&lt;/p&gt;

&lt;p&gt;With PVA, you'll embark on an exciting journey into the world of conversational AI, where the possibilities are limitless. Discover how this revolutionary technology can help you engage your customers more effectively, drive growth, and take your business to the next level.&lt;/p&gt;

&lt;p&gt;Ready to explore the future of customer engagement? Click the link below to dive into our article and empower your business with the magic of Power Virtual Agents: &lt;a href="https://techcommunity.microsoft.com/t5/educator-developer-blog/revolutionize-customer-engagement-empowering-your-business-with/ba-p/3952502?wt.mc_id=studentamb_150623"&gt;Read Now&lt;/a&gt; 🌟&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>productivity</category>
      <category>powerplatform</category>
    </item>
    <item>
      <title>Introduction to Stack</title>
      <dc:creator>Diya Vijay</dc:creator>
      <pubDate>Tue, 08 Feb 2022 13:49:00 +0000</pubDate>
      <link>https://dev.to/diyavj/introduction-to-stack-1833</link>
      <guid>https://dev.to/diyavj/introduction-to-stack-1833</guid>
      <description>&lt;p&gt;Stack is a linear data structure in which data can be added or removed only at one end. This end is generally known as "TOP" of the stack.&lt;br&gt;
let's take one example for better understanding. It is like stack of plates in cafe, where every new plate is added to the top of the stack and removed from the top as well. This simply means that the last plate added to a stack is the first plate to be removed. Hence stacks are also called Last in First Out (LIFO)structure.&lt;br&gt;
Let's take another example. Look in this picture, it looks yummy right? haha....it's a stack of oreo. Now if you want to build the Eiffel Tower then you have to add another Oreo on top of this Oreo stack. And now imagine you want to eat an Oreo (read the second word after "and" again, just imagine or buy your own Oreo cause obviously I won't share it with you, LOL) then you have to take it from the top of the Oreo stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--necoSv_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smq254ld6163olxi41en.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--necoSv_---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smq254ld6163olxi41en.png" alt="Image description" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's talk about implementation of stack. well, stack can be implemented in two ways.&lt;br&gt;
1) Static implementation&lt;br&gt;
2) Dynamic implementation&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Static implementation&lt;/strong&gt; : static implementation uses array to creat stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic implementation&lt;/strong&gt; : It uses linked list that uses pointers to implement the stack.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;# Terminology of Stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PUSH&lt;/strong&gt;: when an item is added or inserted in a stack, the operation is known as push.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;POP&lt;/strong&gt;: when an item is removed or deleted from a stack, the operation is known as pop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TOP&lt;/strong&gt;: this term refers to the top of stack. top is used to check stack's overflow or underflow condition. top is initialized by -1.&lt;br&gt;
&lt;code&gt;if TOP = -1   // indicates the stack is empty&lt;br&gt;
if TOP = MAXSIZE-1   // indicates the stack is full&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dsa</category>
      <category>stack</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Docket – A CLI application</title>
      <dc:creator>Diya Vijay</dc:creator>
      <pubDate>Sun, 30 Jan 2022 10:51:33 +0000</pubDate>
      <link>https://dev.to/diyavj/docket-a-cli-application-1o2a</link>
      <guid>https://dev.to/diyavj/docket-a-cli-application-1o2a</guid>
      <description>&lt;p&gt;Let's build a docket cli application. A docket is just a list of tasks that must be done. It functions similarly to a to-do application in that you may add tasks, browse a list of tasks, and mark them as completed once they are completed.&lt;br&gt;
You must first install Python on your machine. Python is generally installed by default on most current systems. Open a terminal and type the following command to see which version of Python is installed on your machine.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 –version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will give you information about the Python version that is currently installed. You can also install Python by visiting this website: &lt;a href="https://installpython3.com/"&gt;https://installpython3.com/&lt;/a&gt;.&lt;br&gt;
To begin, make an empty folder in which to save our project's files.&lt;br&gt;
Now, open your favorite code editor and begin developing our program. Open the empty folder we made for our project. Now, activate the Python environment; if you have Python 3.4 or higher, execute the following command.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ python -m venv [directory]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Bingo! Our Python environment is now active. Now, let's create our python file and name it "'docket.py"', but it's not required to use the same name; you're smart, and I know you can come up with a better one.&lt;br&gt;
Before we begin coding in our Python file, we must first generate four other files. Wait! I know you're excited, but let me explain you what kind of files we'll be making and why. So, we'll need to make two text files: one for entering our tasks (task.txt) and another for keeping completed tasks (completed.txt). Let us now discuss the last two files. We must write one “.bat” (docket.bat) file (which will allow us to run the software on Windows) and one “.sh” (docket.sh) file (helps us to run the program on Linux). However, you must include the following code in these files.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docket.bat&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@echo off

Python3 docket.py %1 %2 %3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;docket.sh&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash

Python3 docket.py “$@”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally! Now take off!!!!  for our python file, which will be used to code our fantastic program. For constructing our application's CLI interface, we will use Python's argparse module. The argparse module simplifies the creation of user-friendly command line interfaces. The argparse module also generates help and usage messages automatically and generates errors when users provide invalid arguments to the program. You may install argparse on your terminal by typing "' pip install argparse"'.&lt;/p&gt;

&lt;p&gt;Import argparse and use the code below to open our txt files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import argparse

task = open("task.txt","r+")
completed_task = open("completed.txt", "r+")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create some variables to read lines from and the length of our txt files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task_data = task.readlines()
completed_data = completed_task.readlines()
c=len(completed_data)
t= len(task_data)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's begin our argparse module now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;parser= argparse.ArgumentParser()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to add arguments to the CLI in order to accept user input. We basically need two arguments. One is input1 for writing instructions, and the other is input2 for writing assignments. This is how you use argparse to declare variables and take input from the cli.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;parser.add_argument('input1',
action='store', type=str, nargs='?', default='default')

parser.add_argument('input2', action = 'store',
                    nargs='?',
                    default='-1')

args = parser.parse_args()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's get started on the conditions for our commands now. First, we specify whether we want to use the default mode or enter the command "'./docket help"', which will display the application's usage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(args.input1 == 'default' or args.input1 == 'help'):
    print('''Usage :-
$ ./docket add "hello world"    # Add a new item with priority 2 and text "hello world" to the list
$ ./docket ls                   # Show incomplete list items
$ ./docket del INDEX            # Delete the incomplete item with the given index
$ ./docket done INDEX           # Mark the incomplete item with the given index as complete
$ ./docket help                 # Show usage
$ ./docket report               # Statistics''')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll define our program for adding new items. Put a condition that says if our input1 is "add" and our input2 is default (which is -1 for input2, which helps us write our task), then write and store the input2 string in our task.txt file. The task's text should be enclosed by double quotations (otherwise only the first word is considered as the item text, and the remaining words are treated as different arguments).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Add a new item

elif(args.input1 == 'add' and args.input2 != '-1'):
    task.write(str(args.input2) +"\n")
    print('Added task: '+ (args.input2))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following step is to write code to display a list of all pending items. If input1 is "ls" (which represents a list) and the length of our line in task.txt is larger than 0, then read each line in task.txt with relevant indexes. If your input1 is ls but the length of the line in task.txt is not defined or 0 then print the no pending task message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# List all pending items

elif(args.input1 == 'ls'and t&amp;gt;0):
    for i in range(t,0,-1):
        line = task_data[i-1].strip()
        print(str(i)+'. '+line)

elif(args.input1 == 'ls'):
    print("There are no pending tasks!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We've reached the halfway.  Bingo!! Begin by defining our condition for removing an item from a list. Put a condition that says if our input1 is del (which means delete) and our input2 is not default but is an integer larger than 0 and less than the length of the line in task.txt, then delete that index line from task.txt. If the index does not exist, an error message is displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Delete an item

elif(args.input1 == 'del' and args.input2 != '-1' and int(args.input2) &amp;lt;= t and int(args.input2)&amp;gt;0):
    task_data.remove(task_data[int(args.input2)-1])
    task.truncate(0)
    task.seek(0)
    for line in task_data:
        line = line.strip()
        task.write(line+"\n")
    print('Deleted item with index '+(args.input2))

elif(args.input1 == 'del'):
    print("Error: item with index "+str(int(args.input2))+" does not exist. Nothing deleted.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its time to mark our task as completed.  Lets put a condition if input1 is done and input2 is not default but it is integer greater than 0 and less than equal to the length of line present in task.txt then mark that line as done and remove it from task.txt and store it in completed.txt file, use relevant index to remove and store line. And if index does not exist then show error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Mark a task as complete

elif(args.input1 == 'done' and args.input2 != '-1' and int(args.input2) &amp;lt;= t and int(args.input2)&amp;gt;0):
    line = task_data[int(args.input2)-1]
    completed_task.write(task_data[int(args.input2)-1])
    task_data.remove(task_data[int(args.input2)-1])
    task.truncate(0)
    task.seek(0)
    for line in task_data:
        line = line.strip()
        task.write(line+"\n")
    print('Marked item as done.')

elif(args.input1 == 'done'):
    print("Error: no incomplete item with index "+str(int(args.input2))+" exists.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally! We are now ready to generate our report. Huhhh…&lt;br&gt;
Put a condition that says if our input1 is a report, then show all the data in task.txt and completed.txt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Generate a Report 

elif(args.input1 == 'report'):
    print("Pending tasks: "+ str(t))
    for i in range(t,0,-1):
        line = task_data[i-1].strip()
        print(str(i)+'. '+ line )
    print("Completed tasks: "+ str(c))
    for i in range(c,0,-1):
        line = completed_data[i-1].strip()
        print(str(i)+'. '+ line )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tada!! Our cli application is now ready to use. You did it, and I'm delighted it came in handy. The complete source code is available on &lt;a href="https://github.com/DiyaVj/Docket"&gt;my github repo&lt;/a&gt;. Visit it Once.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ls8kQbvz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spwoieqp5awd4qn3f0sf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ls8kQbvz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spwoieqp5awd4qn3f0sf.gif" alt="party gif" width="500" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>python</category>
      <category>github</category>
    </item>
  </channel>
</rss>
