Posts

How to set Python3 as default interpreter for VS Code | or set any version as default interpreter.

Image
Want to run your python code with a particular python version in Microsoft VS Code? And, make it the default version? Read on. Make sure that the required version is installed. You check the available version and the path by running this command. I am trying this on Apple Mac. It should be similar in Windows Machines as well.   Open the VS Code, at the bottom of the screen you will Terminal. If it is not visible, Go to View and then select Terminal. Check the available python versions and their path.   % which python   /usr/bin/python  % which python2 /usr/bin/python2  % which python3   /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 Next,  Run this python code to check what version is used by default.  import platform print ( platform . python_version_tuple ()) print ( type ( platform . python_version_tuple ())) You will get this ('2', '7', '16') <type 'tuple'> Now you know the path and versions available. In the VS code...

SOLVED | AdSense Approval Issues and Fixes for Site down or Unavailable | How to Fix

Image
I tried to get an AdSense approval for my site but I got a mail from AdSense saying the site is down or unavailable. But the site is definitely accessible and all the other requirements are taken care of. The site is also very old and the domain itself is 3 years old. There are no issues with page views as well.  Here is my situation. I have an approved AdSense for YouTube. I got my blogger site upgrade to a top-level domain. This is the requirement to link your YouTube AdSense to your blogger site.   I have taken care of all the requirements to apply for the AdSense for my site.  1. Clean design and unique content. No issue with the design as I have created it using a blogger theme.  2. About page, Contact Us Page, Privacy Policy Page. These are mandatory  3. Top-Leve Domain After applying for the AdSense I got the denial mail and looking at the reason, I was convinced that there must be a small mistake in the Domain setup or blogger settings.   ...

How to create MS Word document automatically with Excel

MS Word and Excel can do wonders together.  You can do a lot of automation using these 2 applications for your small and medium businesses.  Here is one such solution.   Generating the MS word report automatically using excel as a data source. Mail merge is used to link data from excel to word. Then a simple macro is used to get the desired record from Excel Spreadsheet. Download the MS word document and Excel spreadsheet used in this video here https://drive.google.com/drive/folders/0B4UB3eOhhY26TVdvQ3RucW1zb1E?resourcekey=0-YcGX4_XdYqt_C_dSztvA_A&usp=sharing Please use this link https://drive.google.com/drive/folders/0B4UB3eOhhY26TVdvQ3RucW1zb1E?resourcekey=0-YcGX4_XdYqt_C_dSztvA_A&usp=share_link If you are not able to access this link, let me know. The link in my YouTube channel was not working, now I have uploaded the files here. 

[SOLVED] MacBook Pro keyboard backlight not working? Check this post

Image
Keyboard backlight not working on your MacBook Pro? And your Mac has a touch bar?  Continue reading... MacBook Pro 2020 which comes with a touch bar has moved its Keyboard backlight controls to the touch bar. You will not see any control on the screen under the Keyboard settings. But the setting in the touch bar is also not easy to see and it bit tricky. You most probably, think that there is some issue with Keyboard. Even the support people suggest resetting some of the settings. That is what happened with my case. Luckily I found a way to change the settings.  By default, the Keyboard backlight settings are not visible on the touch bar. You have to expand the tra-like stuff on the touch bar and then you will find icons, which look similar to screen brightness control icons.  On the right side of your touch bar, you will these 4 controls 1. Screen Brightness control  2. Volume control  3. Mute control  4. Siri button.  Left these con...

How to create self signed ssl certificate, easy steps

 These are the ready commands to create self-signed SSL certificate. These certificates can be used for testing purposes. For a production-grade application, you need to contact a CA authority to get the actual SSL certificate. But for your internal testing, you can always use a self-signed SSL certificate.  Here are the steps to create a Self Signed SSL certificate using OpenSSL # generate self sigend ssl certificate rm -rf *.pem echo "Generating CA certificates" # Step 1: generate CAs certificate openssl req -x509 -newkey rsa:4096 -days 365 -keyout ca-key.pem -out ca-cert.pem -subj "/C=IN/ST=kartnataka/L=bangalore/O=test/OU=test/CN=*.test.com/emailAddress=test@test" #inspect the CAs certificate #openssl x509 -in ca-cert.pem -noout -text # Step 2 generate server sign request certificate which will be used for self signing. Change the subject to as per web server echo "Generating Server certificate sign request" openssl req  -newkey rsa:4096 -keyout server...

How to Fix ImportError: No module named 'flask' with virtualenv

Flask is one of the most used frameworks in Python. If you are new to the flask and if you are getting this error - ImportError: No module named 'flask' on virtualenv, read further. You are sure that the Flask module is already installed. But still, you are getting No module error. This is because you need to install a flask framework inside the virtualenv. Follow these instructions Step 1 Create a directory where you will be installing the virtualenv.   krishna@osboxes:~$ mkdir testenv   Step 2 Get inside the folder and install virtualenv krishna@osboxes:~$ cd testenv/ krishna@osboxes:~/testenv$ pip install virtualenv or $ sudo apt-get install virtualenv   Successfully installed appdirs contextlib2 distlib filelock importlib-metadata importlib-resources pathlib2 scandir singledispatch six typing unknown unknown virtualenv Step 3 Activate the virtualenv This virtual environment requires activation and dedicated installation insid...

Looking to move from development to DevOps? Here is what you should know

DevOps is a buzz word in the last decade, everybody wants to try their luck in DevOps. DevOps is the most generic area of software engineering. Every team and every company wants to have a team called DevOps. Nowadays, everybody wants a DevOps tag name attached to them irrespective of what they do. This works for most people. Because of the generous nature of the DevOps skillsets. That means, the pool of DevOps skillsets so huge, even if you know a few of them, it will work for you. If you are a developer or QA and want to change over to DevOps, here is the list of bare minimum technologies and skills you should learn. These are the mandatory skillsets you should possess before you try your luck in DevOps. 1. Expert Knowledge on Linux Environment You take any software development, without a Linux flavor it will be incomplete. You should have a thorough knowledge of how to work in a Linux environment. If you have system administration knowledge, then it's a huge advantage. Mos...