{-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-} -- https://www.fpcomplete.com/user/agocorona/streaming-transient-effects-vi module Main where import Transient.Base import Transient.Move import Transient.Move.Utils import Transient.MapReduce import Control.Applicative import Control.Monad.IO.Class import Data.Monoid import qualified Data.Map as M import qualified Data.Foldable as F import qualified Data.Vector as V -- Calculates separately the frequency of words in a text using -- Distributed Data Sets (DDS's) similar to spark Resilient Data Sets main= do let numNodes = 5 runCloudIO $ do runTestNodes [2000 .. 2000 + numNodes - 1] -- local $ option "s" "start" r <- reduce (+) . mapKeyB (\w -> (w, 1 :: Int)) $ getText words content' lliftIO $ putStr "RESULT= " >> print r -- local $ exit r -- print $ M.toList r content= "hello" content'= "the new york times said editorial for tuesday jan new year day has way stealing down upon coming the shadow the christmas week and its own scintillating eve you celebrated midnight last night was easy little illusory think the festivities gesture dismissal warding off the old year and its associated evils and yet hard feel this morning this were really the beginning new chapter some people are keenly sensitive beginnings and endings that new year day they can almost hear the rustle colossal page being turned like the opening some selznick version dickens born says the infant new year and off headlong into january the rest are only too conscious how closely the first wednesday the new year interwoven with the last monday the old year working days both never has been plainer that there telling what the new year will bring the way last year blew off course september might make skeptics all undermining confidence even the soberest expectations the likeliest possibilities resolutions have way expiring their own and last year most drafted new set resolutions mid september consciously not resolutions that had more with taking care the necessities that suddenly surrounded than with the usual jan goals self improvement and better record keeping the shock day like sept makes the conventions our lives look merely conventional for instance the only meaning new year day were purely consensual long established agreement that says only begin all over again here with particular reason why what makes new year day merely saying but any convention grown old enough acquires meaning that hard deny explain hence jan day melancholy hopeful completely secular and yet committed many even ironically ideal renewal that feels almost spiritual are born creatures repetition and out the repetition days like this lighted slowly increasing sun grows solemnity worth honoring what commit ourselves the first the year isn sudden increase talent intelligence native beauty increase what william cobbett the great 19th century journalist called exertion the best application the abilities already have happiness misery the mind cobbett wrote but the power exertion turn misery into happiness ourselves and others this coming year will require more than the usual exertion from will take more than resolutions more than the hope that were good enough begin with should our resolutions fail cobbett illustrious contemporary the rev sydney smith has some words that might well guide into look evil the face wrote walk and you will find less than you imagined and often you will not find all for will recede you advance sydney smith knew much about the trivial anxieties life did about the substantial ones knew that happiness less often matter courage than simple adjustments the way live and think knew for instance that you may virtuous and wise and good but that also helps turn the lights every night the room which sit wrote lighted like town after great naval victory darkness will come early tonight and the newness this very young slightly daunting year seems dwindle the twilight will time proclaim your own naval victory whether not you can manage virtuous wise good there nothing wrong with beginning being cheerful all photos and graphics from the new york times news service are available nytimages com clients who have photo account with the wieck database can use the same username and password access the images there charge for browsing but you would like more information establishing account download art from nytimages com special rate please call our report has also moved newscom and via photoexpress the following photos have been sent part the new york times photo package for monday dec nyt48 new york dec new year celebrations times square midnight paul burnett the new york times nyt47 new york dec new year the usual party atmosphere times square had patriotic theme for many atypical new year eve monday evening celebrating the seconds before midnight times square justin lane the new york times nyt46 new york dec new year yajaira arias ryan pyeatt shoulders both manhattan celebrating the seconds before midnight times square justin lane the new york times nyt45 new york dec new year the usual party atmosphere times square had patriotic theme for many atypical new year eve monday evening celebrations ensued moments after the ball dropped richard perry the new york times nyt44 new york dec bloomberg his last official act mayor rudolph guiliani swore michael bloomberg new york york mayor times square after the ball dropped hearlding the new year vincent laforet the new york times nyt43 new york dec bloomberg his last official act mayor rudolph guiliani swore michael bloomberg new york york mayor times square after the ball dropped hearlding the new year vincent laforet the new york times nyt42 new york dec bloomberg his last official act mayor rudolph guiliani swore michael bloomberg new york york mayor times square after the ball dropped hearlding the new year vincent laforet the new york times nyt41 new york dec new year the usual party atmosphere times square had patriotic theme for many atypical new year eve monday evening justin lane the new york times nyt40 new york dec new year security was tight times square this year people began staking out spot watch the new year ball drop midtown manhattan monday evening richard perry the new york times nyt39 new york dec bloomberg michael bloomberg arriving the minicipal building lower manhattan take his oath office the city clerk office monday will officially replace mayor rudolph guiliani the stroke midnight librado romero the new york times nyt37 new york dec new year some police officers patrolled times square monday night often conducting spot checks revelers vincent laforet the new york times nyt38 new york dec firefighters squad company park slope brooklyn firefighters michael stackpole left and tim rogers discussed the appointment nicholas scoppetta commissioner for department logistical and emotional turmoil aaron lee fineman the new york times nyt36 new york dec new year security was tight times square this year people began staking out spot watch the new year ball drop midtown manhattan monday evening vincent laforet the new york times nyt35 new york dec biz schools meyer feldberg dean the columbia business school says the number applications schools like his sharply people look for place weather the recession while upgrading their skills justin lane the new york times nyt34 shibarghan afghanistan dec attack prisoners over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison soldier from the army 10th mountain division stands next fighter with the northern alliance guarding the gates shibarghan prison saturday alan chin the new york times nyt33 shibarghan afghanistan dec attack prisoners over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison prisoners shibarghan prison saturday alan chin the new york times nyt32 shibarghan afghanistan dec attack prisoners over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison prisoners shibarghan prison saturday alan chin the new york times nyt31 shibarghan afghanistan dec attack prisoners over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison bound prisoners shibarghan prison saturday alan chin the new york times nyt30 shibarghan afghanistan dec attack prisoners over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison some the prisoners shibarghan prison bathe last saturday alan chin the new york times nyt29 hollywood fla dec antiterror course recent events have left many floridians feeling vulnerable but now hundreds average south floridians have taken their protection into their own hands they have signed for counterterrorism course offered retired police swat team leader and his staff former elite military and law enforcement personnel demonstration book bomb shown example how terrorist can hide deadly force and what look for combat terrorism andrew itkoff the new york times nyt28 hollywood fla dec antiterror course recent events have left many floridians feeling vulnerable but now hundreds average south floridians have taken their protection into their own hands they have signed for counterterrorism course offered retired police swat team leader and his staff former elite military and law enforcement personnel demonstration mock terrorist nelson ricardo instructor and special forces officer portrays bomber and what increase the odds survival andrew itkoff the new york times nyt27 hollywood fla dec antiterror course recent events have left many floridians feeling vulnerable but now hundreds average south floridians have taken their protection into their own hands they have signed for counterterrorism course offered retired police swat team leader and his staff former elite military and law enforcement personnel walter philbrick left joins two his employees doreen pluschau and nelson ricardo mock airliner hijacking terrorists you nothing when terrorists strike philbrick says you going die andrew itkoff the new york times nyt26 new york dec mayor mayor rudolph guiliani says goodbye staffers leaves city hall for the last time monday james estrin the new york times nyt25 new york dec new year police officer from the new york corrections department and his unit roam the area thousands await the start new year ceremonies times square monday evening vincent laforet the new york times nyt24 new york dec new year greg packer huntington looks the jumbotron and thousands await the start new year ceremonies times square monday evening vincent laforet the new york times nyt23 new york dec new year security was tight times square this year people began staking out spot watch the new year ball drop midtown manhattan monday evening vincent laforet the new york times nyt22 new york dec mayor his final day office mayor rudolph giuliani the closing bell the new york stock exchange from left richard grasso chair and ceo giuliani and his companion judith nathan keith meyers the new york times nyt21 new york dec mayor his final day office mayor rudolph giuliani said monday has completed plans for his new business venture and judith nathan are love and his regrets are few and far between the mayor even said miss the press corps which criticized frequently during his eight years office for doing poor job covering his administration guiliani officialy leaving city hall the music the nypd emerald pipe band with judy nathan his side michelle agins the new york times nyt20 new york dec new year security was tight times square this year people began staking out spot watch the new year ball drop midtown manhattan monday evening aaron lee fineman the new york times nyt19 quetta pakistan dec afghan refugees the united nations high commission for refugees unhcr said that about afghans from quetta and surrounding villages are expected return afghanistan this month last count had crossed mar gul and her two sons one whom stands behind her are going back kandahar see how the security situation gul lost her husband during the bombings last month and she has means support her children tasgola karla bruner cox news service nyt18 morristown dec sci infertility business infertility has become big fiercely competitive business with billion dollars revenues and with more and more doctors fighting for limited number patients kathy miller and richard scott reproductive medicine associates dith pran the new york times nyt17 atlanta dec trainer atlanta this time year exercise the minds many whose new year resolutions include dropping holiday pounds and getting fit some will turn personal trainers personal trainer lee fidler standing who with the decatur ymca with client deb watts louie favorite atlanta journal constitution nyt16 undated dec calendars texas cox aztec scenes gods and godesses kings and conquerors produced mexico grace the calendars handed out and sold numerous austin restaurants and businesses examples mexican art adorning calendars from businesses austin texas austin american statesman cox news service nyt15 atlanta dec travel child atlanta chanel johnson customer service duty manager for air tran talks two young travellers who were flying unaccompanied last friday gate hartsfield airport the boys expressed interest sitting together the flight bound for gulfport miss johnson arranged the seating sept changed how people view air travel but unaccompanied minors are still flying the skies charlotte teagle cox news service nyt14 new york dec mayor bloomberg michael bloomberg took the oath office monday the first three swearing ceremonies presenting city clerk victor robles with pennies symbol progress the ceremony did not actually make bloomberg mayor was formally sworn mayor rudolph giuliani just after midnight times square then again tuesday the chief judge new york state judith kaye front city hall bloomberg speaks reporters before his first swearing ceremony monday librado romero the new york times nyt13 red house virg dec muslim enclave federal prosecutors the enclave western virginia compound potentially dangerous muslims where guns are prevalent and hatred the strong neighbors mysterious collection mobile homes but the families red house devout community black americans who fled the big cities raise their children relative quiet sign indicating the islamberg campus quranic open university the muslims america ozier muhammad the new york times nyt12 undated dec sci microplumbing part microfluidic chip two liquids flow together for mixing pipes are one fiftieth inch wide after shrinking electronics into microelectronics and machines into micromachines scientists have become microplumbers too carving mazes pipes the width human hair into silicon glass and plastic they have developed devices that shuttle around miniscule amounts liquid mix them together run chemical experiments analyze bits dna floating within they are essentially condensing entire chemistry laboratories onto small chips which promises the usual benefits miniaturization faster cheaper better handylab inc the new york times nyt11 new york dec edmund morris interview edmund morris the biographer ronald reagan and teddy roosevelt roosevelt childhood home manhattan earlier this month morris has written three books about two presidents but says never been much aware politics actually fred conrad the new york times lite nyt10 new york dec detained rights the last month the american civil liberties union has written ten the countries whose citizens have been detained the united states and offered legal help highlighting instances abuse our government and developing systematic litigation challenge its unconstitutional practices pamphlets handed out the aclu advising people their rights the new york times nyt9 ramallah west bank dec mideast palestinian leader yasser arafat center waves supporters during rally marking the 37th anniversary the founding his fatah movement monday night ramallah during these difficult times are living our people are still fighting against all the israeli challenges arafat told cheering crowd the west bank town are the strong people the palestinian flag will flown above the walls jerusalem rina castelnuovo the new york times lite nyt8 new york dec burrows fashion amp fashion designer stephen burrows with model sporting one his designs don hogan charles the new york times nyt7 new york dec burrows fashion fashion designer stephen burrows the studio area his harlem home during interview earlier this month don hogan charles the new york times nyt6 crawford texas dec bush nearly year after taking office president bush has seized the catastrophe sept project himself the world commander chief the center the crisis and aggressively reach for new powers his presidency yet bush has remained stymied significant parts his domestic agenda president bush speaks with prime minister tony blair britain saturday dec from his ranch crawford susan sterner the white house the new york times nyt5 new york dec detained rights the last month the american civil liberties union has written ten the countries whose citizens have been detained the united states and offered legal help highlighting instances abuse our government and developing systematic litigation challenge its unconstitutional practices anthony romero executive director the american civil liberties union one the organization law libraries during interview earlier this month fred conrad the new york times nyt4 rome dec exorcist potter rev gabriele amorth the catholic church best known exorcist has been all the papers again this time for taking harry potter when recently told the italian news agency that the devil was behind harry luring children into supernatural adventures set off debate newspapers and catholic chat rooms father amorth his office earlier this month chris warde jones the new york times lite nyt3 new york dec hilfiger profile fashion designer tommy hilfiger during interview earlier this month chester higgins the new york times nyt2 kandahar afghanistan dec afghan military members the special forces part convoy six vehicles left the area monday unknown destination forces have been searching for taliban leader mullah mohammed omar since dec when kandahar fell anti taliban afghan forces kandahar omar hometown and was the last major taliban stronghold afghanistan omar probably somewhere the mountains northwest kandahar intelligence official said monday ozier muhammad the new york times nyt1 edia khil afghanistan dec afghan afghan men plead for donated food which was being handed out from the back truck the village edia khil near tora bora monday the food was donated ali baba affluent afghan businessman who has been donating food villages surrounding jalalabad joao silva the new york times the new york times news service new york times news service for tuesday pms here are the top news stories from the new york times news service for pms tuesday jan the pms news desk opens eastern time get story repeats before this hour call for reruns datafeatures for repeats upi datanews nyt news service international moved category attack prisoners shibarghan afghanistan over the next weeks american investigators will questioning hundreds foreign and afghan taliban prisoners that have been taken into custody from shibarghan prison they are looking for intelligence the taliban leadership and osama bin laden qaida network they will find odd mix people among the foreign prisoners whose individual stories show there was not much grand design that brought them together carlotta gall national general moved category bush perspective crawford texas nearly year after taking office president bush has seized the catastrophe sept project himself the world commander chief the center the crisis and aggressively reach for new powers his presidency yet bush has remained stymied significant parts his domestic agenda elisabeth bumiller and david sanger art adv photo nyt6 being sent nyt photo clients editors the times has concluded its daily presentation capsule profiles the sept victims which moved the wire terror missing the total exceeds all the missing known dead whose friends and families agreed interviews new names emerge more families make themselves available the times will publish additional profiles business day moved category hewlett compaq undated the dry language business does not sound like much integration risk but represents the greatest single doubt that surrounds the merger plan hewlett packard and compaq and the biggest obstacle winning shareholder approval for the deal the concern simple terms this big mergers the computer industry never seem work steve lohr argentina econ undated news analysis how economists view the long slow collapse south america second biggest economy daniel altman tyson foods springdale ark federal officials have accused tyson foods the nation largest meat processor violating labor environmental and civil rights laws and making illegal gifts cabinet secretary two weeks ago federal grand jury indicted tyson and six employees charges conspiring smuggle illegal immigrants into the united states work the company plants tyson insists has been the target overzealous investigators and crusading special interest groups but critics say that both tyson growth and its transgressions rise from the same devil may care philosophy with which the tyson family has imbued david barboza heating oil undated for the past few years thelma diego has locked the cost heating oil for her home new jersey because she wants both certainty and savings last winter when oil was about gallon diego paid just but the contract that diego signed june pay gallon this winter has proved bad bet heating oil prices today are percent lower than they were year ago many homeowners throughout the northeast are the same situation diego oil prices dip well below the rates they locked over the spring and summer abby ellin with joseph kahn commentary moved category column paul krugman sports moved category fbn playoffs undated pro football column the nfl with one week the regular season and the playoff spots now filled thomas george entertainment moved category morris biography new york interview with edmund morris the biographer ronald reagan and teddy roosevelt bill goldstein art adv photo nyt11 being sent nyt photo clients pope arts grant undated interview with william pope conceptual artist involved dispute over national endowment for the arts grant holland cotter eds note that pope mateo ballet cambridge mass young ballet institution the rise here offers bright counterpoint the retrenchment classical dance elsewhere around the country fed the elegant choreography its artistic director over the last years jose mateo ballet theater has cultivated distinctive ballet style critically acclaimed repertory original work school and member company now with this season nutcracker ballet theater has opened the first professional ballet venue this erudite city has ever had susan diesenhouse exorcist potter rome rev gabriele amorth the catholic church best known exorcist has been all the papers again this time for taking harry potter when recently told the italian news agency that the devil was behind harry luring children into supernatural adventures set off debate newspapers and catholic chat rooms melinda henneberger art adv photo nyt4 being sent nyt photo clients isadora book review undated isadora sensational life the dancer isadora duncan peter kurth reviewed jennifer dunning birthday review undated tlc world birthday new york times and granada joint venture lesli camhi sci universe fate undated until just few years ago most scientists believed that the universe would undergo eternal expansion but now with the discovery dark energy antigravity that seems embedded space itself the fate the universe seems far more bleaker scientists are realizing the possibility that the expansion the universe not just continuing but speeding that true rather than coasting gently into the night distant galaxies will eventually moving apart quickly that they cannot communicate with one another effect would like living the middle black hole that kept getting emptier and colder words dennis overbye science moved category sci infertility business undated infertility has become big fiercely competitive business with billion dollars revenues and with more and more doctors fighting for limited number patients the growth the field has been fueled rising success rates and increased demand from patients many whom pay tens thousands dollars out their own pockets hopes having child some medical experts are deeply concerned with marketing promotions that can shade the truth referring doctors and patients can find hard distinguish between centers with good reputations and ones that promise much more than they can deliver gina kolata words art adv graphic being sent nyt photo clients sci microplumbing undated after shrinking electronics into microelectronics and machines into micromachines scientists have become microplumbers too carving mazes pipes the width human hair into silicon glass and plastic they have developed devices that shuttle around minuscule amounts liquid mix them together run chemical experiments analyze bits dna floating within they are essentially condensing entire chemistry laboratories including the expertise the technicians onto small chips which promises the usual benefits miniaturization faster cheaper better kenneth chang words art adv photo nyt12 being sent nyt photo clients sci house finch undated ornithologists have discovered that the population the house finch sparrow size bird with reddish breast that popular year round visitor feeders has been devastated crippling disease just seven years some million house finches percent the population have disappeared from the eastern united states the apparent victims highly contagious eye disease jane brody words art adv graphic beign sent nyt graphic clients sci lichens book undated lost obscurity near the bottom the organismal totem pole just above bacteria and rotifers lichens have patiently awaited their moment the spotlight this last fabulously illustrated and exhaustively researched new tome entitled lichens north america three lichen besotted authors unmask the vibrant beauty these organisms carol kaesuk yoon words art adv map beign sent nyt graphic clients sci watch undated news and notes science items how horse anatomy causes bounce what makes bones tough and the complete sequencing human chromosome henry fountain words sci graves race undated the debate over race and whether meaningless concept continues joseph graves professor evolutionary biology and african american studies arizona state university has jumped into the fray his provocative book the emperor new clothes biological theories race the millennium graves argues that biological races not exist and that race simply social and political construct that the world would better without conversation with graves discusses genes race and health linda villarosa words sci transgender privacy undated after meeting with transgendered patient who insisted that her sexual orientation left out her medical record doctor struggles with her obligation keep the medical record accurate while also respecting her patient privacy abigail zuger words sci therapist privacy undated for years therapists have argued about how much themselves they should reveal their patients freud argued that psychoanalysts should refrain from disclosing personal information their patients while humanistic psychologists like carl rogers recommended self disclosure way helping patients open about themselves now new study has found that patients whose therapists are more revealing both like their therapists more and are less distressed than patients whose therapists limit their disclosures erica goode words sci brody health undated personal health while nearly every woman knows that modern medicine has developed techniques help women with compromised fertility and complicated pregnancies relatively few seem aware the challenges financial emotional and medical associated with these treatments with their often limited chance success jane brody art adv graphic being sent nyt graphic clients sci book review undated timebomb the global epidemic multi drug resistant tuberculosis reviewed john langone words and sci hypertension book review undated questions and answers about hypertension reviewed john langone words sci vital signs undated news and notes health and fitness thumbsucking pacifier use after age may increase the risk conditions like buck teeth and the eventual need for braces according report the latest issue the journal the american dental association words new study published the journal psychological science offers evidence that caffeine can make measurable difference mental acuity for the elderly words major operation that often performed women with severe inflammation the colon appears reduce their fertility researchers report this month the journal gastroenterology words women who undergo hormone replacement therapy after menopause appear enjoy better mental functioning according study published the current issue neurology words researchers describe world class case jet lag only the problem occurs not this world but off the human clock researchers from nasa found cannot adjust days that are not hours long problem for astronauts extended missions words sci amp undated science question answered the fetus nourished through the placenta while the womb what happens the waste claiborne ray words editors all clients receive all budgets but only full service clients receive all stories please check your level service determine which stories you will receive nyt news service "