nov 2 2016 The Indian state of Punjab is known as India’s breadbasket. Despite its relatively small size, Punjab ranks among the nation’s top wheat and rice producers. For a few weeks in October and November, Punjab also becomes a major producer of air pollution. Punjab has two growing seasons and two main crops. Rice is planted in May and grown through September; wheat is planted in November and grown through April. Since rice leaves behind a significant amount of plant debris after harvest, many farmers burn the leftover debris in October and November to quickly prepare their fields for the wheat crop. In early October 2016, Earth-observing satellites began to detect small fires in Punjab, and the number of fires increased rapidly in the following weeks. By November, thousands of fires burned across the state, and a thick pall of smoke hovered over India. The Visible Infrared Imaging Radiometer Suite (VIIRS) on the Suomi NPP satellite captured a natural color image on November 2, 2016. The map (second image) shows the locations of the fires VIIRS also detected. Since the fires are small, short-lived, and burn at relatively low-temperatures, the smoke generally stays near the surface. On November 2, winds carried a stream of smoke—likely mixed with small particles of soil, dust, and partially burned plant material—toward New Delhi. The smoke from Punjab combined with urban pollution from vehicles, industry, and fireworks to push levels of particulate matter in the capital city to unusually high levels. The number of fires in Punjab generally decreases by the middle of November, according to a study of satellite data collected between 2004 and 2014. References and Related Reading NASA Earth Observatory images by Joshua Stevens, using VIIRS data from the Suomi National Polar-orbiting Partnership and the Fire Information for Resource Management System (FIRMS). Suomi NPP is the result of a partnership between NASA, the National Oceanic and Atmospheric Administration, and the Department of Defense. Caption by Adam Voiland.

In early October 2016, Earth-observing satellites began to detect small fires in the farms of Punjab, India, and the number of fires increased rapidly in the following weeks. By Nov. 2, when the image was taken, thousands of fires burned across the state, and a thick pall of smoke hovered over India. The winds also carried a stream of smoke towards New Delhi, covering the entire region and pushing levels of particulate matter to unusually high levels.

Advertisements

From

The History of Python

A series of articles on the history of the Python programming language and its community.

A blog by Guido van Rossum

 

I was asked (again) today to explain why integer division in Python returns the floor of the result instead of truncating towards zero like C.

For positive numbers, there’s no surprise:

>>> 5//2

2

But if one of the operands is negative, the result is floored, i.e., rounded away from zero (towards negative infinity):

>>> -5//2

-3

>>> 5//-2

-3

This disturbs some people, but there is a good mathematical reason. The integer division operation (//) and its sibling, the modulo operation (%), go together and satisfy a nice mathematical relationship (all variables are integers):

a/b = q with remainder r

such that

b*q + r = a and 0 <= r < b

(assuming a and b are >= 0).

If you want the relationship to extend for negative a (keeping b positive), you have two choices: if you truncate q towards zero, r will become negative, so that the invariant changes to 0 <= abs(r) < otherwise, you can floor q towards negative infinity, and the invariant remains 0 <= r < b. [update: fixed this para]

In mathematical number theory, mathematicians always prefer the latter choice (see e.g. Wikipedia). For Python, I made the same choice because there are some interesting applications of the modulo operation where the sign of a is uninteresting. Consider taking a POSIX timestamp (seconds since the start of 1970) and turning it into the time of day. Since there are 24*3600 = 86400 seconds in a day, this calculation is simply t % 86400. But if we were to express times before 1970 using negative numbers, the "truncate towards zero" rule would give a meaningless result! Using the floor rule it all works out fine.

Other applications I’ve thought of are computations of pixel positions in computer graphics. I’m sure there are more.

For negative b, by the way, everything just flips, and the invariant becomes:

0 >= r > b.

So why doesn’t C do it this way? Probably the hardware didn’t do this at the time C was designed. And the hardware probably didn’t do it this way because in the oldest hardware, negative numbers were represented as "sign + magnitude" rather than the two’s complement representation used these days (at least for integers). My first computer was a Control Data mainframe and it used one’s complement for integers as well as floats. A pattern of 60 ones meant negative zero!

Tim Peters, who knows where all Python’s floating point skeletons are buried, has expressed some worry about my desire to extend these rules to floating point modulo. He’s probably right; the truncate-towards-negative-infinity rule can cause precision loss for x%1.0 when x is a very small negative number. But that’s not enough for me to break integer modulo, and // is tightly coupled to that.

PS. Note that I am using // instead of / — this is Python 3 syntax, and also allowed in Python 2 to emphasize that you know you are invoking integer division. The / operator in Python 2 is ambiguous, since it returns a different result for two integer operands than for an int and a float or two floats. But that’s a totally separate story; see PEP 238.

“ Risk

Posted: December 4, 2016 in Inspiration
Tags: ,

To laugh is to risk appearing a fool,
To weep is to risk appearing sentimental.
To reach out to another is to risk involvement,
To expose feelings is to risk exposing your true self.
To place your ideas and dreams before a crowd is to risk their loss
To love is to risk not being loved in return,
To hope is to risk despair,
To try is to risk failure.

But risks must be taken because
the greatest hazard in life is to risk nothing.
The person who risks nothing,
does nothing, has nothing, is nothing.
He may avoid suffering and sorrow,
But he cannot learn, feel, change, grow or live.
Chained by his servitude he is a slave
who has forfeited all freedom.
Only a person who risks is free
.”

By William Arthur Ward

 

The Science of Flaming Farts. By Esther Inglis-Arkell | io9 | Image Credit: Gif made by The Science of Reality, video via Youtube.

You know you’ve always wondered why farting on a lighter causes a brief burst of flame. Believe it or not, there is rarely any methane in farts, and so methane is not what’s burning when farts are ignited. Find out what does, and why some farts ignite and others don’t.
It’s a commonly-held belief that farts contain methane, which is why they smell and they can ignite. And this would be true, if people were cows. Actually, the gut bacteria of humans generally don’t produce methane. There are certain kinds, which live in a certain percentage of the population, that do produce methane, but it’s far from in the majority of farts.
What actually makes it through your body will depend on many things, including what you put in. Eggs, cauliflower, and meats are often more sulfur-rich and so add a little hydrogen sulfide to the final, ah, product. As for the rest, the largest component is often nitrogen, which is already a good portion of the atmosphere, and so doesn’t ignite all that readily.
What will? Mostly it’s the hydrogen in the hydrogen sulfide that’s released. Occasionally, if the person does have the lucky gut that produces methane, it will burn along with the hydrogen. In order to get the most flammable fart, people will generally eat sulfur-rich foods. It’s not a good idea to hold them in and store them up, as to those who have tested the technique a held-in fart is less likely to catch fire.

A typical breakdown of the chemical composition of farts via About.com’s Chemistry section:
Nitrogen: 20-90%
Hydrogen: 0-50% (flammable)
Carbon dioxide: 10-30%
Oxygen: 0-10%
Methane: 0-10% (flammable)

Oh, but don’t go for the matches just yet. About a quarter of the fart igniters get burned in the process. There is no way to stress how little anyone likes to get burned in that area. Worse, the ignition of the released fart can ignite gasses higher up the intestinal tract, and sometimes, high in the intestinal tract, there will be swallowed oxygen. Oxygen is swallowed daily, but generally doesn’t make it out of the body because it is so readily absorbed into cells.
Oxygen is also likely to ignite explosively if heated, and this has happened during surgical procedures carried out in the intestinal area – though there is no record of it happening when someone tried to ignite their farts. Still, it’s a bad idea to take even the most remote chance on an internal Hindenburg. Just let this knowledge seep into your mind, and keep your downstairs area well clear of it.
Via Fart Sounds

 

You know you’ve always wondered why farting on a lighter causes a brief burst of flame. Believe it or not, there is rarely any methane in farts, and so methane is not what’s burning when farts are ignited. Find out what does, and why some farts ignite and others don’t.

It’s a commonly-held belief that farts contain methane, which is why they smell and they can ignite. And this would be true, if people were cows. Actually, the gut bacteria of humans generally don’t produce methane. There are certain kinds, which live in a certain percentage of the population, that do produce methane, but it’s far from in the majority of farts.

What actually makes it through your body will depend on many things, including what you put in. Eggs, cauliflower, and meats are often more sulfur-rich and so add a little hydrogen sulfide to the final, ah, product. As for the rest, the largest component is often nitrogen, which is already a good portion of the atmosphere, and so doesn’t ignite all that readily.

What will? Mostly it’s the hydrogen in the hydrogen sulfide that’s released. Occasionally, if the person does have the lucky gut that produces methane, it will burn along with the hydrogen. In order to get the most flammable fart, people will generally eat sulfur-rich foods. It’s not a good idea to hold them in and store them up, as to those who have tested the technique a held-in fart is less likely to catch fire.

 

A typical breakdown of the chemical composition of farts via About.com’s Chemistry section:

  • Nitrogen: 20-90%
  • Hydrogen: 0-50% (flammable)
  • Carbon dioxide: 10-30%
  • Oxygen: 0-10%
  • Methane: 0-10% (flammable)

 

Oh, but don’t go for the matches just yet. About a quarter of the fart igniters get burned in the process. There is no way to stress how little anyone likes to get burned in that area. Worse, the ignition of the released fart can ignite gasses higher up the intestinal tract, and sometimes, high in the intestinal tract, there will be swallowed oxygen. Oxygen is swallowed daily, but generally doesn’t make it out of the body because it is so readily absorbed into cells.

Oxygen is also likely to ignite explosively if heated, and this has happened during surgical procedures carried out in the intestinal area – though there is no record of it happening when someone tried to ignite their farts. Still, it’s a bad idea to take even the most remote chance on an internal Hindenburg. Just let this knowledge seep into your mind, and keep your downstairs area well clear of it.

Everything in this world has started to end. It’s all about what we make of it before it ends .

Just a random thought which came into my mind after watching the movie Paan Singh Tomar . Well if you watch the movie , you will feel the same.

Quote  —  Posted: October 16, 2013 in Uncategorized
Tags: , ,

  • New programming language to build DNA here.
  • Rare 35-foot dinosaur fossil found here.
  • Self-assembling cube robots here.
  • FDA approves first artificial pancreas here.
  • New shape-changing metal crystal here.
  • 4,000 year old preserved brain here.
  • Super volcanoes on Mars here.
  • Blind man’s sight restored after OOKP procedure here.
  • Stimulated, grafted ovaries restored here.
  • 60 new possible species in Suriname rainforest here.
  • Possible new tick species here.
  • Engineering stem cells to deliver drugs here.

October 11, 2013
5 Comments

Life is an adventure, dare it

 

Life Is….
by Mother Teresa

“Life is an opportunity, benefit from it.
Life is beauty, admire it.
Life is a dream, realize it.
Life is a challenge, meet it.
Life is a duty, complete it.
Life is a game, play it.
Life is a promise, fulfill it.
Life is sorrow, overcome it.
Life is a song, sing it.
Life is a struggle, accept it.
Life is a tragedy, confront it.
Life is an adventure, dare it.
Life is luck, make it.
Life is too precious, do not destroy it.
Life is life, fight for it.

The ultimate key to achievement

Posted: October 10, 2013 in Uncategorized

Happinessecrets

We all have dreams, hopes, wishes. Sometimes we even have secret dreams, being afraid to share them with the people around us. How many times you wished for something and you just let it go, telling yourself that dreams are only dreams and that normal people are just realistic, they don’t walk around dreaming? How many excuses you found, managing to shut down your inner voice?
What happens to you knowing that you want something and you don’t even try very hard to achieve it?
You die, bit by bit, every day…

It’s time to be you, it’s time to be free!
Here are the main ingredients to achieve every goal in your life: knowing what you want, confidence in yourself, determination, time, dedication, patience.
What’s missing?
The ultimate key: assuming the risk.

We can’t gain without loosing, life it’s a continuous transformation, it’s like business: you have to invest…

View original post 224 more words

Yesterday, the Nobel Prize in Physics was awarded to three physicists that helped discovered the Higgs boson. But, what is the Higgs boson?

To best explain, here’s a cocktail party filled with physicists. Suddenly, an accountant walks into the room. Because none of the physicists want to talk to him, the accountant easily makes his way to the bar

image

 

Now imagine, if instead of an accountant, physics superstar Peter Higgs walked into the room. He would be swarmed by physicists eager to talk to him and would have to push his way to the bar.

image

In the above scenarios, the physicists at the party are the Higgs field. They interact differently with different people that walk in (just like the actual Higgs field interacts differently with different particles).

image

Now imagine someone on one side of the party starts a rumor. The rumor will move through the crowd as people clump together to hear it. This clump of people is like the Higgs boson.

For the full story behind the Higgs boson, check out Don Lincoln’s The Higgs Field, explained (animation by Powerhouse Animation Studios Inc.)

If you’d prefer to learn about the Higgs via milkshake instead of cocktail party, check out Dave Barney and Steve Goldfarb’s The basics of the Higgs boson.

Believe in yourself…

Posted: October 8, 2013 in Uncategorized

JUMP FOR JOY Photo Project

“Believe in yourself and all that you are. Know that there is something inside you greater than any obstacle.” ~ Christian D.

View original post