I had a NumPy array of numbers, which I had to split based on the change of value.
For example, consider an array as shown below.
values = [112.0, 111.0, 113.0, 111.0, 112.0, 112.0, 112.0, 113.0, 113.0,
113.0, 114.0, 114 …I had a NumPy array of numbers, which I had to split based on the change of value.
For example, consider an array as shown below.
values = [112.0, 111.0, 113.0, 111.0, 112.0, 112.0, 112.0, 113.0, 113.0,
113.0, 114.0, 114 …Importing data from postgres tables into HDFS using sqoop could be done with the following steps.
Make sure postgres jdbc connector is available in /usr/share/java directory.
To list all available tables in the postgres database
$ sqoop list-tables \
--connect jdbc:postgresql://hostname.com/databaseName \
--username myUserName \
--password myPassword
To …
Few days back I saw @shrayasr tweet about the number of proposals for PyCon India 2014 and his solution to help filter the proposals.
I wrote about the issue I faced when looking through #pyconindia2014 funnel: http://t.co/9Qo6DoCjkF
— Shrayas Rajagopal (@shrayasr) May 31, 2014
Made the #pyconindia2014 funnel …
Categorizing an array into different buckets in d3js with d3.nest.
For example, consider a dataset that contains an array of integers ranging values from 1 to 200. If we had to group this array into the following four buckets, as defined as;
When trying to connect remote postgresql server with pgAdmin, leads to "Unable to connect" error.
To enable pgAdmin to connect, edit the following configuration in the server:
$ sudo vim /etc/postgresql/9.3/main/postgresql.conf
listen_address = '*'
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
local all postgresql trust …The following link provides an extensive guide on setting up a multi-node cluser with Hortonworks HDP2 on EC2.
Multi-node cluster installation guide
Though setting up single-node cluster from this guide is quite obvious, I'm documenting here those few so called obvious deviations.
The operating system I choose to install is …
I was getting the below mentioned exception on my Java client which is trying to establish URL connection to a server.
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
The Java client was actually trying to get an XML from the the URL and store it locally in a file as …
PyTypeObject is a structure that defines the basic building blocks of Python, Types.
The definition as found in Include/Object.h file:
typedef struct _typeobject {
PyObject_VAR_HEAD
const char *tp_name; /* For printing, in format "<module>.<name>" */
Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */
/* Methods to implement standard operations */
destructor …I'm starting to read the Core Python Programming book. Over past few months I've already started to program in python, like developing web apps with django and data analytics with pandas. I started to like the language, so wanted to go back to the basics of it and I'm begining …