Translate

Sunday, January 19, 2020

ImportError: cannot import name 'PILLOW_VERSION' from 'PIL'

ImportError: cannot import name 'PILLOW_VERSION' from 'PIL'
This happens because PILLOW_VERSION is removed in never versions of torchvision,so we need to update torchvision or simply we can change the import PILLOW_VERSION as in never version.
Modify from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION to from PIL import Image, ImageOps, ImageEnhance, __version__ in functional.py approx line number 
Modify PILLOW_VERSION = __version__ = _version.__version__ to __version__ = __version__ = _version.__version__ in __init__.py, approx line no 22.
File path:
  • functional.py/usr/local/lib/python3.5/dist-packages/torchvision/transforms
  • __init__.py/usr/local/lib/python3.5/dist-packages/PIL

Sunday, October 6, 2019

CPU not running at full clock speed ? Solution 100%

This happens most of times because of power issues,
you can fix this by physical actions like,
Replacing the battery or Charging adapter if battery has a good health.

But without doing these we can fix this by following these steps, here we set OS to run the pc on maximum performance and disable power management features and also we disable intel power management service.

First enter the BIOS menu - Press the power button to on the PC or LAPTOP and Press F2 or  F12 or DELETE button while the manufactures logo is shown.the button is different for different manufactures.so you can find it by make a google search.

Then Find the Intel SpeedStep Option from the bios menu this option appears differently in different bios version please check the images below so you can find it easily,if you have any issue please make a comment then i will help you.

Disable the Intel SpeedStep option then save the changes and restart the machine.

Then login to windows and go to control panel  > View by large icons > Power Options > Change
plan settings > Change advance power settings > Select High performance from drop down list >
Then apply the settings.

Now open the Task manager and check the clock speed.
Paste this link to the explorer then you can goto power options.

Control Panel\All Control Panel Items\Power Options






Tuesday, March 1, 2016

Grub rescue error! Upgrading windows 10.

If you are using linux bootloader you will definitely face this issue while upgrading your windows system to windows 10.
This happens because windows installation make changes to system bootloader.
*Solution.
*Windows installation makes system to restart several times.
*After restart you will see a terminal window with Grub rescue error message.
*To fix this you have to correct the boot info.
            first we have to find our Linux system partition.
*If you don't know the partition,
            type ls
 *Then you will see a list of partitions.
Look.
            now check one by one for Linux partition.
 *Ex:
        >ls
        >(hd1) (hd1,gpt0) (hd1,gpt1) (hd1,gpt2) ......etc
        >ls (hd1)
        >no such a partition (or some kind of error)
        >ls (hd1,gpt0)/
        >(same error again)
when you are trying this one by one,after few....
        >ls (hd1,gpt7)/ (hint : 7 or something else
)
        > root/ grub/ etc/  etc
This is the point.this means your Linux system partition is know as (hd1,gpt7)
Now just correct the boot info.
        >set prefix=(hd1,gpt7)/boot/grub
        >set root=(hd1,gpt7)
Then switch to normal mode.
        >insmod normal
        >normal
Enter.
Now your usual boot is on the display and just select the Windows and continue upgrade.
After complete upgrade,Reinstall grub menu using linux terminal.
:)

Friday, January 1, 2016

Client-server model

Ex:
   
*I go to indian restaurant.the waiter comes and give me the menu(in english).He takes a note and translate them to Hindi and return to the indian chef.then chef prepares my meals and return me by waiter.

*At this point
 waiter-interface/protocol
 I-client
 Chef-Server

*I hope now you have solid understanding on topic.

The client–server model of computing is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.

Functions of server.

*listen for client requests.
*process the requests.
*return the result back to the client.

Client side functions

*Handle the user interface.
*Translate the user's request into the desired protocol.
*Send the request to the server.
*Wait for the server's response.
*Translate the response into "human-readable" results.
*Present the results to the user.