python – elasticsearch – root certificate error

elasticsearch – worked in some instances and not in others.

Failed in virtualenv and Pycharm – reason – missing certfi package. certfi was installed globally so when running in global context worked fine but not inside virtualenv.

installing certfi package fixed issue



python Convert camelCase

Use python str.title() that converts string to TitleCase, then change the first character to lowercase;  if needed ignore characters that are not alphanumeric. Using this to convert header names in a csv file to be used as property names of an object

def to_camel_case(s):
    ret = ''.join(x for x in s.title() if x.isalpha())
    return ret[0].lower() + ret[1:]

Stackoverflow: see posts for other options and any latest info

Python Mac OS X

Things that I had to do for python on Mac OS X. There are amazing resources on the web

After a long gap got back to it. VirtualEnv makes a lot of sense and virtualenvwrapper makes it even better.  Tried to install virtualenvwrapper, due to various things done on the system something was messedup
Error in loading virtualenvwrapper – source gave an error
tried brew install –python. this gave the warning/error that python was found but not linked. After fixing this virtualenvwrapper loaded fine

Fixing python not linked warning/error
brew link –overwrite python


run directly not with python; if with python need full path to