Formula to convert Epoch Timestamps to Readable Date in Excel

Writing by on Thursday, 20 of November , 2014 at 1:47 am

If you have several epoch times that you want to convert to human readable date then here’s a great post from spreadsheetpage.com on converting Unix Timestamps.

In a nutshell … you use the provided formula and then format to date.

For GMT
=(((A1/60)/60)/24)+DATE(1970,1,1)

For Pacific
=(((A1/60)/60)/24)+DATE(1970,1,1)+(-8/24)

Right Click the Cell –> Format Cells –> Date

Leave a comment

Category: Tips and Tricks

Must Have Mac Apps

Writing by on Wednesday, 12 of November , 2014 at 4:43 am

Here’s a list of Apps that I must have on my Mac:

Leave a comment

Category: Apple

Delete Selective or Filtered History from Chrome

Writing by on Tuesday, 11 of November , 2014 at 9:20 pm

If you’re having trouble selecting entries one at a time (because there’s no Select All option available) then here’s a quick workaround to selectively clear your Google Chrome History.

  • In the Chrome Address Bar type chrome://history
  • To Filter and Delete Selective history, enter search criteria and hit Search History
  • There’s no Select All Option but here’s a workaround …
  • Select the first entry from where you want deletion to begin
  • Scroll down to the end or desired entry and Shift Click that item
  • Scroll up top and hit Remove Selected Items

That should be quicker than individually selecting the entries.

Leave a comment

Category: Tips and Tricks

Accessing values from a Unicode dictionary in Python

Writing by on Saturday, 8 of November , 2014 at 10:05 pm

I was running into several errors while accessing a dictionary persisted in MongoDB as JSON (with Unicode) until I found this post on stackoverflow.com.

TypeError: string indices must be integers, not unicode

So basically the way to workaround the problem is as follows:

import json, ast

# You would assume this would work ...
somekey_val = dict[SOME_KEY]

# but due to frustrations with unicode in python handle it
try:
    somekey_val = ast.literal_eval(dict[SOME_KEY])
except Exception, e:
    print 'unicode conversion not needed for some_key'

# do regular processing from here on
process( somekey_val )

Leave a comment

Category: Python

Python TypeError: datetime.datetime not JSON serializable while using Mongo

Writing by on Monday, 3 of November , 2014 at 6:18 pm

This post from stackoverflow.com explains it.

Basically, you will need to use the default=json_util.default argument as defined in the PyMongo Docs

So, while converting a date object in a dictionary to JSON

from bson import json_util
import json
json_str = json.dumps(anObject, default=json_util.default)
print json_str

And while reading back the JSON string into a dictionary

from bson import json_util
import json
json.loads(json_str, object_hook=json_util.object_hook)

Leave a comment

Category: Python

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.