Buying a PlayStation 4 in 2019: Is it worth it?

I recently bought a used PlayStation 4 for some casual gaming. Is the PS 4 outdated? It was first released late 2013 i.e. 6 years ago. Is it still worth getting? Let’s see.

Price

First and foremost let’s talk about price. A brand new PS 4 slim can be bought brand new between Rs 12,500 – Rs 19,000 with 1 game included in Mauritius. The PS4 Pro starts at Rs 18,000 to Rs 22,000. However used ones can be found on Facebook groups ranging from Rs 8,000 to Rs 10,000 for the non-pro PS4 version only.

Building an equivalent PC to the non-pro PS 4 would start as Rs 25,000 minimum. If we were to build an equivalent of PS4 Pro, we’ll need a budget of at-least Rs 60,000.

If you no longer have the need for the PS in the future, you can always sell it on Facebook.

Performance and Graphics quality

You can be sure that any game released for the PS 4 would run butter smooth no matter what year the game is released. This is because game developers have optimized the game to deliver certain frames per second while keeping a decent graphics quality.

The game developers know very well the power as well as the limitations of the PS 4 hardware. It’s not possible to do same on PCs because the hardware can be of a lot of different combinations.

The Controller: DualShock 4

As someone who has only used mouse and keyboards my whole life, the DualShock controller feels like experience a state-of-the-art technology. It has the following features:

1. Vibration

Whenever you’re getting shot or driving off-road, the vibration feedback brings an awesome gaming experience. The vibration can be very powerful sometimes.

2. Pressure-sensitive Buttons and Analogue Sticks

Keyboard presses are binary. If you are playing a racing simulator game on a PC, the arrow keys would make the car accelerate and turn to the maximum level each time you press. On the DualShock 4 Controller however, you can just slightly steer the car or apply brakes gently to make a perfect cornering manoeuvre.

3. It has a Trackpad too

But it’s not always linked to the cursor on the screen. I guess the game developers don’t use it often in there games.

4. Accelerometer included

I discovered this feature when in text-input mode, you can also move the cursor on the screen by swinging the controller. The games themselves don’t seem to be using this feature a lot.

5. Audio jack

The 3.5 mm audio jack is one of the best feature of the wireless controller. You can sit back on your couch late at night playing games on the TV without causing inconvenience to other users of the house.

Games Availability and Playing Online

Games will keep getting released for the PS 4 until PS 5 actually penetrates the market the following years. You can have plenty of fun now. And there are lots of Free-to-play games on the Store which are of really good quality e.g. Armoured Warfare, H1Z1, Warface, Crossout etc. These free games don’t require a PlayStation Plus subscription to play online. What can you ask for more?

And yes, to play online in other games, you’ll have to buy PlayStation Plus subscription which would require you to have a budget dedicated to maintain it.

Power Consumption

The PlayStation is not very power efficient. Just keeping it idle on the main menu costs around 70 Watts of power. I mean why? That’s too much for a system doing nothing! Playing a YouTube video will consume around 100 W. And on top of that, we have to add the power consumption of the TV which can range from 70 W to 200 W.

A Raspberry Pi or a Chromecast or an Android TV box would not draw more than 6 W for playing a YouTube video. I really wouldn’t recommend the PS 4 for non-gaming applications such as TV Media Centre.

And that’s it for now. What’s your favorite PS 4 game? I’m looking for a Tomb Raider game to buy right now.

Automated Tagging of Images on Nextcloud with Tensorflow (for Poets 2)

I take lots of pictures on my mobile phone of nearly everything. Whenever I fuel up my car, I take a picture of my dashboard so that I can remember the date and odometer to be able to calculate my fuel consumption. Another case would be each time I go to supermarket, I take a picture of the receipt provided so that I’ll be able to keep track of my expenses. Going Hiking with friends are also great opportunities to take more pictures. How to  sort out everything? Fortunately we have lots of machine learning tools out there. I chose Tensorflow not because I found it to be the best but simply because it has more buzz around it.

Let’s start by viewing our files in Nextcloud which are synced with my Phone.

In the above example, I manually looked for car dashboard pictures and tagged them  as “Car Dashboard”. Let’s do the same with supermarket receipts, business cars and hiking pictures. I found that we need atleast 30 pictures for TensorFlow to not crash. In case I was feeling lazy, I would just copy/paste the same pictures till I get 30. I am lazy.

Now that it’s all done with like a few, lets download TensorFlow for Poets 2. You may follow instructions from here: https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0

TensorFlow for Poets require you to put your training images into their respective category folder. So we need to download the images we just tagged in the proper way. Nextcloud Offers a WebDAV API as standard. Unfortunately classic python DAV clients would not suffice for our task. We’ll have to create our own methods and overload some.

 

#git clone https://github.com/CloudPolis/webdav-client-python
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/webdav-client-python')

import webdav.client as wc
from webdav.client import WebDavException

class NCCLient(wc.Client):
  pass

We write a function which will download the pictures for each tags specified by their ID and put them inside /tmp/nc/{categoryid}

def download_training_set():
  try:
    client = NCCLient(options) 
      for tag in ['2','9','1','3','11','12','14']:
        index = 0
        try:
          os.mkdir("%s/%s/" % (options['download_path'],tag))
        except:
          pass
	for filepath in client.listTag("/files/Nayar/",tag):
	index = index + 1
	filepath = filepath.path().replace('remote.php/dav','')
	local_filepath = '/tmp/nc/%s/%s' % (tag,os.path.basename(filepath))
	if(os.path.isfile(local_filepath)):
	  pass
	else:
	  client.download_file(filepath,local_path=local_filepath)
	if(index > 200):
	  break	
	except WebDavException as exception:
		pprint.pprint(exception)

The method listTag is not present in the default DAV classes so we have to write our own in our extended class

Now that we have all our images in their respective folders, we can run TensorFlow for Poets.

IMAGE_SIZE=224
ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"

python3 -m scripts.retrain   --bottleneck_dir=tf_files/bottlenecks   --how_many_training_steps=100   --model_dir=tf_files/models/   --summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}"   --output_graph=tf_files/retrained_graph.pb   --output_labels=tf_files/retrained_labels.txt   --architecture="${ARCHITECTURE}"   --image_dir=/tmp/nc/

What’s left now is to download all images from Nextcloud and try to label them with the TensorFlow model. We write the classify_data() function. All images downloaded are renamed as follows /tmp/nc_clasify/{nextcloudfileid}.png.

When the classify function is run on each of the images, they are renamed if the label accuracy is greater then 99.9%. Else they are deleted. The renaming scheme is as follows /tmp/nc_classify/{tagname}-{tagid}-{nextcloudfileid}.jpg

We have to manually check if some images are mislabeled and we simply delete them from the folder. Finally we need to send the labelled images info back to NextCloud. We write the function as follows:

def update_classification():
  client = NCCLient(options) 
  files = os.listdir('/tmp/nc_classify/')
  for f in files:
	match = re.search('(.*)-(.*)-(.*).jpg', f)
	print(match.group(2),match.group(3))
	client.putTag(int(match.group(3)),int(match.group(2)))
	os.remove('/tmp/nc_classify/' + f)

The putTag function is also custom. Please see the gist. And there you go.

Repeat the same process multiple times till your training data get bigger and bigger and it starts to classify more and more images.

Now the next step would be to dig deeper into tensorflow and OCR to automate lists of items I buy from the supermarket and make it generate reports for me.

[Intellectual Property] Part 1: Introduction

Our minds are what drive us everyday to do things. Some tasks we do are  auto-pilot mode and others require us to think. Walking to us seem to be an auto-pilot function but was that always the case? Do you remember the first times you learnt to walk as a baby? It was a very brain intensive process. Our parents taught us part of the solution and our brains adapted the solution to work with our body. Same concept can be said about driving and even talking.

white and green sheetwork on brown surface

Ideas

Our brains generate ideas to our everyday problems in every aspect of our life. But sometimes we let our auto-pilot take control of our selves and we stop being creative. For example, it’s fine to walk from your chair to your bathroom but to walk from your home to your work 15km apart is still possible but it is not practical. Can you come up with some ideas for it?

  • Put shoes instead of waking naked feet. Much more comfort.
  • Walk early in the morning to avoid high sun temperatures.
  • Find a shorter route on the map. Less tiredness and quicker.
  • Take energy drinks on the way. (I really do not recommend this one)
  • Take a bicycle or a bus instead of using our feet. Less tiredness and quicker.

woman walking on the desert

Now let’s imagine you were the first human to come up with those ideas. Would you prevent others from copying you or would you let them copy you but only if they remunerated you in some ways first?

This is where Intellectual Property (IP) comes in place. You will not be able to protect each and every kind of things which your mind can create. The IP system differs in every country and “by striking the right balance between the interests of innovators and the wider public interest, the IP system aims to foster an environment in which creativity and innovation can flourish” [1].

In the next post, we shall see what the different “Creations of the mind” and what are their legal qualifications. In the meanwhile, can you write down few creations of the mind?

[1] https://www.wipo.int/about-ip/en/

 

Using old Android Phones as Surveillance Cameras in Home Assistant

Phones get obsoleted very fast nowadays. Meaning you must have phones lying around in your house which are too slow to be used daily. I had an LG E612 which I thought to use as an IP Camera.

I installed “IP Webcam” app from Google Playstore. We need to note down the IP address and Port of the webservice which it starts. Ideally we should fix the IP address on the DHCP of our routers.

Next we configure Home Assistant to fetch data from our phone.

We then restart Home Assistant and voila! We have our livefeed.

 

Problems encountered:

  • The Android phone seems to be freezing after 5 hours. Maybe it is overheating or something but it doesn’t reboot. It gets stuck on the booting animation. Is it a bug in Cyanogenmod or hardware related?

 

 

Playing PUBG Mobile on the move in Mauritius

It takes me 2 hours to get home at Curepipe (Robinson) from Reduit. It’s scandalous. Plus the bus is crammed with people when it reaches Ebene. We need more 173 and 191 Curepipe buses!!! But anyways, to kill some time, I play this game called PUBG Mobile (Player Unknown Battleground).

I know it’s not the most productive thing to do but yeah, it’s relaxing after a day of work.

It’s very much playable on mobile data. The game doesn’t lag at all while the bus is moving. But my friends were curious about how much data does the game consumes. After 2 matches today. I saw that it took about 18MB.

I think we can safely say that a match is about 10MB max. I use the Zeness Pack from Chili in which I get 750MB for Rs 75 + Vat. That means you will be able to have 2.5 winning matches per day for 30 days. I think online playing on mobile is very accessible now.

Do you also play online games in the bus? Please share with us.