Monday, June 21, 2021

The Vatican's ticking time bomb: Where's MapQuest when we need it?

 


Since "Angels & Demons" depends on a split-second schedule and a ticking time bomb that could destroy the Vatican, it's a little distracting when the Camerlengo, a priest entrusted with the pope's duties between papacies, breaks into the locked enclave of the College of Cardinals and lectures them on centuries of church history.

 

These men, many of them elderly, may face death in minutes, which the Camerlengo knows. The Commander of the Swiss Guard thinks he can evacuate the Vatican and the hundreds of thousands of faithful waiting in St. Peter's Square in 15 minutes before an explosion vaporizes "a big chunk of Rome," but frankly we in the audience think a lot of monsignors back home are going to receive promotions real soon.

 

Since very few plot details in the film are remotely plausible, including its desperate chase across Rome, the history lesson is excusable. Having been told about the long war between the church and the Illuminati, and religion and science, we are grateful for the briefing, even if the cardinals already know most of the history. This kind of film requires us to be very forgiving, and if we are, it promises to entertain. "Angels & Demons" succeeds.

 

It's based on a novel that came before "The DaVinci Code" in Dan Brown's oeuvre. Prof. Robert Langdon (Tom Hanks) is at Harvard when he is summoned from a swimming pool by an emissary from the Vatican, and flown to Rome to face a crisis. Earlier, we learned, a rare, sealed vial of anti-matter was stolen from the CERN Large Hadron Collider in Geneva, and a note taking credit comes from the Illuminati, a secret society that has long hated the Catholic Church because of the days when it persecuted Galileo and other scientists.

 

A "popular and progressive" pope has just died. The cardinals have been summoned to elect his successor. Four of them, the preferati, the favorites to be next pope, have been kidnapped. They will be executed in succession at 8, 9, 10 and 11 p.m., until the battery on the anti-matter vial runs out of juice at midnight and the faithful will see more than a puff of white smoke above the Vatican. I don't recall if the Illuminati had any demands. Maybe it just wants revenge.

 

In that case, why hide the vial at the end of a trail that can only be followed by clues discovered or intuited by Professor Langdon? Why not just blow up the place? What is the purpose of the scavenger hunt? Has it all been laboriously constructed as a test of Langdon's awesome knowledge? Are the Illuminati trying to get even after Langdon foiled Opus Dei, another secret society, in "The DaVinci Code"?

 

I don't know, and, reader, there is no time to care. Langdon uses his knowledge of Illuminati symbols to follow the trail though four Rome churches. He has uncanny luck. He spots and correctly identifies every clue, even though they're very well-hidden. Just as well, because one dungeon overlooked or one statue pointing the wrong way, and he loses. For his companion, Langdon has the beautiful and brilliant Vittoria Vetra (Ayelet Zurer) from CERN. Her father was murdered in the anti-matter theft. Her purpose is (a) to explain that the battery will indeed run down, (b) request her father's secret journals from Geneva, although they are never read, and (c) run along everywhere with Tom Hanks, to provide him with urgent conversation.

 

Meanwhile, there is intrigue within the Vatican and lots of red herrings among all the red hats. The young Camerlengo (Ewan McGregor), the adopted son of the late pontiff, joins the professor's desperate quest, as does the commander (Stellan Skarsgard) of the pope's protectors, the Swiss Guard. Inside the conclave, Cardinal Strauss (Armin Mueller-Stahl) is in charge of the election. Because of his sinister mien (I love the phrase sinister mien), German accent and absolutist views on church tradition, he seems set up to be a suspect, since the progressive pope's death may have been an inside job. (I forgot to mention that there has also been time to exhume the pontiff's remains and discover evidence of poisoning.)

 

All of this happens at breakneck speed, with little subtlety, but with fabulous production values. The interiors of the Sistine Chapel, the Pantheon, churches, tombs and crypts are rendered dramatically, the College of Cardinals looks both (a) very impressive, and (b) like a collection of elderly extras from Cinecitta.

 

The film by no means tilts the conflict between science and religion one way or the other. The professor is not religious, indeed seems agnostic, but the church, however, is not portrayed as anti-science. Galileo would be happy that there is now a Vatican Observatory. If the Illuminati are indeed scientists, they would better employ themselves not avenging ancient deeds, but attacking modern fundamentalist cults.

 

The professor has a fascinating exchange with the Camerlengo, who asks him if he believes in God. He believes, he says, that the existence is God is beyond his mind to determine. "And your heart?" asks the priest. "My heart is not worthy." Agnostics and believers can both find something to agree with there; director Ron Howard does an even-handed job of balancing the scales.

 

So good, indeed, that even after Howard accused the church of refusing him access to Vatican locations, and although the dependable William Donohue of the Catholic League has attacked his film, "Angels & Demons" received a favorable review from the official Vatican newspaper L'Osservatore Romano, which wrote it is a "harmless entertainment which hardly affects the genius and mystery of Christianity."

 

And come on, Ron: Would you expect the church to let you shoot a Dan Brown thriller in the Sistine Chapel? Get real.

Veni, Vidi, Da Vinci

 


They say The Da Vinci Code has sold more copies than any book since the Bible. Good thing it has a different ending. Dan Brown's novel is utterly preposterous; Ron Howard's movie is preposterously entertaining. Both contain accusations against the Catholic Church and its order of Opus Dei that would be scandalous if anyone of sound mind could possibly entertain them. I know there are people who believe Brown's fantasies about the Holy Grail, the descendants of Jesus, the Knights Templar, Opus Dei and the true story of Mary Magdalene. This has the advantage of distracting them from the theory that the Pentagon was not hit by an airplane.

 

Let us begin, then, by agreeing that The Da Vinci Code is a work of fiction. And that since everyone has read the novel, I need only give away one secret -- that the movie follows the book religiously. While the book is a potboiler written with little grace and style, it does supply an intriguing plot. Luckily, Ron Howard is a better filmmaker than Dan Brown is a novelist; he follows Brown's formula (exotic location, startling revelation, desperate chase scene, repeat as needed) and elevates it into a superior entertainment, with Tom Hanks as a theo-intellectual Indiana Jones.

 

Hanks stars as Robert Langdon, a Harvard symbologist in Paris for a lecture when Inspector Fache (Jean Reno) informs him of the murder of museum curator Jacques Sauniere (Jean-Pierre Marielle). This poor man has been shot and will die late at night inside the Louvre; his wounds, although mortal, fortunately leave him time enough to conceal a safe deposit key, strip himself, cover his body with symbols written in his own blood, arrange his body in a pose and within a design by Da Vinci, and write out, also in blood, an encrypted message, a scrambled numerical sequence and a footnote to Sophie Neveu (Audrey Tautou), the pretty French policewoman whom he raised after the death of her parents. Most people are content with a dying word or two; Jacques leaves us with a film treatment.

 

Having read the novel, we know what happens then. Sophie warns Robert he is in danger from Fache, and they elude capture in the Louvre and set off on a quest that leads them to the vault of a private bank, to the French villa of Sir Leigh Teabing (Ian McKellen), to the Temple Church in London, to an isolated Templar church in the British countryside, to a hidden crypt and then back to the Louvre again. The police, both French and British, are one step behind them all of this time, but Sophie and Robert are facile, inventive and daring. Also, perhaps, they have God on their side.

 

This series of chases, discoveries and escapes is intercut with another story, involving an albino named Silas (Paul Bettany), who works under the command of the Teacher, a mysterious figure at the center of a conspiracy to conceal the location of the Holy Grail, what it really is, and what that implies. The conspiracy involves members of Opus Dei, a society of Catholics who in real life (I learn from a recent issue of the Spectator) are rather conventionally devout and prayerful. Although the movie describes their practices as "maso-chastity," not all of them are chaste and hardly any practice self-flagellation. In the months ahead, I would advise Opus Dei to carefully scrutinize membership applications.

 

Opus Dei works within but not with the church, which also harbors a secret cell of cardinals who are in on the conspiracy (the pope and most other Catholics apparently don't have backstage passes).

 

These men keep a secret that, if known, could destroy the church. That's why they keep it. If I were their adviser, I would point out that by preserving the secret, they preserve the threat to the church, and the wisest strategy would have been to destroy the secret, say, 1,000 years ago.

 

But one of the fascinations of the Catholic Church is that it is the oldest continuously surviving organization in the world, and that's why movies like "The Da Vinci Code" are more fascinating than thrillers about religions founded, for example, by a science-fiction author in the 1950s. All of the places in "The Da Vinci Code" really exist, though the last time I visited the Temple Church I was disappointed to find it closed for "repairs." A likely story.

 

Tom Hanks, Audrey Tautou and Jean Reno do a good job of not overplaying their roles, and Sir Ian McKellen overplays his in just the right way, making Sir Leigh into a fanatic whose study just happens to contain all the materials for an audio-visual presentation that briefs his visitors on the secrets of Da Vinci's "The Last Supper" and other matters. Apparently he keeps in close touch with other initiates. On the one hand, we have a conspiracy that lasts 2,000 years and threatens the very foundations of Christianity, and on the other hand a network of rich dilettantes who resemble a theological branch of the Baker Street Irregulars.

 

Yes, the plot is absurd, but then most movie plots are absurd. That's what we pay to see. What Ron Howard brings to the material is tone and style, and an aura of mystery that is undeniable. He begins right at the top; Columbia Pictures logo falls into shadow as Hans Zimmer's music sounds simultaneously liturgical and ominous. The murder scene in the Louvre is creepy in a ritualistic way, and it's clever the way Langdon is able to look at letters, numbers and symbols and mentally rearrange them to yield their secrets. He's like the Flora Cross character in "Bee Season," who used kabbalistic magic to visualize spelling words floating before her in the air.

 

The movie works; it's involving, intriguing and constantly seems on the edge of startling revelations. After it's over and we're back on the street, we wonder why this crucial secret needed to be protected by the equivalent of a brain-twister puzzle crossed with a scavenger hunt. The trail that Robert and Sophie follow is so difficult and convoluted that it seems impossible that anyone, including them, could ever follow it. The secret needs to be protected up to a point; beyond that it is absolutely lost, and the whole point of protecting it is beside the point. Here's another question: Considering where the trail begins, isn't it sort of curious where it leads? Still, as T.S. Eliot wrote, "In my beginning is my end." Maybe he was on to something.

Poco M2 Pro Review

 


Buy For

·         Powerful battery with Fast Charging

§  Stunning camera setup

§  P2i Splashproof coating

§  Gorilla Glass Protection in front and back

Beware of

·         Bulky device, weighing 209gms

Verdict

Xiaomi Poco M2 Pro is an affordable device, featuring a 5,000mAh powerful battery, side-mounted fingerprint sensor, v5 Triple Gorilla Glass Protection, along with a robust chipset. Moreover, the vibrant pixel density of 395ppi and a mighty Octa-core processor offered by the device make it a huge hit.

Feature-rich offering from Xiaomi Poco

Display and Camera

 

Xiaomi Poco M2 Pro has a stunning 6.67-inch FHD+ IPS LCD display, having a screen resolution of 1080 x 2400 pixels. It has the best-in-class pixel density of 395ppi and a 60Hz refresh rate, offering a great cinematic experience. The bezel-less display is protected by Corning Gorilla Glass v5. Further, the device has got a punch-hole design along with an aspect ratio of 20:9.

 

The smartphone has an impressive quad-camera setup, featuring a 48MP f/1.79 Primary Camera with ISOCELL Plus sensor, 8MP f/2.2 Ultra-Wide Angle lens, a 5MP f/2.4 macro lens, and a 2MP f/2.4 camera for depth sensing. It has a 16MP selfie shooter on the front for producing beautiful self-portraits.

 

Configuration and Battery

 

Xiaomi Poco M2 Pro functions on Qualcomm Snapdragon 720G chipset and an Octa-core Kryo 465 processor setup running at a clock speed of 2.3GHz and 1.8GHz. The device comes with 4GB RAM and Adreno 618 GPU, offering a smooth multitasking and gaming experience.

 

The smartphone provides a powerful 5,000mAh non-replaceable Li-Polymer battery, equipped with 33W Fast Charging technology, capable of charging 50% of the cell within 30mins.

 

Storage and Connectivity

 

Xiaomi Poco M2 Pro offers 64GB of internal storage that can be expanded up to 512GB. Among the network and connectivity options, users get 4G VoLTE, Mobile Hotspot, Bluetooth v5.0, USB Type-C, A-GPS Glonass, and USB OTG support.

Asus ROG Zephyrus G15 laptop review: Eye-catcher

 

The great white shark. The Zephyrus G15 might look like a stylish all-rounder laptop at first glance. However, there's powerful high-end hardware from AMD and Nvidia under the hood. We have tested the 15-inch gaming device extensively.

 



 

If you decide to buy the top model of the new ROG Zephyrus G15, you will get an extremely powerful overall package. In this way, the GA503Q model that we tested can boast a very powerful Ryzen 9 5900HS CPU and a GeForce RTX 3080 laptop GPU that is only specified with a TDP of 100 watts (including Dynamic Boost). Furthermore, a 1 TB NVMe-based SSD and 32 GB of DDR4 RAM (dual-channel) were installed in our test model, 16 GB of which are soldered to the motherboard. Meanwhile, a matte WQHD display with FreeSync and 165 Hz takes care of image reproduction. Note: According to our specs document, a 144 Hz Full HD display is available as a secondary panel option, but we wouldn't recommend it due to the low color-space coverage (45% NTSC).

 

Specifications:




TCS Mockvita 1.0 2020 philialand Coin Problem (python Solution)

 Question Description:

The problem solvers have found a new Island for coding and named it as Philaland.These smart people were given a task to make purchase of items at the Island easier by distributing various coins with different value.Manish has come up with a solution that if we make coins category starting from $1 till the maximum price of item present on Island, then we can purchase any item easily. He added following example to prove his point.


Let’s suppose the maximum price of an item is 5$ then we can make coins of {$1, $2, $3, $4, $5}to purchase any item ranging from $1 till $5.


Now Manisha, being a keen observer suggested that we could actually minimize the number of coins required and gave following distribution {$1, $2, $3}. According to him any item can be purchased one time ranging from $1 to $5. Everyone was impressed with both of them.Your task is to help Manisha come up with minimum number of denominations for any arbitrary max price in Philaland.


Input Format:

First line contains an integer T denoting the number of test cases.

Next T lines contains an integer N denoting the maximum price of the item present Philaland.

 


Output Format:

For each test case print a single line denoting the minimum number of denominations of coins required.

 


Constraints:

1<=T<=100

1<=N<=5000

 


Refer the Sample Output Formatting


Sample Input:


      2

     10

      5


Sample Output:


     4

     3


Explanation:


For test case 1, N=10.

According to Manish {$1, $2, $3,… $10} must be distributed.

But as per Manisha only {$1, $2, $3, $4} coins are enough to purchase any item ranging from $1 to $10. Hence minimum is 4. Likewise denominations could also be {$1, $2, $3, $5}. Hence answer is still 4.

 


For test case 2, N=5.

According to Manish {$1, $2, $3, $4, $5} must be distributed.

But as per Manisha only {$1, $2, $3} coins are enough to purchase any item ranging from $1 to $5. Hence minimum is 3. Likewise denominations could also be {$1, $2, $4}. Hence answer is still 3.




Solution in Python:


import math

arr = []


T= int(input())

for i in range(T):

    n=int(input())

    q= 1 + math.floor(math.log(n,2))

    arr.append(q)

    

for i in range(T):

    print(arr[i])

TCS Mockvita 1.0 2020: Lazy Student Problem (Python Solution)

Question Description:

There is a test of Algorithms. Teacher provides a question bank consisting of N questions and guarantees all the questions in the test will be from this question bank. Due to lack of time and his laziness, Codu could only practice M questions. There are T questions in a question paper selected randomly. Passing criteria is solving at least 1 of the T problems. Codu can’t solve the question he didn’t practice. What is the probability that Codu will pass the test?


Input Format:

First line contains single integer T denoting the number of test cases.

First line of each test case contains 3 integers separated by space denoting N, T, and M.


Output Format

For each test case, print a single integer.

If probability is p/q where p & q are co-prime, print (p*mulInv(q)) modulo 1000000007, where mulInv(x) is multiplicative inverse of x under modulo 1000000007.


Constraints:

0 < T <= 10000

0 < N, T <= 1000

0 <= M <= 1000

M,T <= N


Sample Input and Output:

Example 1

Input

1

4 2 1

Output

500000004




Solution in Python:


#importing necessary Modules

import math

arr =[]


test = int(input())

for i in range(test):

    

    #finding the probabilty

    l = list(map(int, input().split(' ')))

    N, T, M = l[0], l[1], l[2]

    c = math.factorial(N-M)

    b = math.factorial(T)

    a = math.factorial(N-M-T)

    prob = 1 - (c)/(b*c)

    

    #finding in fraction form

    p,q = (prob).as_integer_ratio()

    

    #finding multiplicative inverse

    m =1000000007

    y = pow(q,m-2,m)


    arr.append(y)


for i in range(test):

    print(arr[i])

Tuesday, May 12, 2020

Reader Writer problem

Problem :

The readers-writers problem relates to an object such as a file that is shared between multiple processes. Some of these processes are readers i.e. they only want to read the data from the object and some of the processes are writers i.e. they want to write into the object.
The readers-writers problem is used to manage synchronization so that there are no problems with the object data. For example - If two readers access the object at the same time there is no problem. However if two writers or a reader and writer access the object at the same time, there may be problems.
To solve this situation, a writer should get exclusive access to an object i.e. when a writer is accessing the object, no reader or writer may access it. However, multiple readers can access the object at the same time.

Code : 

import threading as thread import random global x #Shared Data x = 0 lock = thread.Lock() #Lock for synchronising access def Reader(): global x print('Reader is Reading!') lock.acquire() #Acquire the lock before Reading (mutex approach) print('Shared Data:', x) lock.release() #Release the lock after Reading print() def Writer(): global x print('Writer is Writing!') lock.acquire() #Acquire the lock before Writing x += 1 #Write on the shared memory print('Writer is Releasing the lock!') lock.release() #Release the lock after Writing print() if __name__ == '__main__': for i in range(0, 10): randomNumber = random.randint(0, 100) #Generate a Random number between 0 to 100 if(randomNumber > 50): Thread1 = thread.Thread(target = Reader) Thread1.start() else: Thread2 = thread.Thread(target = Writer) Thread2.start() Thread1.join() Thread2.join() # print(x)

Output: