Monday, 21 November 2022

Understanding Differences in Behavior of Process.join() in Windows 10 and Ubuntu 18.04 in Python 3.6

When it comes to multi-processing in Python, developers often run into differences in behavior between different operating systems. One such difference is in how Windows 10 and Ubuntu 18.04 handle the Process.join() function. In this article, we will explore this difference in behavior and understand what accounts for it.

Read more »

Labels: , ,

Friday, 18 November 2022

Python program to check atleast two vowels matching words and word count from paragraph or string



def vowels_count(string):
    vowels=['a','e','i','o','u','A','E','I','O','U']
    var1 =  string.split(" ")
    var = [vowel for vowel in var1 if sum(ch in vowels for ch in vowel) >= 2 ]
    var2 = len(var)

    print (var)
    print (var2)


string="Horse knows when he is going to race. How does he know? His breakfast was scanty. (He is angry about that.) He does not have saddle on his back. He is being led, not ridden, to grandstand. He is led under grandstand into unusual, special stall. Horse is nervous. Sometimes he does not know what to do when starting gate flies open and track is before him. If he does not begin to run instantly, other horses are already ahead of him. During race, when he sees another horse just ahead of him,"


vowels_count(string)

Labels: , ,

Saturday, 12 November 2022

perl rest client crud tutorial example using REST::Client


Hi,Today  Perl script that demonstrates how to interact with a REST API using the REST::Client module. The script shows examples of performing HTTP requests such as GET, POST, and DELETE to interact with different endpoints of a RESTful API. The script starts by importing necessary modules, and then sets up basic configurations for authentication and API endpoint URLs. The code defines three subroutines, each performing a specific type of API request: GetList(), CreatePost(), and DeleteList(). These subroutines use the HTTP methods of the REST::Client module to call the respective API endpoints, and they return the API response. Finally, the script calls these subroutines and prints the API responses on the console.

Read more »

Labels: , , ,