
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

223 Views
In this article, we will see how to paginate through security configuration present in AWS Glue.ExampleProblem Statement: Use boto3 library in Python to paginate through security configuration from AWS Glue Data Catalog that is created in your accountApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: max_items, page_size and starting_token are the optional parameters for this function.max_items denote the total number of records to return. If the number of available records > max_items, then a NextToken will be provided in the response to resume pagination.page_size denotes the size of each page.starting_token helps to paginate, ... Read More

681 Views
In this article, we will see how to paginate through all jobs present in AWS Glue.ExampleProblem Statement: Use boto3 library in Python to paginate through jobs from AWS Glue Data Catalog that is created in your accountApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: max_items, page_size and starting_token are the optional parameters for this function.max_items denote the total number of records to return. If the number of available records > max_items then a NextToken will be provided in the response to resume pagination.page_size denotes the size of each page.starting_token helps to paginate, and ... Read More

500 Views
In this article, we will see how to paginate through all the job runs of a job present in AWS Glue.ExampleProblem Statement: Use boto3 library in Python to paginate through job runs of a job from AWS Glue Data Catalog that is created in your accountApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: max_items, page_size and starting_token are the optional parameters for this function, while job_name is required.max_items denote the total number of records to return. If the number of available records > max_items then a NextToken will be provided in the response ... Read More

364 Views
When it is required to remove tuples from a list of tuples where a ‘None’ element is present, a list comprehension can be used.Below is a demonstration of the same −Example Live Demomy_list = [(2, None, 12), (None, None, None), (23, 64), (121, 13), (None, ), (None, 45, 6)] print("The list is : ") print(my_list) my_result = [sub for sub in my_list if not all(elem == None for elem in sub)] print("The None tuples have been removed, the result is : " ) print(my_result)OutputThe list is : [(2, None, 12), (None, None, None), (23, 64), (121, 13), (None, ... Read More

553 Views
In this article, we will see how to paginate through all databases present in AWS Glue.ExampleProblem Statement: Use boto3 library in Python to paginate through all databases from AWS Glue Data Catalog that is created in your accountApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: max_items, page_size and starting_token is parameter for this function.max_items denote the total number of records to return. If the number of available records > max_items, then a NextToken will be provided in the response to resume pagination.page_size denotes the size of each page.starting_token helps to paginate, and it ... Read More

212 Views
When it is required to trim a list of tuples by a specific number of elements, the ‘del’ operator can be used.Below is a demonstration of the same −Example Live Demomy_list = [(1, 2, 11), (99, 76, 34, 89), (3.08, 11.56), ("Hi", "Will"), ("Rob", 'Ron')] n = 2 print("The list is :") print(my_list) print("The value of N is") print(n) del my_list[n] print("The list after deleting N elements is :") print(my_list)OutputThe list is : [(1, 2, 11), (99, 76, 34, 89), (3.08, 11.56), ('Hi', 'Will'), ('Rob', 'Ron')] The value of N is 2 The list after deleting N elements is : [(1, ... Read More

413 Views
In this article, we will see how to paginate through all crawlers present in AWS Glue.ExamplePaginate through all crawlers from AWS Glue Data Catalog that is created in your account.Problem Statement: Use boto3 library in Python to paginate through all crawlers from AWS Glue Data Catalog that is created in your accountApproach/Algorithm to solve this problemStep 1: Import boto3 and botocore exceptions to handle exceptions.Step 2: max_items, page_size and starting_token are the parameters for this function.max_items denote the total number of records to return. If the number of available records > max_items, then a NextToken will be provided in the ... Read More

5K+ Views
The significance of Button widget is that it is used for handling events to perform certain operations in the application. In order to handle such events, we generally define a method which contains certain operations.Let us suppose we want to change the event method after initializing the button. We can configure the Button and its handler using configure(options) method. Thus, by defining a new method and configuring the button we can trigger a new event with the same button.Example#Import tkinter library from tkinter import * #Create an instance of tkinter frame win = Tk() #Set the geometry win.geometry("750x250") #Define ... Read More

617 Views
When it is required to find the number of times every day of the week occurs in a year, a list is defined, and it is iterated over, and is count is incremented respectively.Below is a demonstration of the same −Example Live Demoimport math def num_of_occurrence( n, firstday): my_days = [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ] my_count= [4 for i in range(0, 7)] my_position = -1 for i in range(0, 7): if (first_day == my_days[i]): my_position = i break ... Read More

1K+ Views
When it is required to convert a string into a timestamp, the ‘mktime’ method is used. This method is present in the ‘time’ package.Below is a demonstration of the same −Example Live Demoimport time import datetime my_string = "24/03/2021" print("The date string is :") print(my_string) print("The timestamp is :") print(time.mktime(datetime.datetime.strptime(my_string, "%d/%m/%Y").timetuple()))OutputThe date string is : 24/03/2021 The timestamp is : 1616544000.0ExplanationThe required packages are imported.The string is defined, and displayed on the console.The ‘mktime’ method from time package is called, and the string is passed as parameter to it.The ‘strptime’ is used to remove the extra spaces or symbols from ... Read More