Thursday, November 12, 2020

The Man Who Mistook His Wife for a Hat (Oliver Sacks, Summary)



'The Man Who Mistook His Wife for a Hat and Other Clinical Tales' is a 1985 book by neurologist Oliver Sacks describing the case histories of some of his patients. Sacks chose the title of the book from the case study of one of his patients who has visual agnosia, a neurological condition that leaves him unable to recognize faces and objects. The book comprises twenty-four essays split into four sections ("Losses", "Excesses", "Transports", and "The World of the Simple"), each dealing with a particular aspect of brain function. The first two sections discuss deficits and excesses (with particular emphasis on the right hemisphere of the brain), while the third and fourth sections describe phenomenological manifestations with reference to spontaneous reminiscences, altered perceptions, and extraordinary qualities of mind found in people with intellectual disabilities. Book Information: Subject : Neurology, psychology Genre : Case history Publication date : 1985 PART 1: Losses 1 % "The Man Who Mistook His Wife for a Hat", about Dr. P, who has visual agnosia; however, before that diagnosis is reached, Dr. P consults an ophthalmologist when he develops diabetes, thinking that it might affect his vision. The ophthalmologist tells him that he does not have diabetes and instead refers him to Dr. Sacks (the author), to whom Dr. P describes his symptoms of visual agnosia. Dr. P was supported by his wife and he had a special talent with respect to music. He was able to listen to the sounds and remember them, then use them in situations such as to identify the person in the room from noise he or she makes. The chapter ends with lines: "And this, mercifully, held to the end—for despite the gradual advance of his disease (a massive tumor or degenerative process in the visual parts of his brain) Dr P. lived and taught music to the last days of his life." 2 % "The Lost Mariner", about Jimmie G., who has anterograde amnesia (the loss of the ability to form new memories) due to Korsakoff's syndrome. He can remember nothing of his life since the end of World War II, including events that happened only a few minutes ago. He believes it is still 1945 (the segment covers his life in the 1970s and early 1980s), and seems to behave as a normal, intelligent young man aside from his inability to remember most of his past and the events of his day-to-day life. He struggles to find meaning, satisfaction, and happiness in the midst of constantly forgetting what he is doing from one moment to the next. The postscript of this chapter has two lines that describe how Jimmie might have spent rest of his life: Such patients, fossilized in the past, can only be at home, oriented, in the past. Time, for them, has come to a stop. 3 % "The Disembodied Lady", a unique case of a woman losing her entire sense of proprioception (the sense of the position of parts of the body, relative to other neighbouring parts of the body) due to vitamin b6 toxicity. The woman named Christina in the book learns to live life alongside a body that is 'blind and deaf to itself' by coordinating her movements through careful observation through her eyes, her vision. 4 % "The Man Who Fell out of Bed", about a young man whom Dr. Sacks sees as a medical student. Sacks encounters the patient on the floor of his hospital room, where he tells Sacks that he woke up to find an alien leg in his bed. Assuming that one of the nurses had played a prank on him, he attempted to toss the leg out of bed, only to find that he was attached to it. Although Sacks attempts to persuade the patient that the leg is his own, he remains bewildered in an apparent case of somatoparaphrenia. 5 % Hands This chapter is about Madeleine J. who was admitted to St. Benedict’s Hospital near New York City in 1980, her sixtieth year, a congenitally blind woman with cerebral palsy, who had been looked after by her family at home throughout her life. The patient had not used her hands the entire life and this rendered the patient in a situation where she compared her hands with 'lumps of dough'. To fix her condition, the doctors tempt her into making movement to get her own food as stated in these lines: ‘Leave Madeleine her food, as if by accident, slightly out of reach on occasion,’ I suggested to her nurses. ‘Don’t starve her, don’t tease her, but show less than your usual alacrity in feeding her.’ And one day it happened— what had never happened before: impatient, hungry, instead of waiting passively and patiently, she reached out an arm, groped, found a bagel, and took it to her mouth. This was the first use of her hands, her first manual act, in sixty years, and it marked her birth as a ‘motor individual’ (Sherrington’s term for the person who emerges through acts). It also marked her first manual perception, and thus her birth as a complete ‘perceptual individual’. Her first perception, her first recognition, was of a bagel, or ‘bagelhood’—as Helen Keller’s first recognition, first utterance, was of water (‘waterhood’). 6 % Phantoms A ‘phantom’, in the sense that neurologists use, is a persistent image or memory of part of the body, usually a limb, for months or years after its loss. Regarding a 'phantom' Dr Michael Kremer writes: ‘Its value to the amputee is enormous. I am quite certain that no amputee with an artificial lower limb can walk on it satisfactorily until the body-image, in other words the phantom, is incorporated into it.’ 7 % "On the Level", another case involving damaged proprioception. Dr. Sacks interviews a patient who has trouble walking upright and discovers that he has lost his innate sense of balance due to Parkinson's-like symptoms that have damaged his inner ears; the patient, comparing his sense of balance to a carpenter's spirit level, suggested constructing a similar level inside a pair of glasses. This enables him to judge his balance by sight and after a few weeks, the task of keeping his eye on the level became less tiring. Opening lines from the chapter read like this: ‘What’s the problem?’ I asked, as Mr MacGregor tilted in. 'Problem? No problem—none that I know of... But others keep telling me I lean to the side: "You’re like the Leaning Tower of Pisa," they say. "A bit more tilt, and you’ll topple right over."' ‘But you don’t feel any tilt?’ ‘I feel fine. I don’t know what they mean. How could I be tilted without knowing I was?’ To help himself from tilting, Mr MacGregor (through consultation with Dr Sacks) develops an engineered frame of glasses that tell him of any tilt in his body through respective tilt in a part of the engineered spectacles that he can moniter through vision. 8 % "Eyes Right" is about a woman in her sixties who has hemispatial neglect. She completely forgets the idea of "left" relative to her own body and the world around her. When nurses place food or drink on her left side, she fails to recognize that they are there. Dr. Sacks attempts to show the patient the left side of her body using a video screen setup; when the patient sees the left side of her body, on her right, she is overwhelmed with anxiety and asked for it to stop. This chapter about Mrs S. who is unable to see anything on the left. Her disorder is named as 'hemi-inattention'. "She has totally lost the idea of ‘left’, with regard to both the world and her own body.": a line in opening paragraph reads. Through consultation with Dr Sacks she is able to manage her life as shown by the lines below: Knowing it intellectually, knowing it inferentially, she has worked out strategies for dealing with her imperception. She cannot look left, directly, she cannot turn left, so what she does is to turn right—and right through a circle. Thus she requested, and was given, a rotating wheelchair. And now if she cannot find something which she knows should be there, she swivels to the right, through a circle, until it comes into view. 9 % "The President's Speech" is about a ward of aphasiacs and agnosiacs listening to a speech given by an unnamed actor-president, "the old charmer", presumably Ronald Reagan. Many in the first group laughed at the speech, despite their inability to follow the words, and Sacks claims their laughter to be at the president's facial expressions and tone, which they find "not genuine". One woman in the latter group criticizes the structure of the president's sentences, stating that he "does not speak good prose". This is important chapter that shows how easy it is to deceive the general public through careful manipulation of words, expressions and body language, but there are people with certain diabilities who only hear tone and see the expressions and cannot be fooled by the manipulation of words. A quote from this chapter: "Populus vult decipi, ergo decipiatur". PART 2: Excesses 10 % Witty Ticcy Ray In the chapter title, Ray is the name of the patient. This chapter is about the Tourette's Syndrome. It starts with the lines that also says so: In 1885 Gilles de la Tourette, a pupil of Charcot, described the astonishing syndrome which now bears his name. Tourette’s syndrome’, as it was immediately dubbed, is characterized by an excess of nervous energy, and a great production and extravagance of strange motions and notions: tics, jerks, mannerisms, grimaces, noises, curses, involuntary imitations and compulsions of all sorts, with an odd elfin humor and a tendency to antic and outlandish kinds of play. The chapter has references to a chemical called L-DOPA, so here is a note about it: Does L dopa increase dopamine? L-DOPA is a precursor to dopamine that passes the blood-brain barrier and is mainly taken up by the dopaminergic neurons that convert L-DOPA to dopamine and increase their dopamine production and storage. Ref: sciencedirect Another important note from the chapter: As lethargic Parkinsonian patients need more dopamine to arouse them, as my post-encephalitic patients were ‘awakened’ by the dopamineprecursor L-Dopa, so frenetic and Tourettic patients must have had their dopamine lowered by a dopamine antagonist, such as the drug haloperidol (Haldol). On the other hand, there is not just a surfeit of dopamine in the Touretter’s brain, as there is not just a deficiency of it in the Parkinsonian brain. There are also much subtler and more widespread changes, as one would expect in a disorder which may alter personality: there are countless subtle paths of abnormality which differ from patient to patient, and from day to day in any one patient. Haldol can be an answer to Tourette’s, but neither it nor any other drug can be the answer, any more than L-Dopa is the answer to Parkinsonism. A note from Wikipedia - Dopamine Antagonist: A dopamine antagonist, also known as an anti-dopaminergic and a dopamine receptor antagonist (DRA), is a type of drug which blocks dopamine receptors by receptor antagonism. Most antipsychotics are dopamine antagonists, and as such they have found use in treating schizophrenia, bipolar disorder, and stimulant psychosis. Several other dopamine antagonists are antiemetics used in the treatment of nausea and vomiting. 11 % Cupid’s Disease Note 1: Syphilis is a bacterial infection usually spread by sexual contact. The disease starts as a painless sore — typically on your genitals, rectum or mouth. Syphilis spreads from person to person via skin or mucous membrane contact with these sores. Note 2: Neurosyphilis is a bacterial infection of the brain or spinal cord. It usually occurs in people who have had untreated syphilis for many years. A note from the postscript: Excited elaboration: The drawings of patients with Parkinsonism, as they are ‘awakened’ by L-Dopa, form an instructive analogy. Asked to draw a tree, the Parkinsonian tends to draw a small, meager thing, stunted, impoverished, a bare winter-tree with no foliage at all. As he ‘warms up’, ‘comes to’, is animated by L-Dopa, so the tree acquires vigor, life, imagination—and foliage. 12 % A Matter of Identity This chapter talks about William Thompson. A paragraph in the book indicates what he might be suffering from: Mr Thompson, only just out of hospital — his Korsakov’s had exploded just three weeks before, when he developed a high fever, raved, and ceased to recognize all his family — was still on the boil, was still in an almost frenzied confabulatory delirium (of the sort sometimes called ‘Korsakov’s psychosis’, though it is not really a psychosis at all), continually creating a world and self, to replace what was continually being forgotten and lost. This chapter has references to Jimmie G, who was our character in Chaper 2, with anterograde amnesia. 13 % Yes, Father-Sister The chapter is about a patient with: Witzelsucht You can see in the chapter title that she is refering to a person with the words "Father-Sister". Note from Wikipedia: Witzelsucht (German: "joking addiction") is a set of pure and rare neurological symptoms characterized by a tendency to make puns, or tell inappropriate jokes or pointless stories in socially inappropriate situations. It makes one unable to read sarcasm. A less common symptom is hypersexuality, the tendency to make sexual comments at inappropriate times or situations. Patients do not understand that their behavior is abnormal, therefore they are nonresponsive to others' reactions. This disorder is most commonly seen in patients with frontal lobe damage, particularly right frontal lobe tumors or trauma. The disorder remains named in accordance with its reviewed definition by German neurologist Hermann Oppenheim, its first description as the less focused moria (pathologic giddiness or lunatic mood) by German neurologist Moritz Jastrowitz, was in 1888. Few lines from the chapter postscript: The sort of facetious indifference and ‘equalization’ shown by this patient is not uncommon—German neurologists call it Witzelsucht (‘joking disease’), and it was recognized as a fundamental form of nervous ‘dissolution’ by Hughlings Jackson a century ago. 14 % The Possessed This chapter talks about a woman whom Oliver Sacks suggests is having 'Super Touretter's Syndrome'. PART 3: Transports In the first half of this book we described cases of the obviously pathological—situations in which there is some blatant neurological excess or deficit. Sooner or later it is obvious to such patients, or their relatives, no less than to their doctors, that there is ‘something (physically) the matter’. Their inner worlds, their dispositions, may indeed be altered, transformed; but, as becomes clear, this is due to some gross (and almost quantitative) change in neural function. In this third section, the presenting feature is reminiscence, altered perception, imagination, ‘dream’. Such matters do not often come to neurological or medical notice. Such ‘transports’—often of poignant intensity, and shot through with personal feeling and meaning—tend to be seen, like dreams, as psychical: as a manifestation, perhaps, of unconscious or preconscious activity (or, in the mystically-minded, of something ‘spiritual’), not as something ‘medical’, let alone ‘neurological’. They have an intrinsic dramatic, or narrative, or personal ‘sense’, and so are not apt to be seen as ‘symptoms’. It may be in the nature of transports that they are more likely to be confided to psychoanalysts or confessors, to be seen as psychoses, or to be broadcast as religious revelations, rather than brought to physicians. 15 % Reminiscence This chapter is about two women named as 'Mrs O’C' and 'Mrs O’M'. Few lines from chapter seem to indicate what Mrs O’C might be suffering from: ‘Musical epilepsy’ sounds like a contradiction in terms: for music, normally, is full of feeling and meaning, and corresponds to something deep in ourselves, ‘the world behind the music’, in Thomas Mann’s phrase — whereas epilepsy suggests quite the reverse: a crude, random physiological event, wholly unselective, without feeling or meaning. Thus a ‘musical epilepsy’ or a ‘personal epilepsy’ would seem a contradiction in terms. And yet such epilepsies do occur, though solely in the context of temporal lobe seizures, epilepsies of the reminiscent part of the brain. Hughlings Jackson described these a century ago, and spoke in this context of ‘dreamy states’, ‘reminiscence’, and ‘physical seizures’: It is not very uncommon for epileptics to have vague and yet exceedingly elaborate mental states at the onset of epileptic seizures... The elaborate mental state, or so-called intellectual aura, is always the same, or essentially the same, in each case. Note from epilepsysociety.org: Musicogenic epilepsy is a rare form of complex reflex epilepsy with seizures induced by listening to music, although playing, thinking or dreaming of music have all been noted as triggers. Music may be provoked by different musical stimulus in different people. 16 % Incontinent Nostalgia This chapter talks about "forced reminiscence induced by L-Dopa". 17 % A Passage to India This chapter talks about an Indian girl of 19 with malignant brain tumor who also developed 'grand mal convulsions'. A grand mal seizure causes a loss of consciousness and violent muscle contractions. It's the type of seizure most people picture when they think about seizures. A grand mal seizure — also known as a generalized tonic-clonic seizure — is caused by abnormal electrical activity throughout the brain. [ Ref ] 18 % The Dog Beneath the Skin "The Dog Beneath the Skin", concerning a 22-year-old medical student, "Stephen D.", who, after a night under the influence of amphetamines, cocaine, and PCP, wakes to find he has a tremendously heightened sense of smell. Sacks would reveal many years later that he, in fact, was Stephen D. 19 % Murder The chapter starts straight on with the patient and the problem: Donald killed his girl while under the influence of PCP. He had, or seemed to have, no memory of the deed—and neither hypnosis nor sodium amytal served to release any. There was, therefore, it was concluded when he stood trial, not a repression of memory, but an organic amnesia—the sort of blackout well described with PCP. Later in the chapter, we see that after an accident and brain injury, he seems to have a recollections of the murder event. The chapter ends on a positive note with the lines: But the final, the most important, thing is this: that Donald has now returned to gardening. ‘I feel at peace gardening,’ he says to me. ‘No conflicts arise. Plants don’t have egos. They can’t hurt your feelings.’ The final therapy, as Freud said, is work and love. Donald has not forgotten, or re-repressed, anything of the murder— if, indeed, repression was operative in the first place—but he is no longer obsessed by it: a physiological and moral balance has been struck. But what of the status of the first lost, then recovered, memory? Why the amnesia—and the explosive return? Why the total blackout and then the lurid flashbacks? What actually happened in this strange, half-neurological drama? All these questions remain a mystery to this day. 20 % The Visions of Hildegard Varieties of migraine hallucination are represented in the chapter "Visions of Hildegard". The hallucinations take the form of paintings and art. The chapter also takes us through interpretations of those paintings. PART 4: The World of the Simple 21 % Rebecca The chapter talks about a retardate patient named Rebecca. We are going to take you through the postscript of this chapter that shines some light on how to take care of people like Rebecca. The power of music, narrative and drama is of the greatest practical and theoretical importance. One may see this even in the case of idiots, with IQs below 20 and the extremest motor incompetence and bewilderment. Their uncouth movements may disappear in a moment with music and dancing—suddenly, with music, they know how to move. We see how the retarded, unable to perform fairly simple tasks involving perhaps four or five movements or procedures in sequence, can do these perfectly if they work to music—the sequence of movements they cannot hold as schemes being perfectly holdable as music, i.e. embedded in music. The same may be seen, very dramatically, in patients with severe frontal lobe damage and apraxia— an inability to do things, to retain the simplest motor sequences and programmes, even to walk, despite perfectly preserved intelligence in all other ways. This procedural defect, or motor idiocy, as one might call it, which completely defeats any ordinary system of rehabilitative instruction, vanishes at once if music is the instructor. All this, no doubt, is the rationale, or one of the rationales, of work songs. What we see, fundamentally, is the power of music to organize— and to do this efficaciously (as well as joyfully!), when abstract or schematic forms of organization fail. Indeed, it is especially dramatic, as one would expect, precisely when no other form of organization will work. Thus music, or any other form of narrative, is essential when working with the retarded or apraxic—schooling or therapy for them must be centered on music or something equivalent. And in drama there is still more—there is the power of role to give organization, to confer, while it lasts, an entire personality. The capacity to perform, to play, to be, seems to be a ‘given’ in human life, in a way which has nothing to do with intellectual differences. One sees this with infants, one sees it with the senile, and one sees it, most poignantly, with the Rebeccas of this world. 22 % A Walking Grove Martin A., aged 61, was admitted to our Home towards the end of 1983, having become Parkinsonian and unable to look after himself any longer. He had had a nearly fatal meningitis in infancy, which caused retardation, impulsiveness, seizures, and some spasticity on one side. He had very limited schooling, but a remarkable musical education—his father was a famous singer at the Met. He lived with his parents until their death, and thereafter eked out a marginal living as a messenger, a porter, and a short-order cook— whatever he could do before he was fired, as he invariably was, because of his slowness, dreaminess or incompetence. It would have been a dull and disheartening life, had it not been for his remarkable musical gifts and sensibilities, and the joy this brought him—and others. He had an amazing musical memory—’I know more than 2,000 operas,’ he told me on one occasion—although he had never learned or been able to read music. Whether this would have been possible or not was not clear—he had always depended on his extraordinary ear, his power to retain an opera or an oratorio after a single hearing. The great sorrow of Martin’s life was that he could not follow his father, and be a famous opera and oratorio singer like him— but this was not an obsession, and he found, and gave, much pleasure with what he could do. He was consulted, even by the famous, for his remarkable memory, which extended beyond the music itself to all the details of performance. He enjoyed a modest fame as a ‘walking encyclopedia’, who knew not only the music of two thousand operas, but all the singers who had taken the roles in countless performances, and all the details of scenery, staging, dress and decor. (He also prided himself on a street-by-street, house-by-house, knowledge of New York—and knowing the routes of all its buses and trains.) Thus, he was an opera-buff, and something of an ‘idiot savant’ too. He took a certain child-like pleasure in all this—the pleasure of such eidetics and freaks. But the real joy— and the only thing that made life supportable—was actual participation in musical events, singing in the choirs at local churches (he could not sing solo, to his grief, because of his dysphonia), especially in the grand events at Easter and Christmas, the John and Matthew Passions, the Christmas Oratorio, the Messiah, which he had done for fifty years, boy and man, in the great churches and cathedrals of the city. He had also sung at the Met, and, when it was pulled down, at Lincoln Center, discreetly concealed amid the vast choruses of Wagner and Verdi. 23 % The Twins "The Twins" is about autistic savants. Dr. Sacks meets twin brothers who can neither read nor perform multiplication, yet are playing a "game" of finding very large prime numbers. While the twins were able to spontaneously generate these numbers, from six to twenty digits, Sacks had to resort to a book of prime numbers to join in with them. This was used in the 1993 film House of Cards starring Tommy Lee Jones. The twins also instantly count 111 dropped matches, simultaneously remarking that 111 is three 37s, an ability demonstrated by Dustin Hoffman's autistic character in the 1988 film Rain Man. This story has been questioned by Makoto Yamaguchi, who doubts that a book of large prime numbers could exist as described, and points out that reliable scientific reports only support approximate perception when rapidly counting large numbers of items. Autistic savant Daniel Tammet points out that the twins provided the matchbox and may have counted its contents beforehand, noting that he finds the value of 111 to be "particularly beautiful and matchstick-like". 24 % The Autist Artist "The Autist Artist", about a 21-year-old named Jose that had been deemed "hopelessly retarded" and had seizures; however, when given Sacks' pocket watch and asked to draw it, he composed himself and drew the watch in surprising detail. The chapter ends on a very positive note about what else life might have to offer to him: This brings us to our final question: is there any ‘place’ in the world for a man who is like an island, who cannot be acculturated, made part of the main? Can ‘the main’ accommodate, make room for, the singular? There are similarities here to the social and cultural reactions to genius. (Of course I do not suggest that all autists have genius, only that they share with genius the problem of singularity.) Specifically: what does the future hold for Jose? Is there some ‘place’ for him in the world which will employ his autonomy, but leave it intact? Could he, with his fine eye, and great love of plants, make illustrations for botanical works or herbals? Be an illustrator for zoology or anatomy texts? (See the drawing overleaf he made for me when I showed him a textbook illustration of the layered tissue called ‘ciliated epithelium’.) Could he accompany scientific expeditions, and make drawings (he paints and makes models with equal facility) of rare species? His pure concentration on the thing before him would make him ideal in such situations. Or, to take a strange but not illogical leap, could he, with his peculiarities, his idiosyncrasy, do drawings for fairy tales, nursery tales, Bible tales, myths? Or (since he cannot read, and sees letters only as pure and beautiful forms) could he not illustrate, and elaborate, the gorgeous capitals of manuscript breviaries and missals? He has done beautiful altarpieces, in mosaic and stained wood, for churches. He has carved exquisite lettering on tombstones. His current ‘job’ is handprinting sundry notices for the ward, which he does with the flourishes and elaborations of a latter-day Magna Carta. All this he could do, and do very well. And it would be of use and delight to others, and delight him too. He could do all of these—but, alas, he will do none, unless someone very understanding, and with opportunities and means, can guide and employ him. For, as the stars stand, he will probably do nothing, and spend a useless, fruitless life, as so many other autistic people do, overlooked, unconsidered, in the back ward of a state hospital. A point the author makes while contrasting autism and schizophrenia: Autism was once seen as a childhood schizophrenia, but phenomenologically the reverse is the case. The schizophrenic’s complaint is always of ‘influence’ from the outside: he is passive, he is played upon, he cannot be himself. The autistic would complain—if they complained—of absence of influence, of absolute isolation.

Tuesday, November 10, 2020

Introduction to Big Data (by Databricks)



Learn foundational concepts about the big data landscape.
This course was created for individuals who are new to the big data landscape and want to become conversant with big data terminology. It will cover foundational concepts related to the big data landscape including characteristics of big data, the relationship between big data, artificial intelligence and data science, how individuals on data science teams work with big data, and how organizations can use big data to enable better business decisions. Note: This course will not cover Databricks concepts or functionality. This is an introductory-level course focused on big data concepts.

Learning objectives

- Explain foundational concepts used to define big data.
- Explain how the characteristics of big data have changed traditional organizational workflows for working with data.
- Summarize how individuals on data science teams work with big data on a daily basis to drive business outcomes.
- Articulate examples of real-world use-cases for big data in businesses across a variety of industries.

-----

Lesson 1: Technology and the explosion of data

Sources of data Human-generated – What is it? Data that humans create and share What are some examples of human-generated data? - Social media posts* - Emails - Spreadsheets - Presentations - Audio files - Video files * Social media has been a leading force in the propagation of human-generated data. Just think - every time we post a message, change our online statuses, upload images, or like and forward comments, we are generating data. Let's look at Facebook, for example. According to Forbes, 1.5 billion people are active on Facebook every day, 510,000 comments are posted every minute, and five new profiles are created every second. ~ ~ ~ Machine-generated - What is it? Data generated from machines that doesn’t rely on active human intervention What are some examples of machine-generated data sources? - Sensors on vehicles, appliances and industrial machinery - Security cameras - Satellites - Medical devices Personal tools such as smartphone apps or fitness trackers What does it mean for data to be generated without active human intervention? Think of a fitness tracker. Depending on the model you have, it might generate records for your heart rate, your geographic location, the calories you burn and more. You don't tell your fitness tracker to track these things - it comes programmed to do it and does it on its own. ~ ~ ~ Organization-generated – What is it? Data generated as organizations run their businesses What are some examples of organization-generated data? Records generated every time you make a purchase at an online or physical store - things like unique customer numbers, the items you purchased, the date and time you purchased items and how many of each item you purchased. Organization-generated data is often referred to as transactional data. You'll hear this term frequently in the world of big data.

Lesson 2: What makes big data “big”?

The major characteristics used to define big data are volume, variety and velocity. VOLUME: Volume refers to the vast amount of data being generated every second of every day. The International Data Corporation (IDC), forecasts that the amount of data that exists in the world is growing from 33 zettabytes in 2018 to 177 zettabytes by 2025. Just to put that into perspective, the computer being used to create this course has 256GB of storage. That’s equivalent to just .000000000256 (9 zeros) zettabytes. Organizations working with big data find ways to process, store and analyze data coming in at massive volumes that surpass traditional methods process and store data. VELOCITY: The second characteristic that defines big data is velocity, which refers to the speed at which new data is generated and the speed at which data moves around. A good example of data velocity is a social media post going viral in seconds. Another example is the speed at which credit card transactions are checked for fraudulent activities. Have you ever tried to purchase something you don't normally purchase and had that transaction declined? In just a matter of seconds, your credit card company received information about your purchase, was able to compare it to usual purchases you make and decide whether or not to flag this as a fraudulent transaction. Organizations working with big data find ways to work with data that is generated and moves around this quickly (or even faster!). VARIETY: Finally, variety is also used to define big data. Data variety refers to the many different types of data that exist today - social media posts, credit card transactions, legal contracts, biometric data and geographic information, just to name a few. Organizations working with big data find ways to use different types of data together - for example, an organization might want to extract data insights from a combination of social media posts, customer transaction records and real-time product usage.
----- At times one would hear about 5 V's of Big Data: V4: Veracity Data veracity, in general, is how accurate or truthful a data set may be. In the context of big data, however, it takes on a bit more meaning. More specifically, when it comes to the accuracy of big data, it's not just the quality of the data itself but how trustworthy the data source, type, and processing of it is. V5: Value This refers to the ability to transform a tsunami of data into business.

Lesson 3: Types of big data

Three types of Big Data are: Structured, Unstructured, Semi-structured Structured The term structured data refers to any data that conforms to a certain format or schema. A popular example of structured data is a spreadsheet. In a spreadsheet, there are usually clearly labeled rows and columns, and the information within those rows and columns follows a certain format. In the spreadsheet below for example, we see that months are written as three-letter words, customer IDs are five-digit long numerical values and colors are formatted as "Name|Name". Because structured data is clearly organized, it’s generally easier to analyze. For example, if I asked you to look at the spreadsheet below and tell me how much money we made for all of these orders, you could easily tell me because the prices listed here are numeric and can be summed up. A lot of the data that organizations work with every day can be categorized as structured data. Unstructured By contrast, unstructured data is often referred to as "messy" data, because it isn’t easily searched compared to structured data. For example, imagine that instead of providing you with a spreadsheet of sales, I ask you to review camera footage that shows customers buying products and ask you to tell me how much money was made. That task would be much harder to do than using our spreadsheet. Unstructured data is the most widespread type of data. The IDC reports that almost 90% of data today is unstructured. Today, many organizations struggle with trying to make sense of unstructured data, especially when trying to use it for business insights. That's where different fields of artificial intelligence become an important part of the data analysis process. Aside from videos, other examples of unstructured data include: - Social media posts - Photographs - Emails - Audio files, and - Images Semi-structured Finally, we have semi-structured data. Semi-structured data fits somewhere in-between structured and unstructured data. Semi-structured data does not reside in a formatted table, but it does have some level of organization. A good example of semi-structured data is HTML code. If you’ve ever right-clicked in your browser and selected “inspect” or “inspect element” you’ve seen an example of this. Although you are not restricted to how much information you want to collect or what kind of information you want to collect, there is still a defined way to express data.

Knowledge Check: Three Questions

Lesson 4: An introduction to distributed computing

The de-facto standard tool for distributed computing is Apache Spark. A very high level and basic way to understand Apache Spark architecture is by the example of 'couting a tub of candies by a group of 5 friends'. Here: Job: Count candies in parallel Driver: Myself (who collects results from other friends and does the reporting) Simple Executor: the other four friends (who do the counting)

Lesson 5: Batch vs. streaming processing

Batch Data What is it? Batch data is data that we have in storage and that we process all at once, or in a batch. Say for example that someone gives you a large jar of candies and asks you to count all of the candies in the jar. That is a simple example of a batch job - we take candies that were already present in some form of storage (in this case, a jar) and count them. Since we count all of the candies one time, this is considered batch processing. Example of batch processing A real-world example of batch processing is how telecommunication companies process cellular phone usage each month to generate our monthly phone bills. To do this they process batch data - the phone calls you’ve made, text messages you've sent and any additional charges you’ve incurred through that billing cycle, to generate your bill. They process that batch data in a batch job. Streaming Data What is it? On the other hand, we have streaming data. Streaming data is data that is being continually produced by one or more sources and therefore must be processed incrementally as it arrives. Now, what if instead of counting candy sitting in a jar, we are asked to count candy coming towards us on a conveyor belt? As the candy reaches us, we have to count the new pieces and constantly update our overall candy count. In a streaming job, our final count is changing in real-time as more and more candy arrives on the conveyor belt. Example of stream processing A real-world example of stream processing is how heart monitors work. All-day long, as you wear your heart monitor, it receives new data - dozens of thousands of data points per day as your heart beats. And, every time your heart beats, your heart monitor has new data added to its data store in real-time. If your heart monitor has a display of your average heartbeat for the day, that average must be constantly updated with the new numbers from the incoming stream of data. - - - Both batch and streaming data have their place when it comes to big data analytics. Batch data is used for things like periodic reporting and streaming data for things like fraud detection, which need to be identified in real-time. Historically it’s been difficult to use these different types of data in conjunction. Thanks to new advances in technology however combining batch and stream processing is possible, and it leads to significant advantages in big data analytics. At this point, we’ve reviewed how we process big data and have explored the types of input data we have to work with. Next, we’ll discuss another topic in data management - where to store big data.

Lesson 6: Data storage systems

Today, most organizations are storing their big data in one or a combination of the following storage systems: Data Warehouses, Data Lakes, Unified Data Platforms Data warehouse technology emerged in the 1980’s and provides a centralized repository for storing all of an organization's data. Data warehouses can be on-premises or in the cloud. Data warehouse Benefits of data warehouses They’ve been around for decades, work well for structured data and are reliable. Since they generally only take structured data, data is typically clean and easy to query. Challenges with data warehouses They can be hard and expensive to scale (if you need more space, for example). You lose a lot of valuable potential by not taking advantage of unstructured data. You often have to deal with vendor lock-in. This occurs when your data is stored in a system that does not belong to you. Data warehouses are very expensive to build, license and maintain, especially for large data volumes, even with the availability of cloud storage.

Lesson 7: Knowledge Check

L8: Techniques for working with big data

Artificial intelligence What is it? Artificial intelligence (AI) is a branch of computer science in which computer systems are developed to perform tasks that would typically need human intelligence. AI is a broad field, and it encapsulates many techniques within its umbrella. Example To contextualize AI, let’s look at a classic example - a Turing test. In a Turing test: 1. A human evaluator asks a series of text-based questions to a machine and a human, without being able to see either. 2. The human and the machine answer the questions. 3. If the evaluator cannot differentiate between human and machine responses, the computer passes the Turing test. This means that it exhibited human-like behavior or, artificial intelligence! ~ ~ ~ Machine learning What is it? Machine learning (ML) is a subset of artificial intelligence that works very well with structured data. The goal behind machine learning is for machines to learn patterns in your data without you explicitly programming them to do so. There are a few types of machine learning; the most commonly used type is called supervised machine learning. Example Supervised machine learning is commonly used in detecting fraud. It works, at a high-level, like this: 1. A human-being specifies rules for what constitutes fraud (for example, a bank account with more than 20 transactions a month or an average balance of less than $100). 2. These rules are passed through a machine using an algorithm with data that is labeled either as "fraud" or "not fraud" and the machine learns what fraudulent data looks like. 3. The machine uses those rules to predict fraud. 4. A human manually investigates and verifies the model’s predictions if the model predicts “fraud”. ~ ~ ~ Deep learning What is it? Deep learning (DL) is a subset of machine learning that uses neural networks or sets of algorithms modeled by the structure of the human brain. They are much more complex than most machine learning models, and require significantly more time and effort to build. Unlike machine learning which plateaus after a certain amount of data, deep learning continues to improve as the data size increases. It performs well on complex datasets like images, sequences and natural language. Example Deep learning is often used to classify images. For example, say that you want to build a machine learning model to classify if an image contains a koala. You would feed hundreds, thousands, or millions of pictures into a machine - some of these showing koalas and others not showing koalas. Over time, the model learns what a koala is and what it isn’t. Over time, it can more easily and quickly identify a koala over other images. It's important to note that while humans might recognize koalas by their fluffy ears or large oval-shaped noses, a machine will detect things that we cannot - things like patterns in the koala's fur or the exact shape of its eyes. It is able to make decisions quickly based on that information. ~ ~ ~ Data science What is it? Data science is a field that combines tools and workflows from disciplines like math and statistics, computer science and business, to process, manage and analyze data. Data science is very popular in businesses today as a way to extract insights from big data to help inform business decisions. Example You already saw a couple of examples of data science techniques! Machine learning and deep learning are common tools (among many others) in a data scientist’s toolbox to help extract insights from data. ~ ~ ~ While this was not an exhaustive list, these are some of the most popular techniques for working with big data. An important idea to note here is that one of the benefits of using these techniques, particularly machine learning and deep learning, is that they help scale analytics. As you can imagine, once machines learn how to detect patterns in our data, they are able to make predictions much faster than humans can. As we discussed, all of these techniques are used by data science practitioners to help extract insights from big data. They use these techniques as part of a data science workflow, a series of steps they follow to process, manage and analyze data.

L9: The data science workflow

The data science workflow is a series of steps that data practitioners follow to work with big data. It is a cyclical process that often starts with identifying business problems and ends with delivering business value. The data science workflow

L10: Roles on a data science team

Platform administrators What do they do?

Platform administrators can also be called devops engineers, infrastructure engineers and cloud engineers. They are responsible for managing and supporting big data infrastructure. Some of these tasks include:

  • setting up of big data infrastructure
  • performing updates and maintenance work
  • performing health checks
  • keeping track of how team members are using the platform by setting up and monitoring alerts, for example
  • implementing best practices for managing data
Additionally, platform administrators provide governance to development teams around change, configuration and upgrades. and often evaluate new tools and technologies that can compliment their big data infrastructure. What do they need? To perform their duties, platform administrators often use tools like infrastructure and monitoring services that major cloud providers offer to help them keep data secure and scale and manage their infrastructure. Data engineers What do they do? Data engineers develop, construct, test and maintain data pipelines, which are mechanisms that allow data to move between systems or people. If we think back to the data science workflow, we talked about data ingestion and that once data is ingested, it needs to be prepared for use for machine learning and business analytics. This is where a data pipeline fits in - taking data from its raw data source and moving it along that pipeline to where it can be used at different stages of a machine learning or data analytics project. What do they need? To perform their duties, data engineers use a set of tools to build and maintain these pipelines including:
  • Programming languages like Python and Scala
  • Different data storage solutions
  • Data processing engines like Apache Spark
Data analysts What do they do? Data analysts also take data prepared by data engineers to extract insights. Typically, a data analyst will also present data in the form of graphs, charts and dashboards to stakeholders to help them make business decisions. Data analysts can also take advantage of the work of machine learning engineers to help derive insights from data. They are typically well-versed in data visualization tools and business intelligence concepts and can be in charge of interpreting data insights and effectively communicating their findings with stakeholders. What do they need? To perform their duties, data analysts often use:
  • SQL programming language
  • Visualization tools like Tableau, PowerBI, Looker and others.
Data scientists What do they do? Data scientists take the data prepared by data engineers and use a variety of methods to extract insights. Data scientists usually have a strong background in disciplines like math, statistics, and computer science. They are often tasked with building machine learning models, testing those models, and keeping track of their machine learning experiments. What do they need? To perform their duties, data scientists use tools like:
  • Programming languages like Python, R and SQL
  • Machine learning libraries
  • Notebook interfaces like Jupyter

L12: Big data for business decision-making

Welcome to the last lesson in this course! At this point, you should have a good understanding of what big data is and how organizations process, manage and analyze it to extract business insights. In this lesson, we'll take this information one step forward and answer the question, "Why does all of this matter"? First, let's do a quick exercise to see how well you can predict customer behavior. How well do you know this customer? Imagine that you and I work at a bank, and we accidentally transferred $5,000 into the wrong customer’s account. All we know about this customer is that he: - Is male - Is 20 years old - Is single - Currently resides in New York City - Makes $100,000 a year Based on this information, what do you think our customer would do with the $5,000? A. Give the money back B. Take the money and run Take a second to think about this. Once you have an answer, then continue reading. What did you decide? How did you come to this decision? Were you thinking that you needed more data? What if now I told you that this error has happened twice in the past to the same individual and that each time, they’ve given the money back? How would this information change your assessment of what would happen? To those of you who thought, "I need more data!" - you were right! Without the additional piece of information about past transactions, there was really no way to know or even make an educated guess about what our customer would do. Big data analytics for business Think about this example at a much more complex and massive scale. Imagine if we could use data to understand our customer’s next moves. Imagine if we could go into a business decision having a fairly certain idea of what the outcome would be. Big data analytics makes this possible. With big data analytics, organizations are able to do things like: - Understand their customers better : Who are our customers? What do they like? How do they use our products? - Improve their products : Do we need to make changes to our products? What types of changes should we make? What do people like most about our product? - Protect their business : Are we investing money in the correct things? Will the risks we take pay off? - Stay ahead of the competition : Who are our biggest competitors? How will we do with upcoming trends in our industry? Regardless of industry, big data enables organizations to find answers to questions they want to know and helps them find patterns to answer questions they didn't even know to ask. Next, we'll take this one step further and look at specific examples of how big data analytics is being used in a wide-range of industries.

L13: Big data use-cases in different industries

Thousands of organizations around the world are applying advanced analytics to big data to enrich and accelerate business outcomes. In this section, we’ll review some of these examples, by industry. Please note that there is a lot of content here! While you're more than welcome to read all of it, it might help if you start with the ones of most interest to you. Advertising and marketing Who? Organizations like global agencies, small ad tech companies and more. Goals: Apply advanced analytics to large volumes of consumer, clickstream and ad data to improve return on ad spend, inventory management and audience segmentation efforts
Automotive Who? Automotive and automotive parts manufacturers Goals: Apply advanced analytics to their large volumes of driver, vehicle, supply chain and IoT data to improve manufacturing efficiency and create better and safer autonomous driver experiences
Financial services Who? Retail and commercial banks, hedge funds, fintech innovators and more Goals: Apply advanced analytics to large volumes of customer and transaction data to reduce risk, boost returns and improve customer satisfaction Example use-cases:
Health and life sciences Who? Large integrated healthcare systems, major pharmaceutical companies, diagnostic labs and more Goals: Applying advanced analytics to their large volumes of clinical and research data to accelerate R&D and improve patient outcomes.
Media and entertainment Who? Major publishers, streamers, gaming companies and more Goals: Apply advanced analytics to large volumes of audience and content data to deepen audience engagement, reduce churn and optimize advertising revenues
Oil, gas and energy Who? Oil upstream and downstream organizations, utility companies and more Goals: Apply advanced analytics to large volumes of sensor, supply chain, and customer data to improve exploration, reduce machinery downtime and optimize sales and supply chain operations
Retail Who? Traditional brick and mortar companies, e-commerce companies Goals: Apply advanced analytics to large volumes of customer, product and supply chain data to better attract customers, increase basket size and reduce costs Example use-cases:
Telecom Who? Global communication service providers, network and equipment providers and more Goals: Apply advanced analytics to large volumes of customer and network data to improve network services and performance while reducing customer churn Example use-cases:

Monday, November 2, 2020

Working with log files in Bash shell


1: To stream a log file $ tail -f 2020-11-02_1604333192.log It will print anything that is being appended to the log file. 2: Print last 10 lines of the log file. $ tail -10 2020-11-02_1604333192.log 3: Stream a log file but also apply a string based filter to print only "ERROR" or "INFO" logs. $ tail -f 2020-11-02_1604333192.log | grep INFO $ tail -f 2020-11-02_1604333192.log | grep ERROR 4: Print the entire log file as per its present state. $ cat 2020-11-02_1604333192.log 5: Print the log file as per its present state but also filter it to show only 'ERROR' logs. $ cat 2020-11-02_1604333192.log | grep ERROR 6: Print the number of lines in the log file. $ wc -l 2020-11-02_1604333192.log 1130 2020-11-02_1604333192.log 7: Print the number of lines representing 'ERROR' (or 'INFO') logs. $ cat 2020-11-02_1604333192.log | grep ERROR | wc -l 87 $ cat 2020-11-02_1604333192.log | grep INFO | wc -l 1086 $ grep ERROR 2020-11-02_1604333192.log | wc -l 87 8: If you want to track how many lines have been added in the log file every one second or two seconds, use the following 'Python 3' code in the Python shell (or CLI). Note: 'time.sleep(1)' puts Python into sleep for one second. Ashish Jain@LAPTOP MINGW64 /e/ws/logs $ python Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 >>> import time >>> import os >>> while True: ... time.sleep(1) ... os.system('wc -l 2020-11-21_1605972090.log') ... 982 2020-11-21_1605972090.log 0 984 2020-11-21_1605972090.log 0 989 2020-11-21_1605972090.log 0 And so on...

Sunday, November 1, 2020

Listing of Seven Cough Syrups and Comparison


1. Benadryl Syrup Prescription Required Manufacturer: Johnson & Johnson Ltd SALT COMPOSITION: Diphenhydramine (14.08mg/5ml) + Ammonium Chloride (138mg/5ml) + Sodium Citrate (57.03mg/5ml) Storage: Store at room temperature (10-30°C) Side effects of Benadryl Syrup Most side effects do not require any medical attention and disappear as your body adjusts to the medicine. Consult your doctor if they persist or if you’re worried about them Common side effects of Benadryl: % Stomach pain/epigastric pain % Dizziness % Sleepiness % Impaired coordination % Thickened respiratory tract secretions % Allergic reaction Ref: 1mg 1.1. Diphenhydramine Diphenhydramine is an antihistamine mainly used to treat allergies. It can also be used for insomnia, symptoms of the common cold, tremor in parkinsonism, and nausea. It is used by mouth, injection into a vein, injection into a muscle, or applied to the skin. Maximal effect is typically around two hours after a dose, and effects can last for up to seven hours. Common side effects include sleepiness, poor coordination and an upset stomach. Its use is not recommended in young children or the elderly. There is no clear risk of harm when used during pregnancy; however, use during breastfeeding is not recommended. It is a first generation H1-antihistamine and works by blocking certain effects of histamine. Diphenhydramine is also an anticholinergic. Diphenhydramine was first made by George Rieveschl and came into commercial use in 1946. It is available as a generic medication. It is sold under the trade name Benadryl, among others. In 2017, it was the 241st most commonly prescribed medication in the United States, with more than two million prescriptions. Ref: Wikipedia 1.2. Benadryl Tablet GENERIC NAME(S): Diphenhydramine Hcl Uses Diphenhydramine is an antihistamine used to relieve symptoms of allergy, hay fever, and the common cold. These symptoms include rash, itching, watery eyes, itchy eyes/nose/throat, cough, runny nose, and sneezing. It is also used to prevent and treat nausea, vomiting and dizziness caused by motion sickness. Diphenhydramine can also be used to help you relax and fall asleep. This medication works by blocking a certain natural substance (histamine) that your body makes during an allergic reaction. Its drying effects on such symptoms as watery eyes and runny nose are caused by blocking another natural substance made by your body (acetylcholine). Ref: webmd --- --- --- --- 2. COF-RYL Cough Syrup Prescription Required Manufacturer: Cipla Ltd SALT COMPOSITION: Diphenhydramine (14.08mg/5ml) + Ammonium Chloride (138mg/5ml) + Sodium Citrate (57.03mg/5ml) Storage: Store at room temperature (10-30°C) Note: Cof-ryl is same as Benadryl with no difference in the salts. Ref: 1mg --- --- --- --- 3. Bro-Zedex Syrup Prescription Required Manufacturer: Wockhardt Ltd SALT COMPOSITION: Bromhexine (4mg) + Guaifenesin (50mg) + Menthol (2.5mg) + Terbutaline (1.25mg) Benefits of Bro-Zedex Syrup In Cough Cough is a sudden, forceful expulsion of air that helps clear any mucus or irritant in the throat or airways. If it happens more frequently, due to an underlying disease or an allergy, it can be bothersome. Bro-Zedex Syrup helps to loosen thick mucus, making it easier to cough out. This makes it easier for air to move in and out. It will also relieve allergy symptoms like watery eyes, sneezing, runny nose or throat irritation and help you carry out your daily activities more easily. This medicine is safe and effective. It usually starts to work within a few minutes and the effects can last up to several hours. Take it as prescribed by the doctor. Do not stop using it unless you are advised to by your doctor. Taking this medicine enables you to live your life more freely without worrying so much about things that set off your symptoms. Side effects of Bro-Zedex Syrup Most side effects do not require any medical attention and disappear as your body adjusts to the medicine. Consult your doctor if they persist or if you’re worried about them Common side effects of Bro-Zedex % Nausea % Indigestion % Bloating % Vomiting % Diarrhea % Stomach pain % Dizziness % Headache % Sweating % Skin rash % Hives % Tremor % Increased heart rate % Palpitations Ref: 1mg --- --- --- --- 4. D-COLD SYRUP Manufacturer: Paras Pharmaceuticals Ltd SALT COMPOSITION: Paracetamol (NA) Salt Synonyms: Acetaminophen Uses of D Cold Syrup % Pain relief % Fever Side effects of D Cold Syrup Most side effects do not require any medical attention and disappear as your body adjusts to the medicine. Consult your doctor if they persist or if you’re worried about them Common side effects of D Cold % Stomach pain % Nausea % Vomiting What is the difference between nausea and vomiting? Nausea is an uneasiness of the stomach that often accompanies the urge to vomit, but doesn't always lead to vomiting. Vomiting is the forcible voluntary or involuntary emptying ("throwing up") of stomach contents through the mouth. Ref: 1mg: D-COLD Syrup --- --- --- --- 5. Vicks Cough Drops Generic Name: menthol topical Brand Name: Cepacol Regular Strength, Cepacol Sore Throat, Dads Menthol Throat Drop, Flanax Cough Relief, Halls Cough Drops, Ludens Throat Drops, Medikoff Drops, Medikoff Drops SF, Ricola Cherry Honey Herb, Ricola Herb, Ricola Honey Herb, Ricola Lemon Mint, Ricola Mountain Herb, Ricola Natural Herb, Ricola with Echinacea, Vicks VapoDrops Uses of Vicks VapoDrops: % It is used to relieve coughing. % It is used to treat a sore throat. Ref: Drugs.com Menthol poisoning To put it in perspective, a typical cough drop contains between 3 and 10 milligrams (mg) of menthol. The lethal dose of mentholTrusted Source is estimated to be roughly 1,000 mg (1 gram) per kilogram of body weight. In other words, someone who weighs 150 pounds (68 kg) would likely have to eat more than 6,800 cough drops containing 10 mg of menthol in a short period of time to risk the chance of a lethal overdose. Some people love the sweet taste and calming effects of cough drops and may want to take them even when they don’t have a cough. However, eating more than the recommended amount of cough drops (or anything for that matter) can result in a few unwanted symptoms. Ref: healthline --- --- --- --- 6. Torex Cough Syrup Prescription Required Manufacturer: Torque Pharmaceuticals Pvt Ltd SALT COMPOSITION: Diphenhydramine (12.5mg/5ml) + Ammonium Chloride (125mg/5ml) + Terpin Hydrate (7.5mg/5ml) + Sodium Citrate (55mg/5ml) Storage: Store at room temperature (10-30°C) Note: This syrup has four salts out of which three are same as Benadryl or COF-RYL. Ref: 1mg Terpin Terpin, used as the hydrate (terpin·H2O), is an expectorant, used to loosen mucus in patients presenting with acute or chronic bronchitis, and related conditions. It is derived from sources such as oil of turpentine, oregano, thyme and eucalyptus. It was popular in the United States since the late nineteenth century, but was removed from marketed medications in the 1990s after the U.S. Food and Drug Administration (FDA) found a lack of evidence of safety and effectiveness. Elixirs of terpin hydrate are still available with a prescription, but must be prepared by a compounding pharmacy. It can be prepared from other volatile oils like geraniol, linalool and berol by adding dilute acids (5% H2SO4) to them. Medical uses Terpin hydrate is an expectorant, used in the treatment of acute and chronic bronchitis, pneumonia, bronchiectasis, chronic obstructive pulmonary disease, infectious and inflammatory diseases of the upper respiratory tract. It is typically formulated with an antitussive (e.g., codeine) as a combined preparation. Adverse effects Adverse reactions include depression of the respiration, sedation, coordination disorders, constipation, and urinary retention. Long-term administration of the combination product of terpin hydrate with codeine may lead to codeine dependence. Terpin hydrate with codeine is often mixed with alcohol as codeine is not as readily as soluble in water. The high alcohol content (42 percent) may increase depression of the central nervous system, codeine metabolism, as well as abuse potential. Mechanism of action A humectant and expectorant, terpin hydrate works directly on the bronchial secretory cells in the lower respiratory tract to liquify and facilitate the elimination of bronchial secretions. It also exerts a weak antiseptic effect on the pulmonary parenchyma. Ref: Terpin - Wikipedia ~ ~ ~ Ammonium chloride in Medicine Ammonium chloride is used as an expectorant in cough medicine. Its expectorant action is caused by irritative action on the bronchial mucosa, which causes the production of excess respiratory tract fluid, which presumably is easier to cough up. Ammonium salts are an irritant to the gastric mucosa and may induce nausea and vomiting. Ammonium chloride is used as a systemic acidifying agent in treatment of severe metabolic alkalosis, in oral acid loading test to diagnose distal renal tubular acidosis, to maintain the urine at an acid pH in the treatment of some urinary-tract disorders. Ref: Ammonium chloride - Wikipedia ~ ~ ~ Trisodium citrate Trisodium citrate has the chemical formula of Na3C6H5O7. It is sometimes referred to simply as "sodium citrate", though sodium citrate can refer to any of the three sodium salts of citric acid. It possesses a saline, mildly tart flavor. It is mildly basic and can be used along with citric acid to make biologically compatible buffers. Medical uses In 1914, the Belgian doctor Albert Hustin and the Argentine physician and researcher Luis Agote successfully used sodium citrate as an anticoagulant in blood transfusions, with Richard Lewisohn determining its correct concentration in 1915. It continues to be used today in blood-collection tubes and for the preservation of blood in blood banks. The citrate ion chelates calcium ions in the blood by forming calcium citrate complexes, disrupting the blood clotting mechanism. Recently, trisodium citrate has also been used as a locking agent in vascath and haemodialysis lines instead of heparin due to its lower risk of systemic anticoagulation. In 2003, Ööpik et al. showed the use of sodium citrate (0.5 g/kg body weight) improved running performance over 5 km by 30 seconds. Sodium citrate is used to relieve discomfort in urinary-tract infections, such as cystitis, to reduce the acidosis seen in distal renal tubular acidosis, and can also be used as an osmotic laxative. It is a major component of the WHO oral rehydration solution. It is used as an antacid, especially prior to anaesthesia, for caesarian section procedures to reduce the risks associated with the aspiration of gastric contents. Ref: Trisodium citrate - Wikipedia --- --- --- --- 7. Rexcof DX NF Syrup MANUFACTURER: Cipla Ltd SALT COMPOSITION: Chlorpheniramine Maleate (2mg) + Dextromethorphan Hydrobromide (10mg) STORAGE: Store at room temperature (10-30°C) Rexcof DX NF Syrup is a combination medicine used in the treatment of dry cough. It works by reducing the activity of cough center in the brain. It relieves allergic symptoms like runny nose, watery eyes, sneezing, throat irritation. BENEFITS OF REXCOF DX SYRUP In Dry cough A dry cough, also known as non-productive cough, is a cough where no phlegm or mucus is produced. This is irritating, usually associated with a tickly throat and may be caused due to cold, flu, allergies or throat irritants. Rexcof DX NF Syrup suppresses dry, hacking coughs. It will also relieve allergy symptoms like watery eyes, sneezing, runny nose or throat irritation and help you carry out your daily activities more easily. SIDE EFFECTS OF REXCOF DX SYRUP Most side effects do not require any medical attention and disappear as your body adjusts to the medicine. Common side effects of Rexcof DX: - Upset stomach - Sleepiness HOW REXCOF DX SYRUP WORKS Rexcof DX NF Syrup is a combination of two medicines: Chlorpheniramine Maleate and Dextromethorphan Hydrobromide, which relieves dry cough. Chlorpheniramine Maleate is an antiallergic which helps reduce cough associated with allergies by blocking the effects of a chemical messenger, histamine. Dextromethorphan Hydrobromide is a cough suppressant which relieves cough by reducing the activity of cough center in the brain. SAFETY ADVICE Alcohol - Caution is advised when consuming alcohol with Rexcof DX NF Syrup. Please consult your doctor. Driving - Rexcof DX NF Syrup may cause side effects which could affect your ability to drive. Liver - Rexcof DX NF Syrup is probably unsafe to use in patients with liver disease and should be avoided. Please consult your doctor. Ref: 1mg.com

Integration of Anaconda and PowerBI Desktop


While integrating Anconda and PowerBI the error people at first attempt encounter is:

DataSource.Error: ADO.NET: Python script error.
Traceback (most recent call last):
  File "PythonScriptWrapper.PY", line 2, in <module>
    import os, pandas, matplotlib.pyplot
  File "C:\Users\mm\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

Details:
    DataSourceKind=Python
	
... 


The issue you are facing is of the Power BI and Anaconda integration. You have to follow the below steps that link Anaconda with the Power BI.

Check that PowerBI is configured to use Python.
Go to "File" >> "Options and Settings" >> "Options" >> "Python Scripting"

Open the Anaconda Prompt: Then, you have to go to the Conda Environment that you want to use in PowerBI. Am having an environment 'temp', so I activate it first in the 'Anaconda Prompt': (base) C:\Users\ashish>conda activate temp Then I go to the directory having the "PowerBI" executable file in the installation folder: (temp) C:\Users\ashish>cd "C:\Program Files\Microsoft Power BI Desktop\bin" Then, I launch PowerBI from the Prompt: (temp) C:\Program Files\Microsoft Power BI Desktop\bin>PBIDesktop.exe This fixes the NumPy error you are getting. If you want any other package to use with PowerBI, install that package in the respective "Conda Environment" (in my case it is "temp"). Make sure the Python home directory (Anaconda3) has been added to the 'Power BI Desktop' global options in the Python scripting section too.

Timeline View Using HTML Content Visual in PowerBI


We are creating an HTML based 'Timeline' visual in PowerBI.
We have a dataset in Excel file that looks like this:

We are going to use Python to add clock icons according to time recorded in "dt_ts" column. Go to "Home >> Transform Data >> Transform >> Run Python Script". Ignore any Privacy warnings that you might get while running script the first time. Code for the "Python Editor": # 'dataset' holds the input data for this script from dateutil.parser import parse def get_icon(x): icon_dict = { "1:0" : "&#128336;", "2:0" : "&#128337;", "3:0" : "&#128338;", "4:0" : "&#128339;", "5:0" : "&#128340;", "6:0" : "&#128341;", "7:0" : "&#128341;", "8:0" : "&#128343;", "9:0" : "&#128344;", "10:0" : "&#128345;", "11:0" : "&#128346;", "12:0" : "&#128347;", "1:30" : "&#128348;", "2:30" : "&#128349;", "3:30" : "&#128350;", "4:30" : "&#128351;", "5:30" : "&#128352;", "6:30" : "&#128353;", "7:30" : "&#128354;", "8:30" : "&#128355;", "9:30" : "&#128356;", "10:30" : "&#128357;", "11:30" : "&#128358;", "12:30" : "&#128359;", } hour = parse(x['dt_ts']).hour min = parse(x['dt_ts']).minute if min >= 0 and min < 30: min = 0 else: min = 30 return icon_dict[str(hour) + ":" + str(min)] dataset['icon'] = dataset.apply(get_icon, axis = 1) The above code creates a new column "icon". Then, "Close and Apply" 'Transform Window' and come back to "Home" tab. There on the right hand side, you can see your 'Sheet1' (Sheet1 in our case, this is the name of your Excel sheet or Database table). Click on "Ellipsis" and "New Column".
What we are going to write next is a mix of HTML, CSS and DAX code. HTML = "<p style='font-size: 25px'>" & Sheet1[icon] & ": Message: " & Sheet1[read_time] & "; Char: " & IF( OR(ISBLANK(Sheet1[col_with_empty_cells]), LEN(Sheet1[col_with_empty_cells]) = 0) , "NA", Sheet1[col_with_empty_cells] ) & "</p>" To get the HTML Visual, we get the HTML Visual from GitHub Load the Visual using the downloaded "pbiviz" file. (Ref: PowerBI's HTML Content Visualization) To get the HTML content in the Visual: Either: Drag the column into the 'HTML Content' Visual. Or: Click on the 'Tick' mark before the "HTML" column in the side bar on the right named "Fields". Output:
References % GitHub Link to PowerBI Notebook and Excel used for this demo % Intergration of Anaconda and PowerBI % Get 'HTML Content Visual' from store.office.com % OR Function DAX (Microsoft) % DAX Operator Reference (Microsoft) % Clock Symbols