Categories
Computing Data Science

Global Warming: self-learning journey to build the story with data science

When I was working at MathWorks, I had the opportunity to create a demo in MATLAB that provides a simple walkthrough of how to perform a data science workflow on Domino Data Lab‘s MLOps platform. The demo showed how to use climate data from NOAA, to build a simple prediction tool that uses machine learning (ML) regression.

With the goal of telling you whether you should consider buying an air conditioner, the model predicts how many hot days upcoming years hold in store for us. A hot day is defined as one with a temperature over 29° Celsius (or 84° Fahrenheit). You name a location, and the model predicts the number of hot days.

More than two years later and I am now a member of the Domino team. I am also embarking on a new project to demonstrate our deep integration with a major data store partner, and creating the demo in Python this time. This post and subsequent ones will act as my travelogue for the project.

Share
Categories
Computing Mac OS X PHP Web Development

Enabling Oracle OCI8 PHP Extension on OS X Snow Leopard

My current project involves using PHP with an Oracle database. Oracle apparently embraces PHP warmly and as such supports an open source database driver for the environment called OCI8. As a Mac user I was looking to use OS X's built-in Apache and PHP setup, which like many PHP installations does not have the Oracle OCI8 driver installed or enabled. It took me some time and research to get it up and running. I was using Oracle Express, a limited capability, free-ish version of Oracle's database. Oracle Express was installed on a separate Windows machine as it cannot run or be installed on Snow Leopard. I also assume that you enabled PHP in your Apache configuration (/etc/apache2/httpd.conf) and have a /etc/php.ini by copying it from /etc/php.ini.default.

OCI8 relies on OS X having several client libraries and tools from Oracle installed on OS X. For most intents and purposes download the 64-bit version of the following files under the title "Version 10.2.0.4 (64-bit)": 

Registration is required for all downloads.

Share
Categories
Computing General ios iphone

SQLite ORDER BY does not work on integers: time for an index

My current project uses SQLite as it is really the only game in town on iOS. SQLite indexes provide an incredible performance boosts when you are dealing with large datasets. They apparently play a crucial role when it comes to something of a foregone conclusion in other databases – sorting.

What stumped my colleagues and I was that we had a database table where one of the columns had an INT (and also tested using an INTEGER) type (and yes – they are all NUMERIC to SQLite) – and ORDER BY kept returning incorrectly sorted results. According to this post on Stack Overflow, when you have a SQLite query that uses the ORDER BY, it may rely on temporary tables. Those in turn 'confuse' the database when it runs the query to sort your table.

The answer – add an index. Something as simple as

CREATE INDEX index_name ON table_name
(
   NAME_OF_COLUMN_TO_SORT ASC
);

Once you add it – you are, well – sorted out.

Share
Share