Archive for the ‘rant’ Category

The Python module for file type identification, called ‘magic’, is not standardized

Sunday, March 3rd, 2013

I found the hard way that the API exported by the Python module ‘magic’ differs among different versions of the module.

The version installed when installing the Debian package ‘python-magic’ expects the following API:

import magic
mymagic = magic.open(magic.MAGIC_MIME_TYPE)
mymagic.load()
mtype = mymagic.file(inpfname)
print(”The MIME type of the file %s is %s” % (inpfname,mtype))

The version installed using ‘pip install python-magic’ expects the following API:

import magic
mymagic = magic.Magic(mime=True)
mtype = mymagic.from_file(inpfname)
print(”The MIME type of the file %s is %s” % (inpfname,mtype))

The following code allows the rest of the script to work the same way with either version of ‘magic’:

import magic
def build_magic():
  try:
    mymagic = magic.open(magic.MAGIC_MIME_TYPE)
    mymagic.load()
  except AttributeError,e:
    mymagic = magic.Magic(mime=True)
    mymagic.file = mymagic.from_file
  return(mymagic)
mymagic = build_magic()
mtype = mymagic.file(inpfname)
print(”The MIME type of the file %s is %s” % (inpfname,mtype))

WARNING: Israel will need too long time to recover from the effects of a major earthquake

Friday, November 2nd, 2012

I am publicizing the following as a cautionary tale for Israel, which is faced with earthquake threat any time now, as the last serious earthquake was at 1927 and such earthquakes repeat each 80-100 years.

A week ago, the government of Israel carried out a large scale exercise to simulate the effects of a big earthquake with a tsunami.  The exercise revealed several problems in preparations for the disaster.  The exercise was not intended to, and it did not address long-term disaster recovery needs.

Turns out that in New Zealand, they have a big problem recovering from the earthquakes which struck Christchurch at 4 September 2010 and later dates.  Some of the culprits are the various insurance organizations, which were paid premiums over the years in order to help people recover from such natural disasters.

It made me very worried because if even the developed and well-managed country of New Zealand does not do good work recovering from natural disasters, what hope do we have in Israel?  Especially as the various insurance bodies in Israel are as bad in settling claims as their New Zealand counterparts.

The following account was written by Bob.  He is from Christchurch, New Zealand.  The account was taken, with his permission, from an E-mail message which he sent to an international mailing list to which I am subscribed as well.

The account starts here:

It’s very slow Alan. The council had a zone system setup after the main shocks, in which buildings are red-stickered, white-stickered, green… etc.  Just a day ago - more than 2 years after the September 2010 quake - they
have finally decided what the last few houses are to be zoned as.

The council, as well as the EQC (earthquake commission) and CERA (Christchurch Earthquake Recovery Authority) have cooked up a grand recovery plan, with new buildings to be placed in  certain areas designated as the port zone, culture zone  etc.  Some of the areas contain perfectly fine buildings (one is brand new) and yet are to be pulled down to suit the plan.

The EQC is a govt agency, and if you have building insurance an extra charge is compulsorily added to your premium for disaster recovery insurance. Everyone has been paying this for years, but now we discover that the premium is way too low to pay for much of it. The Government was warned years ago about that, but the finance Minister (same one we’ve got now, Bill English) ignored the warnings.

After the major disaster, this tiny govt department (all they’ve done for years is collect our money and do a poor job of investing it) then had to recruit many new people, such as ex-cops from Australia or unemployed , to go around inspecting homes and buildings to decide what the damage was.  Most of these people are NOT builders and had no experience in building work, so they gave them a checklist and iPods, along with dopey assistants, and sent them off.

Our home, only lightly damaged, had to wait over a year for the first inspection, which was followed up by 2 more because the first was lost in the paperwork. One set of inspectors only walked around the outside - didn’t bother to check the inside at all.

A single commercial company, Fletchers, was appointed as the master repair company and they hired contractors to do the repairs. Some contractors have been fiddling the books, and I’ve heard more than a few crims were taken on (very little checking done) as ’specified repairers’ who had ulterior motives i.e. checking out homes for valuables so they can send burglars in later (armed with a handy floor-plan and details of where stuff was to be found).

The insurers are the worst bunch of crooks ever. Lots of people are still waiting for payouts for damage to their unlivable homes, while they still have to pay rates and mortgages on and cant sell up, while at the same time having to move into rental accommodation (increasingly in short supply) with rents going up and up so that landlords can grab their share of the money to be had.

For everyone who has house insurance, I suggest you check the fine print and see if there is a time limit by which claims have to be settled by the insurers.

AIG in particular is getting a lot of flack for not responding to claims. You insure your house, and expect to get paid out for repairs when it’s damaged - but what if the insurer takes your claim, then just ignores you - for months, years even?

It will be next year (3 years after the first quake) before the repairs start to ramp up.  We’ve had people from the UK come out to help (builders, tradesmen etc) then gone home again because there was nothing for them to do yet (if they wanted to get paid that is).

All in all, while the quakes made a real mess of the city, the ‘repair’ system is a major disaster in itself - no-one seems to know what’s happening. Roads are still a mess, it sometimes takes an hour to get across what is just a small city after all.

Its very depressing, and no wonder that loads of people have said ‘Enough’ and left the city for good.

Bob

What is the difference among Kenya and the Jews?

Friday, July 13th, 2012

In Kenya, FGM (female circumcision) is an extremely important part of one’s group identity (MGM - male circumcision - as well):

In the wake of the German male circumcision ban, the question is asked, why must Jews consider male circumcision (the ritual practiced since the Hashmonite era, rather than the milder ritual practiced before then) to be such an important part of national identity, that attempts to ban it are regarded as antisemitism, rather than as progress to an enlightened world, in which no baby or child gets mutilated due to religious reasons and is free to choose whether to get mutilated once he or she reaches age of 18.

For me, the frightening thing is that Jews use very similar arguments to justify male circumcision, as Kenyans use to justify FGM. Without assuming that one culture or religion is The True One while the others are false ones, both Kenyans and Jews are equally guilty of cruelty to babies and children.

Kenyan cultural change - search for alternatives to FGM as part of group identity: http://www.womenaid.org/press/info/fgm/fgm-kenya.htm.  When will Jews start looking for a way to disassociate national identity from practices which irreversibly harm babies or children?

The Earth Hour and the Deaf

Wednesday, March 23rd, 2011

שעת כדור הארץ והחרשים

ביום חמישי 24.3.2011 שעה 20:00, שוב יכבו את האורות לשעה כדי להעלות את המודעות לאיכות הסביבה.

ושוב, אצטרך להחרים את האירוע כמו שהחרמתי אירועים דומים בשנים קודמות. וזאת למרות תמיכתי ברעיון השמירה על איכות הסביבה.

הסיבה - בגלל חרשותי, אני צריך אור ואביזרים חשמליים שונים כדי לתקשר עם אנשים אחרים.

קישורים נוספים (additional links):

How is the Left in Israel undermining efforts to release Gilad Shalit and why?

Saturday, October 9th, 2010

During the last several months, I noticed that the strongest voices in favor of accepting Hamas’ terms for release of Gilad Shalit, and against tough negotiations - belong to the Left.

The question, then is:  why does the Left press Bibi Netanyahu to surrender to Hamas in the negotiations over Gilad Shalit?

The Leftist movements in Israel, such as Peace Now, have an agenda of demonstrating against the Israeli leaders whenever they try to play tough in peace negotiations with the Arabs, as if playing tough is equivalent to wish for war - rather than wish for peace from better position.  They throw to the winds the maxim that negotiations which end in satisfactory results - start with tough-looking bargaining positions.

In the case of negotiations for Gilad Shalit’s release, I suspect that the Left knows that the key for Gilad Shalit’s release is to act tough and even be cruel toward Hamas activists in Israeli prisons.  However they do not want that the Israeli public be exposed to the experience of tough negotiations with successful outcome.

Therefore, the Leftists would sabotage the process of negotiations by blaming the Israeli leaders for “abandoning” Gilad Shalit only because they try to play tougher in negotiations with Hamas.  Nevermind the fact that true abandonment means that no one is giving attention to the abandoned person; rather than having to do with the specific kind of attention being given.  The Leftists demonstrate - not against Hamas or the International Red Cross - but against Bibi Netanyahu and the other Israeli leaders.  They try to persuade Netanyahu to release dangerous terrorists, whose release is sure to lead to tens and hundreds of Israeli victims.

Seems that for the Left, it is better to keep the Gilad Shalit problem unsolved, rather than risk the lesson that playing tough in negotiations pays huge dividends.

Water quotas and bad socialism

Monday, October 4th, 2010

Israel currently suffers from serious water shortage.  Efforts to alleviate the shortage are underway.  One of the efforts is getting people to consume less water each month, by providing them with a certain quantity of water at one price, and any excess consumption costs much higher price.

This is bad socialism and is harmful to the liberty of people, because water bills are by apartments.  So people need to declare how many people live in an apartment, and if someone moves to another apartment, the water bill payers of both apartments need to declare this change of living place.

A better solution would be to do what was done with bread few years ago.  Economically, it was necessary to raise the price of bread.  It was handled in a better way - the price was allowed to rise, but people, who live on welfare, got few extra NIS each month, to cover the extra cost of bread, so that they won’t be worse off.

In the case of water, poor people at any case lack the capital for investing into water saving measures - plugging any leaks in the water pipes, installing water flow limiters (חסכמים) in the taps, shower sewage recyclers, rain water collectors, etc.  Well to do people can afford to make the investment which will reduce their water consumption - but need economic motivation to do so.

My suggestion is to provide water to everyone at high price.  No need to report how many people live in each household.  No need to compute water quotas for provision at lower price.  However the monthly payments to people on welfare and on fixed budgets are to be adjusted upwards so that they’ll not be worse off than they were before.

American Jews are worried due to the recent conversions scandal

Thursday, September 9th, 2010

Recently an American Jew asked me the following question, in view of the news concerning recognition of conversions into Judaism carried out in the Israeli army (IDF):

Hey, let me ask you something. My wife told me that Israel is in the middle of redefining who is a Jew, and that Reform/secular/assimilated people like me wouldn’t be considered Jews any more. Is that going to affect the Law of Return?

My reply to him was:

The law of return won’t be affected, but ability to marry in Israel will be affected, because the Chief Rabbinate has legal monopoly over marriages of Jews (corresponding bodies have monopolies over Christians, Moslems and Druze) and the scandal over recognition of conversions into Judaism (the actual subject worrying your wife) is relevant to getting recognized as Jews by the Chief Rabbinate.

People, who cannot marry in Israel, usually fly to Cyprus to get married there, and then their marriage is recognized in Israel.  I have a cousin, who married in Cyprus, just because she was disgusted by the Chief Rabbinate.

The Law of Return explicitly covers non-Jews - if they have Jewish relatives (one Jewish grandparent or a Jewish spouse is enough).

As things look like, few years from now, civil marriages will be possible in Israel, because the group of people, covered by the Law of Return yet cannot marry in Israel, is growing each year (most of them are immigrants from the former Soviet Union and their descendants).

In favor of identifying with Shalit family’s pain, against freeing Gilad in exchange for terrorists who murdered Israelis

Thursday, July 1st, 2010
  1. My accounting is simple:The terrorists, who were released in exchange for Elechanan Tanenbaum few years ago, have murdered 29 Israelis by now in terror attacks.

    There is no doubt that the terrorists, whose release is demanded by Hamas in exchange for freeing Gilad Shalit, will murder even more Israelis in the next few years.

    The only difference among Gilad Shalit and those Israelis is that today we know who is Gilad Shalit, and we can associate with him a photo, parents in distress and a life story.  Whereas those dead Israelis are today nameless and we have no way to associate with them a photo, grieving relatives or life story.  Only after they have lost their lives, we’ll know who they were.

  2. Another aspect which no one seems to have thought about:Suppose Gilad Shalit is freed in exchange for all those terrorists and returns to live in Israel.  How will his life look like under the burden of Israelis who are killed or otherwise put at risk by those terrorists?  Won’t he feel obliged to live up to them as they sacrificed their lives to release him?  Won’t he be able to enjoy his life as a free man without onerous obligations?  Would he be able to live normal life under the weight of obligations to those who risked and sacrificed their lives to secure his release?

I am alarmed by Right-wing activists attack on misguided Left-wing activists

Saturday, June 5th, 2010

Let it be clear.  I believe that the Left-wing activists, who protest against the Israeli government’s handling of Gaza Strip in general and the flotilla in particular, are stupid, closed-minded, misguided and effectively are fifth column.

However, none of those attributes justify any form of attack on them by Right-wing activists.  Not the smoke grenade, not personal attack on Uri Avneri and his ilk, nothing except for counter-demonstration.

Freedom of expression counts the most when one wants to express highly annoying opinions.  Freedom of expression, in particular the freedom to question any of our sacred cows, is one of the foundations of our strength.

Let’s not deprive ourselves of real strength by threatening or silencing those misguided people!

Celebrating Towel Day by forgetting a towel

Tuesday, May 25th, 2010

Today, fans of the late Douglas Adams celebrate the Towel Day in his memory.
I managed to celebrate it by forgetting, for 1st time since I started to exercise in that particular gym, to bring my obligatory towel to the gym today.
Fortunately, a paper towel was available.