Sunday, September 14, 2014

Read a DBF file's metadata and data with Python and xtopdf

By Vasudev Ram

DBF files (a.k.a. XBASE files), were one of the most widely used data formats for storing structured relational data on PCs, due to the fact that the original products that used DBF files, dBase II and III, were among the most successful database products of their time (the early personal computer era). DBF is probably still very widely used as a format in small and medium-sized desktop-based applications., a program I wrote as part of my xtopdf toolkit for PDF creation using Python, can be used to read the contents of a DBF file, including both the metadata (file and field header information) and the data records, and display them on the screen.

Here is an example invocation of
python test3.dbf | more
This command will read the metadata and data of the specified DBF file and display them on your screen. Here is the output from the above command:
File header :

key: rec_len value: 30
key: ver value: 245
key: hdr_len value: 193
key: last_update value: 02/11/04
key: num_flds value: 5
key: num_recs value: 4

Field headers :

num_flds =  5
       Name |   Type | Length | Decimals
  FIELD1    |       C|       5|       0
  FIELD2    |       N|       5|       0
  FIELD3    |       L|       1|       0
  FIELD4    |       D|       8|       0
  FIELD5    |       M|      10|       0

Data records:

(' ', ['AAAAA', '11111', 'F', '19010101', '          '])
(' ', ['BBBBB', '22222', 'T', '19020202', '          '])
(' ', ['CCCCC', '33333', 'F', '19030303', '          '])
(' ', ['DDDDD', '44444', 'T', '19040404', '          '])

- Vasudev Ram - Python consulting and training - Dancing Bison Enterprises

Contact Page

Friday, September 12, 2014

HP buys Eucalyptus, ex-MySQL CEO to lead cloud effort

By Vasudev Ram

Interesting news, from GigaOm:

HP buys Eucalyptus as cloud consolidation commences for real

Excerpt from the GigaOm article:

[ Hewlett-Packard, which is basing its cloud strategy on OpenStack, has decided to buy Eucalyptus, a backer of a rival open-source cloud technology. And Eucalyptus CEO Marten Mickos, will lead the company’s cloud effort as SVP and general manager of HP’s cloud Business. ]

- Vasudev Ram - Dancing Bison Enterprises

Contact Page

Interview with Mark Shuttleworth, Ubuntu and Thawte founder

By Vasudev Ram

Saw this interview today via Twitter. The interview is on the Binpress site.

It is an interview of Mark Shuttleworth, the founder of Ubuntu Linux, and of the Thawte certificate authority before that.

Excerpts from the interview that I found interesting:

[ I think it’s really important in open source that we recognize that it’s good when you have that sort of diversity. If we said we only need one way to cache content on the web, well then you wouldn’t have Squid, and you wouldn’t have Varnish, and you wouldn’t have nginx, and you wouldn’t have HAProxy, and any other number ofvery useful tools that people have created. ]

[ There are operating systems and manufacturers that have an agenda. It’s easy to put out quite emotional language, emotive language saying, “Oh. Don’t trust the other guys.” But really the question that has to be asked, what’s your agenda, and trying to stop people from investing in open source. Right? This comes back to, I think, what it’s like to be an open-source developer.

There’s a lot of sledging that goes on. Amongst perhaps the less thoughtful members of the open-source community, it’s very easy and fun, sometimes fun just sort of pile on to that sledging. Well, hold on a sec. As an open source user, you benefit tremendously from that kind of innovating, and competition, and diversity. To trash that is very self-defeating as a user. ]

- Vasudev Ram - Dancing Bison Enterprises

Contact Page

Sunday, August 31, 2014

Copyscape, online plagiarism detector

By Vasudev Ram

Saw this interesting site today - Copyscape.

It lets you find web pages of yours which have been copied somewhere else on the web.

Copyscape is by Indigo Stream Technologies Ltd., founded by Gideon Greenspan, an entrepreneur.

About Copyscape.

- Vasudev Ram - Dancing Bison Enterprises

Contact Page

Monday, August 18, 2014

Sunset beach

By Vasudev Ram

- Vasudev Ram - Online Python training and consulting

Contact Page