Found 26504 Articles for Server Side Programming

Golang program to creates a unidirectional sending channel and passes it to a function that takes a pointer to a slice of integers

Akhil Sharma
Updated on 13-Jul-2023 22:21:16

131 Views

There are many cases while working on go language channels where you need to write a program that creates a unidirectional sending channel and passes it to a function that takes a pointer to a slice of integers for data streaming, asynchronous data sharing and more, in this go language article we will write such a program using the make() function as well as using channel types. Syntax ch := make(chan

Golang Program to Find Average Paid Employee

Akhil Sharma
Updated on 13-Jul-2023 22:22:36

155 Views

It is very important to know about the average salary paid to an employee in an organization for analysis, research and rewards. In this article we are going to find out the average employee salary in go language using iteration, reduce function as well as goroutines and channels. Algorithm CalculateAverage is a function that accepts a slice of float64 values salaries as input and returns a float64 value. Set the total to 0 and count the length of the salary slice. Using a ... Read More

How to stop event propagation in Python Tkinter?

Kiran Kumar Panigrahi
Updated on 05-Sep-2023 11:39:11

995 Views

Tkinter events are very powerful in handling the different objects and attributes of the widgets as well as the elements of an application. There are events such as mouse events and keyboard button events that can be handled by binding the event or callback function with the button. Let us assume that we are creating an application that has two events of clicking the objects defined in a canvas widget. The two objects are basically the shapes (a rectangle and an oval) defined inside the canvas. We can perform actions like the Button Click event to verify if the use ... Read More

Python: How to update tkinter labels using a loop?

Kiran Kumar Panigrahi
Updated on 05-Sep-2023 11:35:19

2K+ Views

We normally use the Tkinter Label widget to display text and images in an application. Let us assume that we want to create an application such that the Label widget continuously gets updated with a value whenever the application executes. To achieve this, we will use a StringVar object and update its value using a while loop that will iterate as long as a particular condition satisfies. A StringVar object in Tkinter can help manage the value of a widget such as an Entry widget or a Label widget. You can assign a StringVar object to the textvariable of a ... Read More

Python: How to put a border around an OptionMenu using Tkinter?

Kiran Kumar Panigrahi
Updated on 05-Sep-2023 11:33:48

715 Views

To save the contents of a Textbox in Tkinter, we can take the following steps − Create an instance of tkinter frame. Set the size of the frame using win.geometry method. Define a user-defined method "open_text" to open a text file in "read" mode. Read the contents of the text file and save it in a variable called "content". Then, use the "insert" method to insert the content in a Textbox. Next, define another user-defined method called "save_text" and in it, use the "write" method to save the contents of the textbox in the text file. Create ... Read More

All types of ambiguities in NLP

Aaryamaan Kartha
Updated on 13-Jul-2023 14:17:05

10K+ Views

Since Natural language can be open to multiple interpretations at times, this would pass on to the computers who will try to understand the natural language input given to them. Often, it can be difficult to fully understand a sentence when we are not given enough context or if there is poor grammar. In this article we will be going over many different types of ambiguities that are found in NLP. Part Of Speech (POS) Tagging Ambiguity POS tagging refers to the process of classifying words in a text to a part of speech - whether the word is ... Read More

NLP language models_ What are they_ Example with N-grams

Aaryamaan Kartha
Updated on 19-Jul-2023 10:19:05

400 Views

Language models in NLP are statistically generated computational models that capture relations between words and phrases to generate new text. Essentially, they can find the probability of the next word in a given sequence of words and also the probability of a entire sequence of words. These language models are important as they help in various NLP tasks such as machine translation, language generation, and word completion among others. You may not realize it, but when typing on computers or phones often the corrections made and your writing are essentially guided by NLP; Word completion and sometimes error detection ... Read More

How to Conduct a Two Sample T-Test in Python?

Sohail Tabrez
Updated on 13-Jul-2023 10:52:49

2K+ Views

Introduction The means of two groups are compared in statistics to see if they differ substantially from one another using a two-sample t-test. The test is frequently employed in scientific studies to ascertain whether two groups differ significantly on the basis of a continuous variable. In this article, we'll look at how to use Python's scipy.stats module to perform a two-sample t-test. Conducting a Two Sample T-Test Let's first understand the theory underlying the two-sample t-test before moving on to the implementation. The test assumes that the two sample populations are normally distributed with similar variances. The two groups' means ... Read More

How to Conduct a One Sample T-Test in Python?

Sohail Tabrez
Updated on 13-Jul-2023 10:50:52

2K+ Views

Introduction One Sample T-Test is a statistical hypothesis test used to determine whether a population mean is significantly different from a hypothesised value. Python gives us the resources we need to carry out this test. In this article, we will walk through how to conduct a One Sample T-Test in Python using the SciPy library. Conducting a One Sample T-Test The first step in conducting a One Sample T-Test is to state the null and alternative hypotheses. The null hypothesis is the assumption that the population mean is equal to the hypothesized value. The alternative hypothesis is the opposite of ... Read More

Implementation of a CNN based Image Classifier using PyTorch.

Sohail Tabrez
Updated on 12-Jul-2023 19:53:55

206 Views

Introduction Due to its capacity to recognise spatial characteristics in images, convolutional neural networks (CNNs) have been extensively used in image classification applications. A well-liked open-source machine learning package called PyTorch offers assistance in creating and honing neural networks, including CNNs. In this article, we'll go over how to use PyTorch to create a CNN-based image classifier. Dataset Let's first talk about the dataset before getting into the specifics of the implementation. The CIFAR-10 dataset, which has 60, 000 32x32 color images divided into 10 classes with 6, 000 images each, will be the one we use for this course. ... Read More

Advertisements