How to generate byte code file in python?

Whenever the Python script compiles, it automatically generates a compiled code called as byte code. The byte-code is not actually interpreted to machine code, unless there is some exotic implementation such as PyPy. The byte-code is loaded into the Python run-time and interpreted by a virtual machine, which is a piece of code that reads each instruction in the byte-code and executes whatever operation is indicated. Byte Code is automatically created in the same directory as .py file, when a module of python is imported for the first time, or when the source is more recent than the current compiled file.

Next time, when the program is run, python interpreter use this file to skip the compilation step. Running a script is not considered an import and no .pyc file will be created. For instance, let’s write a script file abc.py that imports another module xyz.py. Now run abc.py file, xyz.pyc will be created since xyz is imported, but no abc.pyc file will be created since abc.py isn’t being imported. But there exist an inbuilt py_compile and compileall modules and commands which facilitate the creation of .pyc file.

[mai mult...]

How to record screen in Windows 11?

Screen recording is the method that helps to show activities on a laptop or PC screen to any other individual in video format to make any tutorial easier for them. The use of Screen Recording is increasing day by day on both Desktop & Mobile devices. That is why the latest feature to Record Screen in Windows 11 is introduced.

However, the process of Recording Screens on Windows has existed even before the Windows 11 version. In the Windows 11 version, some more alternatives are provided to Capture Windows 11 Screen Activities in the Video Format. All of these alternatives come up with Windows, so they are not flagged as Third-Party Applications.

[mai mult...]

How to remove a Watermark in Microsoft Word?

Microsoft Word is the mostly used software for writing any document in a good manner. MS Word also offers a special function that helps to provide a Watermark to the document. A Watermark is a special feature that helps to restrict any individual to copy the content directly. But sometimes, there is a need to remove the watermark present in the Microsoft Word document. For removing the watermark, for which we’re going to see the best two methods how to remove a watermark in Microsoft Word.

[mai mult...]

Encrypt Image using Python

Encryption

It is nothing but a simple process in which we convert our data or information into secret code to prevent it from unauthorized access and keep it private and secure.

First, we will select an image, and then we will convert that image into a byte array due to which the image data will be totally converted into numeric form, and then we can easily apply the XOR operation to it. Now, whenever we will apply the XOR function on each value of the byte array then the data will be changed due to which we will be unable to access it. But we should remember one thing here our encryption key plays a very important role without that key we can not decrypt our image. It acts as a password to decrypt it.

[mai mult...]

One Time Password (OTP) algorithm in Cryptography

The OTP is a numeric code that is randomly and uniquely generated during each authentication event. This adds an additional layer of security, as the password generated is fresh set of digits each time an authentication is attempted and it offers the quality of being unpredictable for the next created session.

The two main methods for delivery of the OTP is:

  1. SMS Based: This is quite straightforward. It is the standard procedure for delivering the OTP via a text message after regular authentication is successful. Here, the OTP is generated on the server side and delivered to the authenticator via text message. It is the most common method of OTP delivery that is encountered across services.
  2. Application Based: This method of OTP generation is done on the user side using a specific smartphone application that scans a QR code on the screen. The application is responsible for the unique OTP digits. This reduces wait time for the OTP as well as reduces security risk as compared to the SMS based delivery.
[mai mult...]