Well… You can use the Positional only argument in a way that it can be used as the Keyword argument by using operator ‘/’.
I have been interviewed and was given a problem to solve..
where in customer seeks for car information from dealer and the dealer has to return the matched details from the data they have and follow Object Oriented design pattern to solve.
I have Used the below approach to solve .Please check and let me know Your thoughts for other better ways.
Instead of real db or more simplified dictionary ,I have used data classes in python
Data classes are used to store data in runtime ,that you don’t need any real db dbs for your quick solution or…
Given a word, you need to judge whether the usage of capitals in it is right or not.
We define the usage of capitals in a word to be right when one of the following cases holds:
Otherwise, we define that this word doesn’t use capitals in a right way.
def detectCapitalUse(self, word):
if word.istitle() == True :
elif all([True if i.islower() else False for i in word ])==True or all([True if i.isupper() else False for i in word ])==True :
I have started using Jenkins since 2018.Thinking myself as eligible person to write certification decided to take exam on August.
Chose the Certified Cloudbees Jenkins Engineer(CCJE) and gave an attempt with a preparation of three weeks and failed for first time and chose Certified Jenkins Engineer(CJE) for the second time and passed with quite good score of 79%.
Here is the Top ten points for you to clear Certification exam.
AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
Here ,We can try doing the deployment of the Django web application to Elastic bean stalk.
Rather beating around the bush lets jump on to series of steps to deploy Django Application.
The below steps will get the source of a Django Application from git and run in your local machine and then make necessary steps to deploy an application to Elastic bean Stalk…
Decorators dynamically alter the functionality of a function ,method or a class without disturbing the subclass and source code of the function directly.
We must also understand that decorators are not exactly the same as decorator pattern.
Syntax for the decorators are proposed and implemented in accordance to PEP 318.
Winning syntax is @ and sometimes people refer it to syntactic sugar.
There might be lot of definitions already about decorators in python but I take this opportunity very well to explain it ,through a real time use case rather giving up a boring theory.
Getting the files and Folders of the specific commit might helps us to inspect the entire repository from one point to other point and can be used to test,inspect,review and even for much more utilities.
Conventionally ,we use the command git fetch origin <Commit_ID> and stuck most of the times with error: Server does not allow request for unadvertised object <Commit_ID> in sequence will lead to change the configurations relative to sub module sync and update to solve the highlighted error.
Lets see how we can make use of python to extract the files and folders of GitHub repository of…
PyAutoGui an alternate to Python -Selenium
Its always challenging to test Flash Application using Selenium if the application is not designed in a way to expose the iframe objects and elements or even if the developer disabled the right click on the web page.
There comes the need for the wrapper which allows to use the keyboard and mouse programmatically to achieve the Test Automation in which PyAutoGui helped us to solve our problems to some extent.
we can use Selenium and Pyautogui in parallel to solve the test automation on the application which are built with hidden elements and…