text
stringlengths
13
30k
{"text": "A demon, from a tree, removes itself in the form of a human man to make love to a young fair maiden only for her to die. The demon's eyes freeze, two drops of blood fall onto a bed he had specially created for his object of desire. The bed consumes the blood and it's hunger remains..anything that comes in contact with the bed is consumed! This is explained to us by one of the bed's victims, a painter whose soul is trapped \"inside\" one of his last works, the artistic rendering of the his final resting place(..he was dying of consumption, coughing up blood, deciding to die on the death bed). You see the painter, who we are able to see as if he were trapped in a small room looking through his painting, unfortunately a spectator to the bed's meals. The bed has a dark sense of humor, and we see this through it's allowing the painter to live, even giving him jewelry and other possessions once owned by eaten victims. One victim's skull grows bright red flowers not far from the basement housing the bed. The film features three young women who come across the mansion which holds the basement containing the death bed. The painter(Dave Marsh)might just have a method to destroying the death bed but it will include a human sacrifice in order to resurrect the body of the one whose death caused it's hunger in the first place. Patrick Spence-Thomas provides the soft, depressing voice of the trapped painter, narrating the film, lamenting about his current situation, telling us about past victims, and often scolding the bed of it's predatory nature.<br /><br />A definitive, genuine cult film..I expect it's status to soar now that DEATH BED:THE BED THAT EATS has found it's way to an audience(..such as myself)who appreciates the bizarre and grotesque. The bed itself contains a liquid type of acid with an apple-cider hue where we see the objects and humans(..struggling for naught) consumed. Many might recognize a young William Russ(BOY MEETS WORLD, THE UNHOLY)in curls, seeking after his runaway sister, finding her in the basement, zombie-like and traumatized(..of course, Julie Ritter pretty much was this way the whole film, in a trance, barely uttering a word)with them both trapped. In one of the film's most demented scenes, Russ attempts to stab the bed only for his hands to get caught in it's grip, the flesh acidified with only skeletal bones remaining, the cartilage deteriorating. There's one lengthly attempted escape by a victim whose legs were caught in the bed, almost out of the basement when it's sheets snatched her back into it's belly where she belonged. The film feels almost completely surreal as if we were watching a macabre nightmare unfold. Director George Barry often features gags regarding the victims who find themselves in the most unfortunate position choosing the death bed as their place of refuge..the painter gives us a recollection of all the various people who were eaten. There's really nothing like this movie anywhere, it's definitely one of a kind.", "target": 1, "evaluation_predictions": [-1.6904296875, 1.9443359375]}
{"text": "Might contain spoilers.<br /><br />This is just a good movie. Lots of good silly stuff to laugh at. However, do not watch the TV version, they cut to much out. Dom Deluise is rather awesome as the mafia Don who is hired to kill Robin. All I can say about his ten minutes: it's a long drive from Jersey. Also you gotta love them checking the script to make sure Robin gets another shot. Also: 12th Century Fox.<br /><br />Any bad stuff? The rappers at the beginning and the end seem rather out dated. The songs were rather lame. One time while watching this movie, I could think out a few more times when they could have thrown in another joke or 2. <br /><br />On the whole, however, an enjoyable movie experience. A must watch for comedy fans.", "target": 1, "evaluation_predictions": [-2.193359375, 2.4296875]}
{"text": "Two escaped convicts step out of the woods and shoot two campers in the head. That's the first scene, and it made me wince, fearing what was in store. But by the end of the first half hour I was all swept up in the flood of images. Not because I cared in the least about any of the characters but because I was aghast at how execrable the film was and was curious to see how truly low it could sink.<br /><br />Frank (Remar) and Red (Woolvett) are the ex-inmates. After murdering the two innocent campers they plow through the woods and wangle their way into the isolated cabin of Dean Stockwell and his two sons, the attorney Keith and the estranged homosexual Behr. The escapees at first pretend their car has broken down and they need to use the phone, but they gradually reveal their identities.<br /><br />Well, it looks like familiar territory so far. \"Desperate Hours,\" or \"Funny Games\" maybe. But -- hang on -- the gay son is in cahoots with the two. It seems that Stockwell, upon discovering his son in flagrante delicto with another man named Billy, kicked Billy around and threw him out. Billy went on to die and Behr now blames his Dad for the death. And, indeed, Dad is something of a Neanderthal when it comes to paraphilias, the fact that he was just found cohabiting with a secretary notwithstanding.<br /><br />The grief-stricken Behr just searched and searched, looking for someone else who had known Billy, someone with whom he could share his despair. It turned out to be one of the escapees, and now Behr is determined to see them to their freedom.<br /><br />It gets all twisted after that. People talk. They talk and talk. They talk continually. And NOT about the two mad killers who just can't wait to put one between their eyes. No -- the dialog goes something like, \"You were just so scared of something inside yourself that you even drove away your own SON.\" That's Behr, the young gay guy, talking to Stockwell. It's as if an afternoon domestic drama had had its genes mixed with a killer thriller in some kind of transformational device or cocktail shaker.<br /><br />The only real performance is given by James Remar as the more talkative and ominous of the two escapees. And that's mainly because of his gruff but fluid baritone, which sounds like Lance Henrickson's, and his wide guppy-like lips. He's easy on the eyes and ears.<br /><br />Dean Stockwell has given decent performances, including his inestimable bizarro turn in \"Blue Velvet,\" in which he was my supporting player, but here laziness, advancing years, or slack direction has shaped his every move and every utterance into a stereotype. It's as if he were reading stage directions -- \"Look surprised\" and \"shout angrily\" -- and following them literally. There's not a surprise in a cartload.<br /><br />If the gay son, Jason Behr, ever blinked, it must have been while I was blinking at the same time because I missed it. He has a long neck and just one expression in his instrument. Woolvett as the secondary villain fades into the pine-knot paneled woodwork. The attorney son is Robert Glen Keith. I hope he didn't quit his day job.<br /><br />The direction is pedestrian, the staging functional without being in the least innovative. Sometimes it's confusing. I lost track of where everyone was supposed to be as the killers are circling around on the cabin's porch and the family has locked itself inside with a shotgun. I also couldn't understand how Stockwell could put a blast through the cabin's door, hit Remar, and knock him in a back flip off the porch, and then Remar could simply stand up, dust himself off, and come up with a cranky riposte like, \"Okay. Two can play that game.\" But why go on? See it if you must.", "target": 0, "evaluation_predictions": [0.2626953125, -0.44482421875]}
{"text": "When I first saw a glimpse of this movie, I quickly noticed the actress who was playing the role of Lucille Ball. Rachel York's portrayal of Lucy is absolutely awful. Lucille Ball was an astounding comedian with incredible talent. To think about a legend like Lucille Ball being portrayed the way she was in the movie is horrendous. I cannot believe out of all the actresses in the world who could play a much better Lucy, the producers decided to get Rachel York. She might be a good actress in other roles but to play the role of Lucille Ball is tough. It is pretty hard to find someone who could resemble Lucille Ball, but they could at least find someone a bit similar in looks and talent. If you noticed York's portrayal of Lucy in episodes of I Love Lucy like the chocolate factory or vitavetavegamin, nothing is similar in any way-her expression, voice, or movement.<br /><br />To top it all off, Danny Pino playing Desi Arnaz is horrible. Pino does not qualify to play as Ricky. He's small and skinny, his accent is unreal, and once again, his acting is unbelievable. Although Fred and Ethel were not similar either, they were not as bad as the characters of Lucy and Ricky.<br /><br />Overall, extremely horrible casting and the story is badly told. If people want to understand the real life situation of Lucille Ball, I suggest watching A&E Biography of Lucy and Desi, read the book from Lucille Ball herself, or PBS' American Masters: Finding Lucy. If you want to see a docudrama, \"Before the Laughter\" would be a better choice. The casting of Lucille Ball and Desi Arnaz in \"Before the Laughter\" is much better compared to this. At least, a similar aspect is shown rather than nothing.", "target": 0, "evaluation_predictions": [2.44140625, -2.84765625]}
{"text": "Foolish hikers go camping in the Utah mountains only to run into a murderous, disfigured gypsy. <br /><br />The Prey is a pretty run of the mill slasher film, that mostly suffers from a lack of imagination. The victim characters are all-too-familiar idiot teens which means one doesn't really care about them, we just wonder when they will die! Not to mention it has one too many cheesy moments and is padded with endless, unnecessary nature footage. However it does have a few moments of interest to slasher fans, the occasional touch of spooky atmosphere, and a decent music score by Don Peake. Still, it's business as usual for dead-camper movies.<br /><br />There are much better films in this vein, but over all The Prey may be watchable enough for die-hard slasher fans. Although one might be more rewarded to watch Just Before Dawn (1981), Wrong Turn (2003), or even The Final Terror (1983) again.<br /><br />* 1/2 out of ****", "target": 0, "evaluation_predictions": [1.966796875, -2.36328125]}
{"text": "I don't play video games at all but my children do.<br /><br />I got a big kick out of this. Would like to see more of this type of film. \"very cool\" as my youngest would say.<br /><br />Interesting characters and the overall story line was interesting. Like I said I don't play video games but I think that my children would enjoyed this. It was not full of bad language and that is a pleasant change. This visual concept was different which caught my eye. Plus the sound track was pretty good. I might even try out some of the games my sons plays to see because of this film. Who knows maybe I'll be a gamer someday.", "target": 1, "evaluation_predictions": [-1.578125, 1.736328125]}
{"text": "What a wonderful documentary - I sat down thinking this would be a rehash of the bitchy stories told in Easy Riders, Raging Bulls, but it is, in fact, a clear-eyed, glorious celebration of a strange and twisted era that spawned some truly great movies. What struck me was the lack of bitterness apparent in the director interviews, given that now the movie business sucks in a large fashion - instead, folk like Friedkin and Coppola's eyes seem to positively glitter recalling their glory days. The footage of an audience coming out of a daytime screening of the Exorcist was priceless. 'It was - traumatic,' one guy says. A great epitaph for the late Ted Demme, a thrilling film, I just wish it was longer - I could have sat through a three hour cut of this.", "target": 1, "evaluation_predictions": [-1.607421875, 1.845703125]}
{"text": "Passion In The Desert exemplifies spatial grander. It is a visual narrative, illuminated by the magnificent cinematography. Passion was filmed on location in the deserts of Jordan, Egypt, Morocco, Namibia, and Tunisia. <br /><br />We are in Egypt, 1798. Augustin, a Napoleanic soldier, is escorting writer and artist Jean-Michel Venture De Paradis on an official mission to document, measure, draw, and paint the cultural landmarks of the Egypt: its dunes, stupendous ruins, and mysterious people. <br /><br />But, can you truly \"document\" majestic sandscapes, fractured edifices, and wild Bedouins? Can you truly capture the essence of Egypt, nature, man, and time?<br /><br />Jean and Augustin become lost in the mesmerizing glittering, gold desert, whose vastness overwhelms their senses. <br /><br />\"You can't get lost in Egypt! There's the Nile, and there's the sea!\", says the dehydrated Augustin, and soon he discovers an ancient, winding cave that leads to a palatial ruin. <br /><br />Delirious and near-delusional, he attempts to rest; a perplexing sound rouses him; his eyes, body, and emotions become hypnotically locked in time as he stumbles into a sensual, sensory experience.... <br /><br />A wild, sleek female leopard stares back at him, and their love affair begins....<br /><br />A daring love affair, a daring film.", "target": 1, "evaluation_predictions": [-2.078125, 2.345703125]}
{"author": "WILLIAM SHAKESPEARE", "content": "Let the bird of loudest lay\r\nOn the sole Arabian tree\r\nHerald sad and trumpet be,\r\nTo whose sound chaste wings obey.\r\n\r\nBut thou shrieking harbinger,\r\nFoul precurrer of the fiend,\r\nAugur of the fever's end,\r\nTo this troop come thou not near.\r\n\r\nFrom this session interdict\r\nEvery fowl of tyrant wing,\r\nSave the eagle, feather'd king;\r\nKeep the obsequy so strict.\r\n\r\nLet the priest in surplice white,\r\nThat defunctive music can,\r\nBe the death-divining swan,\r\nLest the requiem lack his right.\r\n\r\nAnd thou treble-dated crow,\r\nThat thy sable gender mak'st\r\nWith the breath thou giv'st and tak'st,\r\n'Mongst our mourners shalt thou go.\r\n\r\nHere the anthem doth commence:\r\nLove and constancy is dead;\r\nPhoenix and the Turtle fled\r\nIn a mutual flame from hence.\r\n\r\nSo they lov'd, as love in twain\r\nHad the essence but in one;\r\nTwo distincts, division none:\r\nNumber there in love was slain.\r\n\r\nHearts remote, yet not asunder;\r\nDistance and no space was seen\r\n'Twixt this Turtle and his queen:\r\nBut in them it were a wonder.\r\n\r\nSo between them love did shine\r\nThat the Turtle saw his right\r\nFlaming in the Phoenix' sight:\r\nEither was the other's mine.\r\n\r\nProperty was thus appalled\r\nThat the self was not the same;\r\nSingle nature's double name\r\nNeither two nor one was called.\r\n\r\nReason, in itself confounded,\r\nSaw division grow together,\r\nTo themselves yet either neither,\r\nSimple were so well compounded;\r\n\r\nThat it cried, \"How true a twain\r\nSeemeth this concordant one!\r\nLove has reason, reason none,\r\nIf what parts can so remain.\"\r\n\r\nWhereupon it made this threne\r\nTo the Phoenix and the Dove,\r\nCo-supremes and stars of love,\r\nAs chorus to their tragic scene:\r\n\r\n threnos\r\n\r\nBeauty, truth, and rarity,\r\nGrace in all simplicity,\r\nHere enclos'd, in cinders lie.\r\n\r\nDeath is now the Phoenix' nest,\r\nAnd the Turtle's loyal breast\r\nTo eternity doth rest,\r\n\r\nLeaving no posterity:\r\n'Twas not their infirmity,\r\nIt was married chastity.\r\n\r\nTruth may seem but cannot be;\r\nBeauty brag but 'tis not she;\r\nTruth and beauty buried be.\r\n\r\nTo this urn let those repair\r\nThat are either true or fair;\r\nFor these dead birds sigh a prayer.", "poem name": "The Phoenix and the Turtle", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "DUCHESS OF NEWCASTLE MARGARET CAVENDISH", "content": "Sir Charles into my chamber coming in,\r\nWhen I was writing of my Fairy Queen;\r\nI praysaid hewhen Queen Mab you do see\r\nPresent my service to her Majesty:\r\nAnd tell her I have heard Fame's loud report\r\nBoth of her beauty and her stately court.\r\nWhen I Queen Mab within my fancy viewed,\r\nMy thoughts bowed low, fearing I should be rude;\r\nKissing her garment thin which fancy made,\r\nI knelt upon a thought, like one that prayed;\r\nAnd then, in whispers soft, I did present\r\nHis humble service which in mirth was sent;\r\nThus by imagination I have been\r\nIn Fairy court and seen the Fairy Queen.", "poem name": "An Epilogue to the Above", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "THOMAS BASTARD", "content": "Our vice runs beyond all that old men saw,\r\nAnd far authentically above our laws,\r\nAnd scorning virtues safe and golden mean,\r\nSits uncontrolled upon the high extreme.\r\nCirces, thy monsters painted out the hue,\r\nOf feigned filthiness, but ours is true.\r\nOur vice puts down all proverbs and all themes,\r\nOur vice excels all fables and all dreams.", "poem name": "Book 7, Epigram 42", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "EDMUND SPENSER", "content": "Lo I the man, whose Muse whilome did maske,\r\nAs time her taught in lowly Shepheards weeds,\r\nAm now enforst a far unfitter taske,\r\nFor trumpets sterne to chaunge mine Oaten reeds,\r\nAnd sing of Knights and Ladies gentle deeds;\r\nWhose prayses having slept in silence long,\r\nMe, all too meane, the sacred Muse areeds\r\nTo blazon broad emongst her learned throng:\r\nFierce warres and faithful loves shall moralize my song.\r\nHelpe then, O holy Virgin chiefe of nine,\r\nThy weaker Novice to performe thy will,\r\nLay forth out of thine everlasting scryne\r\nThe antique rolles, which there lye hidden still,\r\nOf Faerie knights and fairest Tanaquill,\r\nWhom that most noble Briton Prince so long\r\nSought through the world, and suffered so much ill,\r\nThat I must rue his undeserved wrong:\r\nO helpe thou my weake wit, and sharpen my dull tong.\r\nAnd thou most dreaded impe of highest Jove,\r\nFaire Venus sonne, that with thy cruell dart\r\nAt that good knight so cunningly didst rove,\r\nThat glorious fire it kindled in his hart,\r\nLay now thy deadly Heben bow apart,\r\nAnd with thy mother milde come to mine ayde:\r\nCome both, and with you bring triumphant Mart,\r\nIn loves and gentle jollities arrayd,\r\nAfter his murdrous spoiles and bloudy rage allayd.\r\nAnd with them eke, O Goddesse heavenly bright,\r\nMirrour of grace and Majestie divine,\r\nGreat Lady of the greatest Isle, whose light\r\nLike Phoebus lampe throughout the world doth shine,\r\nShed thy faire beames into my feeble eyne,\r\nAnd raise my thoughts too humble and too vile,\r\nTo thinke of that true glorious type of thine,\r\nThe argument of mine afflicted stile:\r\nThe which to heare, vouchsafe, O dearest dred a-while.\r\n\r\ni\r\nA Gentle Knight was pricking on the plaine,\r\nY cladd in mightie armes and silver shielde,\r\nWherein old dints of deepe wounds did remaine,\r\nThe cruell markes of many a bloudy fielde;\r\nYet armes till that time did he never wield:\r\nHis angry steede did chide his foming bitt,\r\nAs much disdayning to the curbe to yield:\r\nFull jolly knight he seemd, and faire did sitt,\r\nAs one for knightly giusts and fierce encounters fitt.\r\n\r\nii\r\nBut on his brest a bloudie Crosse he bore,\r\nThe deare remembrance of his dying Lord,\r\nFor whose sweete sake that glorious badge he wore,\r\nAnd dead as living ever him ador'd:\r\nUpon his shield the like was also scor'd,\r\nFor soveraine hope, which in his helpe he had:\r\nRight faithfull true he was in deede and word,\r\nBut of his cheere did seeme too solemne sad;\r\nYet nothing did he dread, but ever was ydrad.\r\n\r\niii\r\nUpon a great adventure he was bond,\r\nThat greatest Gloriana to him gave,\r\nThat greatest Glorious Queene of Faerie lond,\r\nTo winne him worship, and her grace to have,\r\nWhich of all earthly things he most did crave;\r\nAnd ever as he rode, his hart did earne\r\nTo prove his puissance in battell brave\r\nUpon his foe, and his new force to learne;\r\nUpon his foe, a Dragon horrible and stearne.\r\n\r\niv\r\nA lovely Ladie rode him faire beside,\r\nUpon a lowly Asse more white then snow,\r\nYet she much whiter, but the same did hide\r\nUnder a vele, that wimpled was full low,\r\nAnd over all a blacke stole she did throw,\r\nAs one that inly mournd: so was she sad,\r\nAnd heavie sat upon her palfrey slow;\r\nSeemed in heart some hidden care she had,\r\nAnd by her in a line a milke white lambe she lad.\r\n\r\nv\r\nSo pure an innocent, as that same lambe,\r\nShe was in life and every vertuous lore,\r\nAnd by descent from Royall lynage came\r\nOf ancient Kings and Queenes, that had of yore\r\nTheir scepters stretcht from East to Westerne shore,\r\nAnd all the world in their subjection held;\r\nTill that infernall feend with foule uprore\r\nForwasted all their land, and them expeld:\r\nWhom to avenge, she had this Knight from far compeld.\r\n\r\nvi\r\nBehind her farre away a Dwarfe did lag,\r\nThat lasie seemd in being ever last,\r\nOr wearied with bearing of her bag\r\nOf needments at his backe. Thus as they past,\r\nThe day with cloudes was suddeine overcast,\r\nAnd angry Jove an hideous storme of raine\r\nDid poure into his Lemans lap so fast,\r\nThat every wight to shrowd it did constrain,\r\nAnd this faire couple eke to shroud themselves were fain.\r\n\r\nvii\r\nEnforst to seeke some covert nigh at hand,\r\nA shadie grove not far away they spide,\r\nThat promist ayde the tempest to withstand:\r\nWhose loftie trees yclad with sommers pride,\r\nDid spred so broad, that heavens light did hide,\r\nNot perceable with power of any starre:\r\nAnd all within were pathes and alleies wide,\r\nWith footing worne, and leading inward farre:\r\nFaire harbour that them seemes; so in they entred arre.\r\n\r\nviii\r\nAnd foorth they passe, with pleasure forward led,\r\nJoying to heare the birdes sweete harmony,\r\nWhich therein shrouded from the tempest dred,\r\nSeemd in their song to scorne the cruell sky.\r\nMuch can they prayse the trees so straight and hy,\r\nThe sayling Pine, the Cedar proud and tall,\r\nThe vine-prop Elme, the Poplar never dry,\r\nThe builder Oake, sole king of forrests all,\r\nThe Aspine good for staves, the Cypresse funerall.\r\n\r\nix\r\nThe Laurell, meed of mightie Conquerours\r\nAnd Poets sage, the Firre that weepeth still,\r\nThe Willow worne of forlorne Paramours,\r\nThe Eugh obedient to the benders will,\r\nThe Birch for shaftes, the Sallow for the mill,\r\nThe Mirrhe sweete bleeding in the bitter wound,\r\nThe warlike Beech, the Ash for nothing ill,\r\nThe fruitfull Olive, and the Platane round,\r\nThe carver Holme, the Maple seeldom inward sound.\r\n\r\nx\r\nLed with delight, they thus beguile the way,\r\nUntill the blustring storme is overblowne;\r\nWhen weening to returne, whence they did stray,\r\nThey cannot find that path, which first was showne,\r\nBut wander too and fro in wayes unknowne,\r\nFurthest from end then, when they neerest weene,\r\nThat makes them doubt, their wits be not their owne:\r\nSo many pathes, so many turnings seene,\r\nThat which of them to take, in diverse doubt they been.\r\n\r\nxi\r\nAt last resolving forward still to fare,\r\nTill that some end they finde or in or out,\r\nThat path they take, that beaten seemd most bare,\r\nAnd like to lead the labyrinth about;\r\nWhich when by tract they hunted had throughout,\r\nAt length it brought them to a hollow cave,\r\nAmid the thickest woods. The Champion stout\r\nEftsoones dismounted from his courser brave,\r\nAnd to the Dwarfe a while his needlesse spere he gave.\r\n\r\nxii\r\nBe well aware, quoth then that Ladie milde,\r\nLeast suddaine mischiefe ye too rash provoke:\r\nThe danger hid, the place unknowne and wilde,\r\nBreeds dreadfull doubts: Oft fire is without smoke,\r\nAnd perill without show: therefore your stroke\r\nSir knight with-hold, till further triall made.\r\nAh Ladie (said he) shame were to revoke\r\nThe forward footing for an hidden shade:\r\nVertue gives her selfe light, through darkenesse for to wade.\r\n\r\nxiii\r\nYea but (quoth she) the perill of this place\r\nI better wot then you, though now too late\r\nTo wish you backe returne with foule disgrace,\r\nYet wisedome warnes, whilest foot is in the gate,\r\nTo stay the steppe, ere forced to retrate.\r\nThis is the wandring wood, this Errours den,\r\nA monster vile, whom God and man does hate:\r\nTherefore I read beware. Fly fly (quoth then\r\nThe fearefull Dwarfe:) this is no place for living men.\r\n\r\nxiv\r\nBut full of fire and greedy hardiment,\r\nThe youthfull knight could not for ought be staide,\r\nBut forth unto the darksome hole he went,\r\nAnd looked in: his glistring armor made\r\nA litle glooming light, much like a shade,\r\nBy which he saw the ugly monster plaine,\r\nHalfe like a serpent horribly displaide,\r\nBut th'other halfe did womans shape retaine,\r\nMost lothsom, filthie, foule, and full of vile disdaine.\r\n\r\nxv\r\nAnd as she lay upon the durtie ground,\r\nHer huge long taile her den all overspred,\r\nYet was in knots and many boughtes upwound,\r\nPointed with mortall sting. Of her there bred\r\nA thousand yong ones, which she dayly fed,\r\nSucking upon her poisonous dugs, eachone\r\nOf sundry shapes, yet all ill favored:\r\nSoone as that uncouth light upon them shone,\r\nInto her mouth they crept, and suddain all were gone.\r\n\r\nxvi\r\nTheir dam upstart, out of her den effraide,\r\nAnd rushed forth, hurling her hideous taile\r\nAbout her cursed head, whose folds displaid\r\nWere stretcht now forth at length without entraile.\r\nShe lookt about, and seeing one in mayle\r\nArmed to point, sought backe to turne againe;\r\nFor light she hated as the deadly bale,\r\nAy wont in desert darknesse to remaine,\r\nWhere plaine none might her see, nor she see any plaine.\r\n\r\nxvii\r\nWhich when the valiant Elfe perceiv'd, he lept\r\nAs Lyon fierce upon the flying pray,\r\nAnd with his trenchand blade her boldly kept\r\nFrom turning backe, and forced her to stay:\r\nTherewith enrag'd she loudly gan to bray,\r\nAnd turning fierce, her speckled taile advaunst,\r\nThreatning her angry sting, him to dismay:\r\nWho nought aghast, his mightie hand enhaunst:\r\nThe stroke down from her head unto her shoulder glaunst.\r\n\r\nxviii\r\nMuch daunted with that dint, her sence was dazd,\r\nYet kindling rage, her selfe she gathered round,\r\nAnd all attonce her beastly body raizd\r\nWith doubled forces high above the ground:\r\nTho wrapping up her wrethed sterne arownd,\r\nLept fierce upon his shield, and her huge traine\r\nAll suddenly about his body wound,\r\nThat hand or foot to stirre he strove in vaine:\r\nGod helpe the man so wrapt in Errours endlesse traine.\r\n\r\nxix\r\nHis Lady sad to see his sore constraint,\r\nCride out, Now now Sir knight, shew what ye bee,\r\nAdd faith unto your force, and be not faint:\r\nStrangle her, else she sure will strangle thee.\r\nThat when he heard, in great perplexitie,\r\nHis gall did grate for griefe and high disdaine,\r\nAnd knitting all his force got one hand free,\r\nWherewith he grypt her gorge with so great paine,\r\nThat soone to loose her wicked bands did her constraine.\r\n\r\nxx\r\nTherewith she spewd out of her filthy maw\r\nA floud of poyson horrible and blacke,\r\nFull of great lumpes of flesh and gobbets raw,\r\nWhich stunck so vildly, that it forst him slacke\r\nHis grasping hold, and from her turne him backe:\r\nHer vomit full of bookes and papers was,\r\nWith loathly frogs and toades, which eyes did lacke,\r\nAnd creeping sought way in the weedy gras:\r\nHer filthy parbreake all the place defiled has.\r\n\r\nxxi\r\nAs when old father Nilus gins to swell\r\nWith timely pride above the Aegyptian vale,\r\nHis fattie waves do fertile slime outwell,\r\nAnd overflow each plaine and lowly dale:\r\nBut when his later spring gins to avale,\r\nHuge heapes of mudd he leaves, wherein there breed\r\nTen thousand kindes of creatures, partly male\r\nAnd partly female of his fruitfull seed;\r\nSuch ugly monstrous shapes elsewhere may no man reed.\r\n\r\nxxii\r\nThe same so sore annoyed has the knight,\r\nThat welnigh choked with the deadly stinke,\r\nHis forces faile, ne can no longer fight.\r\nWhose corage when the feend perceiv'd to shrinke,\r\nShe poured forth out of her hellish sinke\r\nHer fruitfull cursed spawne of serpents small,\r\nDeformed monsters, fowle, and blacke as inke,\r\nWhich swarming all about his legs did crall,\r\nAnd him encombred sore, but could not hurt at all.\r\n\r\nxxiii\r\nAs gentle Shepheard in sweete even-tide,\r\nWhen ruddy Phoebus gins to welke in west,\r\nHigh on an hill, his flocke to vewen wide,\r\nMarkes which do byte their hasty supper best;\r\nA cloud of combrous gnattes do him molest,\r\nAll striving to infixe their feeble stings,\r\nThat from their noyance he no where can rest,\r\nBut with his clownish hands their tender wings\r\nHe brusheth oft, and oft doth mar their murmurings.\r\n\r\nxxiv\r\nThus ill bestedd, and fearefull more of shame,\r\nThen of the certaine perill he stood in,\r\nHalfe furious unto his foe he came,\r\nResolv'd in minde all suddenly to win,\r\nOr soone to lose, before he once would lin;\r\nAnd strooke at her with more then manly force,\r\nThat from her body full of filthie sin\r\nHe raft her hatefull head without remorse;\r\nA streame of cole black bloud forth gushed from her corse.\r\n\r\nxxv\r\nHer scattred brood, soone as their Parent deare\r\nThey saw so rudely falling to the ground,\r\nGroning full deadly, all with troublous feare,\r\nGathred themselves about her body round,\r\nWeening their wonted entrance to have found\r\nAt her wide mouth: but being there withstood\r\nThey flocked all about her bleeding wound,\r\nAnd sucked up their dying mothers blood,\r\nMaking her death their life, and eke her hurt their good.\r\n\r\nxxvi\r\nThat detestable sight him much amazde,\r\nTo see th'unkindly Impes of heaven accurst,\r\nDevoure their dam; on whom while so he gazd,\r\nHaving all satisfide their bloudy thurst,\r\nTheir bellies swolne he saw with fulnesse burst,\r\nAnd bowels gushing forth: well worthy end\r\nOf such as drunke her life, the which them nurst;\r\nNow needeth him no lenger labour spend,\r\nHis foes have slaine themselves, with whom he should contend.\r\n\r\nxxvii\r\nHis Ladie seeing all, that chaunst, from farre\r\nApprocht in hast to greet his victorie,\r\nAnd said, Faire knight, borne under happy starre,\r\nWho see your vanquisht foes before you lye:\r\nWell worthy be you of that Armorie,\r\nWherein ye have great glory wonne this day,\r\nAnd proov'd your strength on a strong enimie,\r\nYour first adventure: many such I pray,\r\nAnd henceforth ever wish, that like succeed it may.\r\n\r\nxxviii\r\nThen mounted he upon his Steede againe,\r\nAnd with the Lady backward sought to wend;\r\nThat path he kept, which beaten was most plame,\r\nNe ever would to any by-way bend,\r\nBut still did follow one unto the end,\r\nThe which at last out of the wood them brought.\r\nSo forward on his way (with God to frend)\r\nHe passed forth, and new adventure sought;\r\nLong way he travelled, before he heard of ought.\r\n\r\nxxix\r\nAt length they chaunst to meet upon the way\r\nAn aged Sire, in long blacke weedes yclad,\r\nHis feete all bare, his beard all hoarie gray,\r\nAnd by his belt his booke he hanging had;\r\nSober he seemde, and very sagely sad,\r\nAnd to the ground his eyes were lowly bent,\r\nSimple in shew, and voyde of malice bad,\r\nAnd all the way he prayed, as he went,\r\nAnd often knockt his brest, as one that did repent.\r\n\r\nxxx\r\nHe faire the knight saluted, louting low,\r\nWho faire him quited, as that courteous was:\r\nAnd after asked him, if he did know\r\nOf straunge adventures, which abroad did pas.\r\nAh my deare Sonne (quoth he) how should, alas,\r\nSilly old man, that lives in hidden cell,\r\nBidding his beades all day for his trespas,\r\nTydings of warre and worldly trouble tell?\r\nWith holy father sits not with such things to mell.\r\n\r\nxxxi\r\nBut if of daunger which hereby doth dwell,\r\nAnd homebred evill ye desire to heare,\r\nOf a straunge man I can you tidings tell,\r\nThat wasteth all this countrey farre and neare.\r\nOf such (said he) I chiefly do inquere,\r\nAnd shall you well reward to shew the place,\r\nIn which that wicked wight his dayes doth weare:\r\nFor to all knighthood it is foule disgrace,\r\nThat such a cursed creature lives so long a space.\r\n\r\nxxxii\r\nFar hence (quoth he) in wastfull wildernesse\r\nHis dwelling is, by which no living wight\r\nMay ever passe, but thorough great distresse.\r\nNow (sayd the Lady) draweth toward night,\r\nAnd well I wote, that of your later fight\r\nYe all forwearied be: for what so strong,\r\nBut wanting rest will also want of might?\r\nThe Sunne that measures heaven all day long,\r\nAt night doth baite his steedes the Ocean waves emong.\r\n\r\nxxxiii\r\nThen with the Sunne take Sir, your timely rest,\r\nAnd with new day new worke at once begin:\r\nUntroubled night they say gives counsell best.\r\nRight well Sir knight ye have advised bin,\r\n(Quoth then that aged man;) the way to win\r\nIs wisely to advise: now day is spent;\r\nTherefore with me ye may take up your In\r\nFor this same night. The knight was well content:\r\nSo with that godly father to his home they went.\r\n\r\nxxxiv\r\nA little lowly Hermitage it was,\r\nDowne in a dale, hard by a forests side,\r\nFar from resort of people, that did pas\r\nIn travell to and froe: a little wyde\r\nThere was an holy Chappell edifyde,\r\nWherein the Hermite dewly wont to say\r\nHis holy things each morne and eventyde:\r\nThereby a Christall streame did gently play,\r\nWhich from a sacred fountaine welled forth alway.\r\n\r\nxxxv\r\nArrived there, the little house they fill,\r\nNe looke for entertainement, where none was:\r\nRest is their feast, and all things at their will;\r\nThe noblest mind the best contentment has.\r\nWith faire discourse the evening so they pas:\r\nFor that old man of pleasing wordes had store,\r\nAnd well could file his tongue as smooth as glas;\r\nHe told of Saintes and Popes, and evermore\r\nHe strowd an Ave-Mary after and before.\r\n\r\nxxxvi\r\nThe drouping Night thus creepeth on them fast,\r\nAnd the sad humour loading their eye liddes,\r\nAs messenger of Morpheus on them cast\r\nSweet slombring deaw, the which to sleepe them biddes.\r\nUnto their lodgings then his guestes he riddes:\r\nWhere when all drownd in deadly sleepe he findes,\r\nHe to his study goes, and there amiddes\r\nHis Magick bookes and artes of sundry kindes,\r\nHe seekes out mighty charmes, to trouble sleepy mindes.\r\n\r\nxxxvii\r\nThen choosing out few wordes most horrible,\r\n(Let none them read) thereof did verses frame,\r\nWith which and other spelles like terrible,\r\nHe bad awake blacke Plutoes griesly Dame,\r\nAnd cursed heaven, and spake reprochfull shame\r\nOf highest God, the Lord of life and light;\r\nA bold bad man, that dar'd to call by name\r\nGreat Gorgon, Prince of darknesse and dead night,\r\nAt which Cocytus quakes, and Styx is put to flight.\r\n\r\nxxxviii\r\nAnd forth he cald out of deepe darknesse dred\r\nLegions of Sprights, the which like little flyes\r\nFluttring about his ever damned hed,\r\nA-waite whereto their service he applyes,\r\nTo aide his friends, or fray his enimies:\r\nOf those he chose out two, the falsest twoo,\r\nAnd fittest for to forge true-seeming lyes;\r\nThe one of them he gave a message too,\r\nThe other by him selfe staide other worke to doo.\r\n\r\nxxxix\r\nHe making speedy way through spersed ayre,\r\nAnd through the world of waters wide and peepe,\r\nTo Morpheus house doth hastily repaire.\r\nAmid the bowels of the earth full steepe,\r\nAnd low, where dawning day doth never peepe,\r\nHis dwelling is; there Tethys his wet bed\r\nDoth ever wash, and Cynthia still doth steepe\r\nIn silver deaw his ever-drouping hed,\r\nWhiles sad Night over him her mantle black doth spred.\r\n\r\nxl\r\nWhose double gates he findeth locked fast,\r\nThe one faire fram'd of burnisht Yvory,\r\nThe other all with silver overcast;\r\nAnd wakefull dogges before them farre do lye\r\nWatching to banish Care their enimy,\r\nWho oft is wont to trouble gentle Sleepe.\r\nBy them the Sprite doth passe in quietly,\r\nAnd unto Morpheus comes, whom drowned deepe\r\nIn drowsie fit he findes: of nothing he takes keepe.\r\n\r\nxli\r\nAnd more, to lulle him in his slumber soft,\r\nA trickling streame from high rocke tumbling downe\r\nAnd ever-drizling raine upon the loft,\r\nMixt with a murmuring winde, much like the sowne\r\nOf swarming Bees, did cast him in a swowne:\r\nNo other noyse, nor peoples troublous cryes,\r\nAs still are wont t'annoy the walled towne,\r\nMight there be heard: but carelesse Quiet lyes,\r\nWrapt in eternall silence farre from enemyes.\r\n\r\nxlii\r\nThe messenger approching to him spake,\r\nBut his wast wordes returnd to him in vaine:\r\nSo sound he slept, that nought mought him awake.\r\nThen rudely he him thrust, and pusht with paine,\r\nWhereat he gan to stretch: but he againe\r\nShooke him so hard, that forced him to speake.\r\nAs one then in a dreame, whose dryer braine\r\nIn tost with troubled sights and fancies weake,\r\nHe mumbled soft, but would not all his silence breake.\r\n\r\nxliii\r\nThe Sprite then gan more boldly him to wake,\r\nAnd threatned unto him the dreaded name\r\nOf Hecate: whereat he gan to quake,\r\nAnd lifting up his lumpish head, with blame\r\nHalfe angry asked him, for what he came.\r\nHither (quoth he) me Archimago sent,\r\nHe that the stubborne Sprites can wisely tame,\r\nHe bids thee to him send for his intent\r\nA fit false dreame, that can delude the sleepers sent.\r\n\r\nxliv\r\nThe God obayde, and calling forth straight way\r\nA diverse dreame out of his prison darke,\r\nDelivered it to him, and downe did lay\r\nHis heavie head, devoide of carefull carke,\r\nWhose sences all were straight benumbed and starke.\r\nHe backe returning by the Yvorie dore,\r\nRemounted up as light as chearefull Larke,\r\nAnd on his litle winges the dreame he bore\r\nIn hast unto his Lord, where he him left afore.\r\n\r\nxlv\r\nWho all this while with charmes and hidden artes,\r\nHad made a Lady of that other Spright,\r\nAnd fram'd of liquid ayre her tender partes\r\nSo lively, and so like in all mens sight,\r\nThat weaker sence it could have ravisht quight:\r\nThe maker selfe for all his wondrous witt,\r\nWas nigh beguiled with so goodly sight:\r\nHer all in white he clad, and over it\r\nCast a blacke stole, most like to seeme for Una fit.\r\n\r\nxlvi\r\nNow when that ydle dreame was to him brought,\r\nUnto that Elfin knight he bad him fly,\r\nWhere he slept soundly void of evill thought\r\nAnd with false shewes abuse his fantasy,\r\nIn sort as he him schooled privily:\r\nAnd that new creature borne without her dew,\r\nFull of the makers guile, with usage sly\r\nHe taught to imitate that Lady trew,\r\nWhose semblance she did carrie under feigned hew.\r\n\r\nxlvii\r\nThus well instructed, to their worke they hast,\r\nAnd comming where the knight in slomber lay,\r\nThe one upon his hardy head him plast,\r\nAnd made him dreame of loves and lustfull play,\r\nThat nigh his manly hart did melt away,\r\nBathed in wanton blis and wicked joy:\r\nThen seemed him his Lady by him lay,\r\nAnd to him playnd, how that false winged boy,\r\nHer chast hart had subdewd, to learne Dame pleasures toy.\r\n\r\nxlviii\r\nAnd she her selfe of beautie soveraigne Queene,\r\nFaire Venus seemde unto his bed to bring\r\nHer, whom he waking evermore did weene,\r\nTo be the chastest flowre, that ay did spring\r\nOn earthly braunch, the daughter of a king,\r\nNow a loose Leman to vile service bound:\r\nAnd eke the Graces seemed all to sing,\r\nHymen {i}{_o} Hymen, dauncing all around,\r\nWhile freshest Flora her with Yvie girlond crownd.\r\n\r\nxlix\r\nIn this great passion of unwonted lust,\r\nOr wonted feare of doing ought amis,\r\nHe started up, as seeming to mistrust\r\nSome secret ill, or hidden foe of his:\r\nLo there before his face his Lady is,\r\nUnder blake stole hyding her bayted hooke,\r\nAnd as halfe blushing offred him to kis,\r\nWith gentle blandishment and lovely looke,\r\nMost like that virgin true, which for her knight him took.\r\n\r\nl\r\nAll cleane dismayd to see so uncouth sight,\r\nAnd halfe enraged at her shamelesse guise,\r\nHe thought have slaine her in his fierce despight:\r\nBut hasty heat tempring with sufferance wise,\r\nHe stayde his hand, and gan himselfe advise\r\nTo prove his sense, and tempt her faigned truth.\r\nWringing her hands in wemens pitteous wise,\r\nTho can she weepe, to stirre up gentle ruth,\r\nBoth for her noble bloud, and for her tender youth.\r\n\r\nli\r\nAnd said, Ah Sir, my liege Lord and my love,\r\nShall I accuse the hidden cruell fate,\r\nAnd mightie causes wrought in heaven above,\r\nOr the blind God, that doth me thus amate,\r\nFor hoped love to winne me certaine hate?\r\nYet thus perforce he bids me do, or die.\r\nDie is my dew: yet rew my wretched state\r\nYou, whom my hard avenging destinie\r\nHath made judge of my life or death indifferently.\r\n\r\nlii\r\nYour owne deare sake forst me at first to leave\r\nMy Fathers kingdome, There she stopt with teares;\r\nHer swollen hart her speach seemd to bereave,\r\nAnd then againe begun, My weaker yeares\r\nCaptiv'd to fortune and frayle worldly feares,\r\nFly to your faith for succour and sure ayde:\r\nLet me not dye in languor and long teares.\r\nWhy Dame (quoth he) what hath ye thus dismayd?\r\nWhat frayes ye, that were wont to comfort me affrayd?\r\n\r\nliii\r\nLove of your selfe, she said, and deare constraint\r\nLets me not sleepe, but wast the wearie night\r\nIn secret anguish and unpittied plaint,\r\nWhiles you in carelesse sleepe are drowned quight.\r\nHer doubtfull words made that redoubted knight\r\nSuspect her truth: yet since no'untruth he knew,\r\nHer fawning love with foule disdainefull spight\r\nHe would not shend, but said, Deare dame I rew,\r\nThat for my sake unknowne such griefe unto you grew.\r\n\r\nliv\r\nAssure your selfe, it fell not all to ground;\r\nFor all so deare as life is to my hart,\r\nI deeme your love, and hold me to you bound;\r\nNe let vaine feares procure your needlesse smart,\r\nWhere cause is none, but to your rest depart.\r\nNot all content, yet seemd she to appease\r\nHer mournefull plaintes, beguiled of her art,\r\nAnd fed with words, that could not chuse but please,\r\nSo slyding softly forth, she turnd as to her ease.\r\n\r\nlv\r\nLong after lay he musing at her mood,\r\nMuch griev'd to think that gentle Dame so light,\r\nFor whose defence he was to shed his blood.\r\nAt last dull wearinesse of former fight\r\nHaving yrockt a sleepe his irkesome spright,\r\nThat troublous dreame gan freshly tosse his braine,\r\nWith bowres, and beds, and Ladies deare delight:\r\nBut when he saw his labour all was vaine,\r\nWith that misformed spright he backe returnd againe.", "poem name": "from The Faerie Queene: Book I, Canto I", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "RICHARD BARNFIELD", "content": "Long have I longd to see my love againe,\r\nStill have I wisht, but never could obtaine it;\r\nRather than all the world (if I might gaine it)\r\nWould I desire my loves sweet precious gaine.\r\nYet in my soule I see him everie day,\r\nSee him, and see his still sterne countenaunce,\r\nBut (ah) what is of long continuance,\r\nWhere majestie and beautie beares the sway?\r\nSometimes, when I imagine that I see him,\r\n(As love is full of foolish fantasies)\r\nWeening to kisse his lips, as my loves fees,\r\nI feele but aire: nothing but aire to bee him.\r\nThus with Ixion, kisse I clouds in vaine:\r\nThus with Ixion, feele I endles paine.", "poem name": "Sonnet 16", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "RICHARD BARNFIELD", "content": "Cherry-lipt Adonis in his snowie shape,\r\n Might not compare with his pure ivorie white,\r\n On whose faire front a poets pen may write,\r\nWhose roseate red excels the crimson grape,\r\nHis love-enticing delicate soft limbs,\r\n Are rarely framd tintrap poore gazine eies:\r\n His cheeks, the lillie and carnation dies,\r\nWith lovely tincture which Apollos dims.\r\nHis lips ripe strawberries in nectar wet,\r\n His mouth a Hive, his tongue a hony-combe,\r\n Where Muses (like bees) make their mansion.\r\nHis teeth pure pearle in blushing correll set.\r\n Oh how can such a body sinne-procuring,\r\n Be slow to love, and quicke to hate, enduring?", "poem name": "Sonnet 17", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "SIR WALTER RALEGH", "content": "Praisd be Dianas fair and harmless light;\r\nPraisd be the dews wherewith she moists the ground;\r\nPraisd be her beams, the glory of the night;\r\nPraisd be her power by which all powers abound.\r\n\r\nPraisd be her nymphs with whom she decks the woods,\r\nPraisd be her knights in whom true honour lives;\r\nPraisd be that force by which she moves the floods;\r\nLet that Diana shine which all these gives.\r\n\r\nIn heaven queen she is among the spheres;\r\nIn aye she mistress-like makes all things pure;\r\nEternity in her oft change she bears;\r\nShe beauty is; by her the fair endure.\r\n\r\nTime wears her not: she doth his chariot guide;\r\nMortality below her orb is placd;\r\nBy her the virtue of the stars down slide;\r\nIn her is virtues perfect image cast.\r\n\r\n A knowledge pure it is her worth to know:\r\n With Circes let them dwell that think not so.", "poem name": "Praisd be Dianas Fair and Harmless Light", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "QUEEN ELIZABETH I", "content": "When I was fair and young, then favor graced me.\r\nOf many was I sought their mistress for to be.\r\nBut I did scorn them all and answered them therefore:\r\nGo, go, go, seek some other where; importune me no more.\r\n\r\nHow many weeping eyes I made to pine in woe,\r\nHow many sighing hearts I have not skill to show,\r\nBut I the prouder grew and still this spake therefore:\r\nGo, go, go, seek some other where, importune me no more.\r\n\r\nThen spake fair Venus son, that proud victorious boy,\r\nSaying: You dainty dame, for that you be so coy,\r\nI will so pluck your plumes as you shall say no more:\r\nGo, go, go, seek some other where, importune me no more.\r\n\r\nAs soon as he had said, such change grew in my breast\r\nThat neither night nor day I could take any rest.\r\nWherefore I did repent that I had said before:\r\nGo, go, go, seek some other where, importune me no more.", "poem name": "When I Was Fair and Young", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "JOHN DONNE", "content": "When by thy scorn, O murd'ress, I am dead\r\n And that thou think'st thee free\r\nFrom all solicitation from me,\r\nThen shall my ghost come to thy bed,\r\nAnd thee, feign'd vestal, in worse arms shall see;\r\nThen thy sick taper will begin to wink,\r\nAnd he, whose thou art then, being tir'd before,\r\nWill, if thou stir, or pinch to wake him, think\r\n Thou call'st for more,\r\nAnd in false sleep will from thee shrink;\r\nAnd then, poor aspen wretch, neglected thou\r\nBath'd in a cold quicksilver sweat wilt lie\r\n A verier ghost than I.\r\nWhat I will say, I will not tell thee now,\r\nLest that preserve thee; and since my love is spent,\r\nI'had rather thou shouldst painfully repent,\r\nThan by my threat'nings rest still innocent.", "poem name": "The Apparition", "age": "Renaissance", "type": "Mythology & Folklore"}
{"author": "JOHN SKELTON", "content": "Pla ce bo,\r\nWho is there, who?\r\nDi le xi,\r\nDame Margery;\r\nFa, re, my, my,\r\nWherfore and why, why?\r\nFor the sowle of Philip Sparowe,\r\nThat was late slayn at Carowe,\r\nAmong the Nones Blake,\r\nFor that swete soules sake,\r\nAnd for all sparowes soules,\r\nSet in our bederolles,\r\nPater noster qui,\r\nWith an Ave Mari,\r\nAnd with the corner of a Crede,\r\nThe more shalbe your mede.\r\n\r\nWhan I remembre agayn\r\nHow mi Philyp was slayn,\r\nNever halfe the payne\r\nWas betwene you twayne,\r\nPyramus and Thesbe,\r\nAs than befell to me:\r\nI wept and I wayled,\r\nThe tearys downe hayled;\r\nBut nothinge it avayled\r\nTo call Phylyp agayne,\r\nWhom Gyb our cat hath slayne.\r\n\r\nGib, I saye, our cat,\r\nWorrowyd her on that\r\nWhich I loved best:\r\nIt can not be exprest\r\nMy sorowfull hevynesse,\r\nBut all without redresse;\r\nFor within that stounde,\r\nHalfe slumbrynge, in a swounde\r\nI fell downe to the grounde.\r\n\r\nUnneth I kest myne eyes\r\nTowarde the cloudy skyes:\r\nBut whan I dyd beholde\r\nMy sparow dead and colde,\r\nNo creatuer but that wolde\r\nHave rewed upon me,\r\nTo behold and se\r\nWhat hevynesse dyd me pange;\r\nWherewith my handes I wrange,\r\nThat my senaws cracked,\r\nAs though I had ben racked,\r\nSo payned and so strayned,\r\nThat no lyfe wellnye remayned.\r\n\r\nI syghed and I sobbed,\r\nFor that I was robbed\r\nOf my sparowes lyfe.\r\nO mayden, wydow, and wyfe,\r\nOf what estate ye be,\r\nOf hye or lowe degre,\r\nGreat sorowe than ye myght se,\r\nAnd lerne to wepe at me!\r\nSuch paynes dyd me frete,\r\nThat myne hert dyd bete,\r\nMy vysage pale and dead,\r\nWanne, and blewe as lead;\r\nThe panges of hatefull death\r\nWellnye had stopped my breath.\r\nHeu, heu, me,\r\nThat I am wo for the!\r\nAd Dominum, cum tribularer, clamavi:\r\nOf God nothynge els crave I\r\nBut Phyllypes soule to kepe\r\nFrom the marees deepe\r\nOf Acherontes well,\r\nThat is a flode of hell;\r\nAnd from the great Pluto,\r\nThe prynce of endles wo;\r\nAnd from foule Alecto,\r\nWith vysage blacke and blo;\r\nAnd from Medusa, that mare,\r\nThat lyke a fende doth stare;\r\nAnd from Megeras edders,\r\nFor rufflynge of Phillips fethers,\r\nAnd from her fyry sparklynges,\r\nFor burnynge of his wynges;\r\nAnd from the smokes sowre\r\nOf Proserpinas bowre;\r\nAnd from the dennes darke,\r\nWher Cerberus doth barke,\r\nWhom Theseus dyd afraye,\r\nWhom Hercules dyd outraye,\r\nAs famous poetes say;\r\nFrom that hell-hounde,\r\nThat lyeth in cheynes bounde,\r\nWith gastly hedes thre,\r\nTo Jupyter pray we\r\nThat Phyllyp preserved may be!\r\nAmen, say ye with me!\r\n\r\nDo mi nus,\r\nHelpe nowe, swete Jesus!\r\nLevavi oculos meos in montes:\r\nWolde God I had Zenophontes,\r\nOr Socrates the wyse\r\nTo shew me their devyse,\r\nModeratly to take\r\nThis sorrow that I make\r\nFor Phylyp Sparowes sake!\r\nSo fervently I shake,\r\nI fele my body quake;\r\nSo urgently I am brought\r\nInto carefull thought.\r\nLike Andromach, Hectors wyfe,\r\nWas wery of her lyfe,\r\nWhan she had lost her joye,\r\nNoble Hector of Troye;\r\nIn lyke maner also\r\nEncreaseth my dedly wo,\r\nFor my sparowe is go.\r\n\r\nIt was so prety a fole,\r\nIt wold syt on a stole,\r\nAnd lerned after my scole\r\nFor to kepe his cut,\r\nWith, \"Phyllyp, kepe your cut!\"\r\n\r\nIt had a velvet cap,\r\nAnd wold syt upon my lap,\r\nAnd seke after small wormes,\r\nAnd somtyme white bred crommes;\r\nAnd many tymes and ofte\r\nBetwene my brestes softe\r\nIt wolde lye and rest;\r\nIt was propre and prest.\r\n\r\nSomtyme he wolde gaspe\r\nWhan he sawe a waspe;\r\nA fly or a gnat,\r\nHe wolde flye at that;\r\nAnd prytely he wold pant\r\nWhan he saw an ant;\r\nLord, how he wolde pry\r\nAfter the butterfly!\r\nLorde, how he wolde hop\r\nAfter the gressop!\r\nAnd whan I sayd, \"Phyp! Phyp!\"\r\nThan he wold lepe and skyp,\r\nAnd take me by the lyp.\r\nAlas, it wyll me slo,\r\nThat Phillyp is gone me fro!", "poem name": "The Book of Phillip Sparrow", "age": "Renaissance", "type": "Mythology & Folklore"}
{"text1": "Myanmar 's pro-democracy leader Aung San Suu Kyi will return home late Friday but will remain in detention after recovering from surgery at a Yangon hospital , her personal physician said .", "text2": "Myanmar 's pro-democracy leader Aung San Suu Kyi will be kept under house arrest following her release from a hospital where she underwent surgery , her personal physician said Friday .", "target": 0, "feat_idx": 1073, "evaluation_predictions": [-1.1357421875, 1.125]}
{"text1": "Robert Walsh , 40 , remained in critical but stable condition Friday at Staten Island University Hospital 's north campus .", "text2": "Walsh , also 40 , was in critical but stable condition at Staten Island University Hospital last night .", "target": 0, "feat_idx": 974, "evaluation_predictions": [-1.3466796875, 1.30859375]}
{"text1": "In fiction : Edward P. Jones ( \" The Known World \" ) and Scott Spencer ( \" A Ship Made of Paper \" ) .", "text2": "The fifth nominee for fiction is Scott Spencer , for A Ship Made of Paper .", "target": 1, "feat_idx": 1305, "evaluation_predictions": [-0.2203369140625, 0.107666015625]}
{"text1": "Because of the accounting charge , the company now says it lost $ 1.04 billion , or 32 cents a share , in the quarter ended June 30 .", "text2": "Including the charge , the Santa Clara , Calif.-based company said Monday it lost $ 1.04 billion , or 32 cents per share , in the period ending June 30 .", "target": 0, "feat_idx": 2734, "evaluation_predictions": [-1.490234375, 1.3076171875]}
{"text1": "The top rate will go to 4.45 percent for all residents with taxable incomes above $ 500,000 .", "text2": "For residents with incomes above $ 500,000 , the income-tax rate will increase to 4.45 percent .", "target": 0, "feat_idx": 73, "evaluation_predictions": [-1.4853515625, 1.298828125]}
{"text1": "The S & P / TSX composite rose 87.74 points on the week , while the TSX Venture Exchange composite gained 44.49 points .", "text2": "On the week , the Dow Jones industrial average rose 11.56 points , while the Nasdaq Stock Market gained 39.42 points .", "target": 1, "feat_idx": 4049, "evaluation_predictions": [-0.6220703125, 0.41455078125]}
{"text1": "Nearly 300 mutinous troops who seized a Manila shopping and apartment complex demanding the government resign gave up and retreated peacefully after some 19 hours .", "text2": "Mutinous troops who seized a Manila shopping and apartment complex demanding the government resign ended a 19-hour standoff late Sunday and returned to barracks without a shot fired .", "target": 0, "feat_idx": 1916, "evaluation_predictions": [0.368896484375, -0.55029296875]}
{"text1": "\" Jeremy 's a good guy , \" Barber said , adding : \" Jeremy is living the dream life of the New York athlete .", "text2": "He also said Shockey is \" living the dream life of a New York athlete .", "target": 1, "feat_idx": 416, "evaluation_predictions": [-0.145263671875, 0.031341552734375]}
{"text1": "Carlson on Tuesday said he would not recuse himself from the case .", "text2": "Service officials said Carlson refused to recuse himself from the case .", "target": 0, "feat_idx": 686, "evaluation_predictions": [-1.5, 1.4736328125]}
{"text1": "At community colleges , tuition will jump to $ 2,800 from $ 2,500 .", "text2": "Community college students will see their tuition rise by $ 300 to $ 2,800 or 12 percent .", "target": 0, "feat_idx": 366, "evaluation_predictions": [-1.0126953125, 0.8017578125]}
{"id": 0, "text": "2-D STUDY,1. Mild aortic stenosis, widely calcified, minimally restricted.,2. Mild left ventricular hypertrophy but normal systolic function.,3. Moderate biatrial enlargement.,4. Normal right ventricle.,5. Normal appearance of the tricuspid and mitral valves.,6. Normal left ventricle and left ventricular systolic function.,DOPPLER,1. There is 1 to 2+ aortic regurgitation easily seen, but no aortic stenosis.,2. Mild tricuspid regurgitation with only mild increase in right heart pressures, 30-35 mmHg maximum.,SUMMARY,1. Normal left ventricle.,2. Moderate biatrial enlargement.,3. Mild tricuspid regurgitation, but only mild increase in right heart pressures.radiology, 2-d study, doppler, tricuspid regurgitation, heart pressures, stenosis, ventricular, heart, ventricle, tricuspid, regurgitation,", "label": 0}
{"id": 1, "text": "PREOPERATIVE DIAGNOSES: , Dysphagia and esophageal spasm.,POSTOPERATIVE DIAGNOSES: , Esophagitis and esophageal stricture.,PROCEDURE:, Gastroscopy.,MEDICATIONS:, MAC.,DESCRIPTION OF PROCEDURE: , The Olympus gastroscope was introduced into the oropharynx and passed carefully through the esophagus, stomach, and duodenum, to the third portion of the duodenum. The hypopharynx was normal and the upper esophageal sphincter was unremarkable. The esophageal contour was normal, with the gastroesophageal junction located at 38 cm from the incisors. At this point, there were several linear erosions and a sense of stricturing at 38 cm. Below this, there was a small hiatal hernia with the hiatus noted at 42 cm from the incisors. The mucosa within the hernia was normal. The gastric lumen was normal with normal mucosa throughout. The pylorus was patent permitting passage of the scope into the duodenum, which was normal through the third portion. During withdrawal of the scope, additional views were obtained of the cardia, confirming the presence of a small hiatal hernia. It was decided to attempt dilation of the strictured area, so an 18-mm TTS balloon was placed across the stricture and inflated to the recommended diameter. When the balloon was fully inflated, the lumen appeared to be larger than 18 mm diameter, suggesting that the stricture was in fact not a significant one. No stretching of the mucosa took place. The balloon was deflated and the scope was withdrawn. The patient tolerated the procedure well and was sent to the recovery room.,FINAL DIAGNOSES:,1. Esophagitis.,2. Minor stricture at the gastroesophageal junction.,3. Hiatal hernia.,4. Otherwise normal upper endoscopy to the transverse duodenum.,RECOMMENDATIONS: ,Continue proton pump inhibitor therapy.surgery, duodenum, esophagus, gastroscope, stomach, upper endoscopy, transverse duodenum, gastroesophageal junction, hiatal hernia, gastroscopy, endoscopy, esophagitis, gastroesophageal, hiatal, esophageal, hernia", "label": 3}
{"id": 2, "text": "CHIEF COMPLAINT:, The patient comes for three-week postpartum checkup, complaining of allergies.,HISTORY OF PRESENT ILLNESS:, She is doing well postpartum. She has had no headache. She is breastfeeding and feels like her milk is adequate. She has not had much bleeding. She is using about a mini pad twice a day, not any cramping or clotting and the discharge is turned from red to brown to now slightly yellowish. She has not yet had sexual intercourse. She does complain that she has had a little pain with the bowel movement, and every now and then she notices a little bright red bleeding. She has not been particularly constipated but her husband says she is not eating her vegetables like she should. Her seasonal allergies have back developed and she is complaining of extremely itchy watery eyes, runny nose, sneezing, and kind of a pressure sensation in her ears.,MEDICATIONS:, Prenatal vitamins.,ALLERGIES:, She thinks to Benadryl.,FAMILY HISTORY: , Mother is 50 and healthy. Dad is 40 and healthy. Half-sister, age 34, is healthy. She has a sister who is age 10 who has some yeast infections.,PHYSICAL EXAMINATION:,VITALS: Weight: 124 pounds. Blood pressure 96/54. Pulse: 72. Respirations: 16. LMP: 10/18/03. Age: 39.,HEENT: Head is normocephalic. Eyes: EOMs intact. PERRLA. Conjunctiva clear. Fundi: Discs flat, cups normal. No AV nicking, hemorrhage or exudate. Ears: TMs intact. Mouth: No lesion. Throat: No inflammation. She has allergic rhinitis with clear nasal drainage, clear watery discharge from the eyes.,Abdomen: Soft. No masses.,Pelvic: Uterus is involuting.,Rectal: She has one external hemorrhoid which has inflamed. Stool is guaiac negative and using anoscope, no other lesions are identified.,ASSESSMENT/PLAN:, Satisfactory three-week postpartum course, seasonal allergies. We will try Patanol eyedrops and Allegra 60 mg twice a day. She was cautioned about the possibility that this may alter her milk supply. She is to drink extra fluids and call if she has problems with that. We will try ProctoFoam HC. For the hemorrhoids, also increase the fiber in her diet. That prescription was written, as well as one for Allegra and Patanol. She additionally will be begin on Micronor because she would like to protect herself from pregnancy until her husband get scheduled in and has a vasectomy, which is their ultimate plan for birth control, and she anticipates that happening fairly soon. She will call and return if she continues to have problems with allergies. Meantime, rechecking in three weeks for her final six-week postpartum checkup.soap / chart / progress notes, checkup, allergies, postpartum, complaining of allergies, seasonal allergies, postpartum checkup,", "label": 0}
{"id": 3, "text": "PROCEDURE: , Bilateral L5, S1, S2, and S3 radiofrequency ablation.,INDICATION: , Sacroiliac joint pain.,INFORMED CONSENT: , The risks, benefits and alternatives of the procedure were discussed with the patient. The patient was given opportunity to ask questions regarding the procedure, its indications and the associated risks.,The risk of the procedure discussed include infection, bleeding, allergic reaction, dural puncture, headache, nerve injuries, spinal cord injury, and cardiovascular and CNS side effects with possible of vascular entry of medications. I also informed the patient of potential side effects or reactions to the medications potentially used during the procedure including sedatives, narcotics, nonionic contrast agents, anesthetics, and corticosteroids.,The patient was informed both verbally and in writing. The patient understood the informed consent and desired to have the procedure performed.,PROCEDURE: , Oxygen saturation and vital signs were monitored continuously throughout the procedure. The patient remained awake throughout the procedure in order to interact and give feedback. The x-ray technician was supervised and instructed to operate the fluoroscopy machine.,The patient was placed in a prone position on the treatment table with a pillow under the chest and head rotated. The skin over and surrounding the treatment area was cleaned with Betadine. The area was covered with sterile drapes, leaving a small window opening for needle placement. Fluoroscopy was used to identify the bony landmarks of the sacrum and the sacroiliac joints and the planned needle approach. The skin, subcutaneous tissue, and muscle within the planned approach were anesthetized with 1% Lidocaine.,With fluoroscopy, a 20 gauge 10-mm bent Teflon coated needle was gently guided into the groove between the SAP and the sacrum for the dorsal ramus of L5 and the lateral border of the posterior sacral foramen, for the lateral branches of S1, S2, and S3. Also, fluoroscopic views were used to ensure proper needle placement.,The following technique was used to confirm correct placement. Motor stimulation was applied at 2 Hz with 1 millisecond duration. No extremity movement was noted at less than 2 volts. Following this, the needle trocar was removed and a syringe containing 1% lidocaine was attached. At each level, after syringe aspiration with no blood return, 0.5 mL of 1% lidocaine was injected to anesthetize the lateral branch and the surrounding tissue. After completion, a lesion was created at that level with a temperature of 80 degrees for 90 seconds.,All injected medications were preservative free. Sterile technique was used throughout the procedure.,ADDITIONAL DETAILS: ,None.,COMPLICATIONS: , None.,DISCUSSION: , Post-procedure vital signs and oximetry were stable. The patient was discharged with instructions to ice the injection site as needed for 15-20 minutes as frequently as twice per hour for the next day and to avoid aggressive activities for 1 day. The patient was told to resume all medications. The patient was told to be in relative rest for 1 day but then could resume all normal activities.,The patient was instructed to seek immediate medical attention for shortness of breath, chest pain, fever, chills, increased pain, weakness, sensory or motor changes, or changes in bowel or bladder function.,Follow up appointment was made at PM&R Spine Clinic in approximately one to two weeks.surgery, sacroiliac joint pain, sacroiliac, teflon coated needle, fluoroscopy, needle placement, radiofrequency ablation, ablation, tissue, lidocaine, needle,", "label": 3}
{"id": 4, "text": "DISCHARGE DIAGNOSES:,1. Chronic obstructive pulmonary disease with acute hypercapnic respiratory failure.,2. Chronic atrial fibrillation with prior ablation done on Coumadin treatment.,3. Mitral stenosis.,4. Remote history of lung cancer with prior resection of the left upper lobe.,5. Anxiety and depression.,HISTORY OF PRESENT ILLNESS:, Details are present in the dictated report.,BRIEF HOSPITAL COURSE:, The patient is a 71-year-old lady who came in with increased shortness of breath of one day duration. She denied history of chest pain or fevers or cough with purulent sputum at that time. She was empirically treated with a course of antibiotics of Avelox for ten days. She also received steroids, prednisolone 60 mg, and breathing treatments with albuterol, Ipratropium and her bronchodilator therapy was also optimized with theophylline. She continued to receive Coumadin for her chronic atrial fibrillation. Her heart rate was controlled and was maintained in the 60s-70s. On the third day of admission she developed worsening respiratory failure with fatigue, and hence was required to be intubated and ventilated. She was put on mechanical ventilation from 1/29 to 2/6/06. She was extubated on 2/6 and put on BI-PAP. The pressures were gradually increased from 10 and 5 to 15 of BI-PAP and 5 of E-PAP with FIO2 of 35% at the time of transfer to Kindred. Her bronchospasm also responded to the aggressive bronchodilation and steroid therapy.,DISCHARGE MEDICATIONS:, Prednisolone 60 mg orally once daily, albuterol 2.5 mg nebulized every 4 hours, Atrovent Respules to be nebulized every 6 hours, Pulmicort 500 micrograms nebulized twice every 8 hours, Coumadin 5 mg orally once daily, magnesium oxide 200 mg orally once daily.,TRANSFER INSTRUCTIONS:, The patient is to be strictly kept on bi-level PAP of 15 I-PAP/E-PAP of 5 cm and FIO2 of 35% for most of the times during the day. She may be put on nasal cannula 2 to 3 liters per minute with an O2 saturation of 90-92% at meal times only, and that is to be limited to 1-2 hours every meal. On admission her potassium had risen slightly to 5.5, and hence her ACE inhibitor had to be discontinued. We may restart it again at a later date once her blood pressure control is better if required.discharge summary, chronic obstructive pulmonary disease, hypercapnic respiratory failure, atrial fibrillation, chronic atrial fibrillation, increased shortness of breath, shortness of breath, increased shortness, coumadin, atrial,", "label": 0}
{"id": 5, "text": "INDICATION:, Coronary artery disease, severe aortic stenosis by echo.,PROCEDURE PERFORMED:,1. Left heart catheterization.,2. Right heart catheterization.,3. Selective coronary angiography.,PROCEDURE: , The patient was explained about all the risks, benefits and alternatives to the procedure. The patient agreed to proceed and informed consent was signed.,Both groins were prepped and draped in usual sterile fashion. After local anesthesia with 2% lidocaine, 6-French sheath was inserted in the right femoral artery and 7-French sheath was inserted in the right femoral vein. Then right heart cath was performed using 7-French Swan-Ganz catheter. Catheter was placed in the pulmonary capillary wedge position. Pulmonary capillary wedge pressure, PA pressure was obtained, cardiac output was obtained, then RV, RA pressures were obtained. The right heart catheter _______ pulled out. Then selective coronary angiography was performed using 6-French JL4 and 6-French 3DRC catheter. Then attempt was made to cross the aortic valve with 6-French pigtail catheter, but it was unsuccessful. After the procedure, catheters were pulled out, sheath was pulled out and hemostasis was obtained by manual pressure. The patient tolerated the procedure well. There were no complications.,HEMODYNAMICS:,1. Cardiac output was 4.9 per liter per minute. Pulmonary capillary wedge pressure, mean was 7, PA pressure was 20/14, RV 26/5, RA mean pressure was 5.,2. Coronary angiography, left main is calcified _______ dense complex.,3. LAD proximal 70% calcified stenosis present and patent stent to the mid LAD and diagonal 1 is a moderate-size vessel, has 70% stenosis. Left circumflex has diffuse luminal irregularities. OM1 has 70% stenosis, is a moderate-size vessel. Right coronary is dominant and has minimal luminal irregularities.,SUMMARY: , Three-vessel coronary artery disease with aortic stenosis by echo with normal pulmonary artery systolic pressure.,RECOMMENDATION: , Aortic valve replacement with coronary artery bypass surgery.cardiovascular / pulmonary, lad proximal, femoral artery, sheath, catheter, selective coronary angiography, coronary artery disease, pulmonary capillary wedge, capillary wedge, coronary angiography, coronary artery, heart catheterization, catheterization, heart, artery, stenosis, angiography, pressure, coronary", "label": 2}
{"id": 6, "text": "SUBJECTIVE:, The patient is a 2-year-old little girl who comes in with concerns about stuffiness, congestion and nasal drainage. She does take Zyrtec on a fairly regular basis. Mom is having some allergy trouble herself right now. She does not know her colors. She knows some of her shapes. She speaks in sentences. She is not showing much interest in the potty. She is in the 80th percentile for height and weight, and still over 95th percentile for head circumference. Mom has no other concerns.,ALLERGIES:, Eggs and peanuts.,OBJECTIVE:,General: Alert, very talkative little girl.,HEENT: TMs clear and mobile. Eyes: PERRL. Fundi benign. Pharynx clear. Mouth moist. Nasal mucosa is pale with clear discharge.,Neck: Supple without adenopathy.,Heart: Regular rate and rhythm without murmur.,Lungs: Clear. No tachypnea, wheezing, rales or retractions.,Abdomen: Soft and nontender without mass or organomegaly.,GU: Normal female genitalia. Tanner stage I.,Extremities: No clubbing, cyanosis or edema. Pulses 2+ and equal.,Hips: Intact.,Neurological: Normal. DTRs are 2+. Gait was normal.,Skin: Warm and dry. No rashes noted.,ASSESSMENT:, Allergic rhinitis. Otherwise healthy 2-year-old young lady.,PLAN:, In addition to her Zyrtec, I put her on Nasonex spray one spray each nostril daily. If this works for her, certainly she can do it through the ragweed season. Otherwise she is doing well. I talked about ways to improve her potty training. She is a very good eater. I will see her yearly or p.r.n. Unfortunately she is not able to get the flu shot due to her egg allergy.consult - history and phy., allergic rhinitis, nasal drainage, stuffiness, congestion, drainage,", "label": 0}
{"id": 7, "text": "REASON FOR EVALUATION: , The patient is a 37-year-old white single male admitted to the hospital through the emergency room. I had seen him the day before in my office and recommended him to go into the hospital. He had just come from a trip to Taho in Nevada and he became homicidal while there. He started having thoughts about killing his mother. He became quite frightened by that thought and called me during the weekend we were able to see him on that Tuesday after talking to him.,HISTORY OF PRESENT ILLNESS: , This is a patient that has been suffering from a chronic psychotic condition now for a number of years. He began to have symptoms when he was approximately 18 or 19 with auditory and visual hallucinations and paranoid delusions. He was using drugs and smoking marijuana at that time has experimenting with LXV and another drugs too. The patient has not used any drugs since age 25. However, he has continued having intense and frequent psychotic bouts. I have seen him now for approximately one year. He has been quite refractory to treatment. We tried different types of combination of medications, which have included Clozaril, Risperdal, lithium, and Depakote with partial response and usually temporary. The patient has had starting with probably has had some temporary relief of the symptoms and they usually do not last more than a few days. The dosages that we have used have been very high. He has been on Clozaril 1200 mg combined with Risperdal up to 9 mg and lithium at a therapeutic level. However, he has not responded.,He has delusions of antichrist. He strongly believes that the dogs have a home in the neighborhood are communicating with him and criticizing him and he believes that all the people can communicate to him with telepathy including the animals. He has paranoid delusions. He also gets homicidal like prior to this admission.,PAST PSYCHIATRIC HISTORY:, As mentioned before, this patient has been psychotic off and on for about 20 years now. He has had years in which he did better on Clozaril and also his other medications.,With typical anti-psychotics, he has done well at times, but he eventually gets another psychotic bout.,PAST MEDICAL HISTORY: , He has a history of obesity and also of diabetes mellitus. However, most recently, he has not been treated for diabetes since his last regular weight since he stopped taking Zyprexa. The patient has chronic bronchitis. He smokes cigarettes constantly up to 60 a day.,DRUG HISTORY:, He stopped using drugs when he was 25. He has got a lapse, but he was more than 10 years and he has been clean ever since then. As mentioned before, he smokes cigarettes quite heavily and which has been a problem for his health since he also has chronic bronchitis.,PSYCHOSOCIAL STATUS: , The patient lives with his mother and has been staying with her for a few years now. We have talked to her. She is very supportive. His only sister is also very supportive of him. He has lived in the ABCD houses in the past. He has done poorly in some of them.,MENTAL STATUS EXAMINATION:, The patient appeared alert, oriented to time, place, and person. His affect is flat. He talked about auditory hallucinations, which are equivocal in nature. He is not homicidal in the hospital as he was when he was at home. His voice and speech are normal. He believes in telepathy. His memory appears intact and his intelligence is calculated as average.,INITIAL DIAGNOSES:,AXIS I: Schizophrenia.,AXIS II: Deferred.,AXIS III: History of diabetes mellitus, obesity, and chronic bronchitis.,AXIS IV: Moderate.,AXIS V: GAF of 35 on admission.,INITIAL TREATMENT AND PLAN:, Since, the patient has been on high dosages of medications, we will give him a holiday and a structured environment. We will put him on benzodiazepines and make a decision anti-psychotic later. We will make sure that he is safe and that he addresses his medical needs well.consult - history and phy., neuropsychological, gaf, schizophrenia, anti-psychotic, chronic psychotic condition, delusions, hallucination, homicidal, marijuana, psychological, psychotic, smokes cigarettes, smoking, neuropsychological evaluation, clozaril, bronchitis, axis, ", "label": 0}
{"id": 8, "text": "CC:, Progressive visual loss.,HX:, 76 y/o male suddenly became anosmic following shoulder surgery 13 years prior to this presentation. He continues to be anosmic, but has also recently noted decreased vision OD. He denies any headaches, weakness, numbness, weight loss, or nasal discharge.,MEDS:, none.,PMH:, 1) Diabetes Mellitus dx 1 year ago. 2) Benign Prostatic Hypertrophy, s/p TURP. 3) Right shoulder surgery (?DJD).,FHX:, noncontributory.,SHX:, Denies history of Tobacco/ETOH/illicit drug use.,EXAM:, BP132/66 HR78 RR16 36.0C,MS: A&O to person, place, and time. No other specifics given in Neurosurgery/Otolaryngology/Neuro-ophthalmology notes.,CN: Visual acuity has declined from 20/40 to 20/400, OD; 20/30, OS. No RAPD. EOM was full and smooth and without nystagmus. Goldmann visual fields revealed a central scotoma and enlarged blind spot OD and OS (OD worse) with a normal periphery. Intraocular pressures were 15/14 (OD/OS). There was moderate pallor of the disc, OD. Facial sensation was decreased on the right side (V1 distribution).,Motor/Sensory/Coord/Station/Gait: were all unremarkable.,Reflexes: 2/2 and symmetric throughout. Plantars were flexor, bilaterally.,Gen Exam: unremarkable.,COURSE:, MRI Brain, 10/7/92, revealed: a large 6x5x6cm slightly heterogeneous, mostly isointense lesion on both T1 and T2 weighted images arising from the planum sphenoidale and olfactory groove. The mass extends approximately 3.6cm superior to the planum into both frontal regions with edema in both frontal lobes. The mass extends 2.5cm inferiorly involving the ethmoid sinuses with resultant obstruction of the sphenoid and frontal sinuses.,It also extends into the superomedial aspect of the right maxillary sinus. There is probable partial encasement of both internal carotid arteries just above the siphon. The optic nerves are difficult to visualize but there is also probable encasement of these structures as well. The mass enhances significantly with gadolinium contrast. These finds are consistent with Meningioma.,The patient underwent excision of this tumor by simultaneous bifrontal craniotomy and lateral rhinotomy following an intrasinus biopsy which confirmed the meningioma. Postoperatively, he lost visual acuity, OS, but this gradually returned to baseline. His 9/6/96 neuro-ophthalmology evaluation revealed visual acuity of 20/25-3 (OD) and 20/80-2 (OS). His visual fields continued to abnormal, but improved and stable when compared to 10/92. His anosmia never resolved.radiology, mri brain, olfactory, groove, headaches, meningioma, nasal discharge, numbness, visual loss, weakness, weight loss, visual acuity, mri, brain, isointense, sinuses, visual, ", "label": 0}
{"id": 9, "text": "The patient was told that the injection may cause more pain for two to three days afterwards and if this occurred they would best be served by icing the area 15-20 minutes every 6 hours. The patient was advised to protect the knee by limiting repetitive bending, squatting , kneeling and excessive heavy use for a week. Also, they were asked to follow up in two weeks p.r.n.pain management, knee injection, hibistat, xylocaine, bending, epinephrine, knee joint, kneeling, needle, patella, squatting, superolateral approach, cleansed, kneeNOTE,: Thesetranscribed medical transcription sample reports and examples are provided by various users andare for reference purpose only. MTHelpLine does not certify accuracy and quality of sample reports.These transcribed medical transcription sample reports may include some uncommon or unusual formats;this would be due to the preference of the dictating physician. All names and dates have beenchanged (or removed) to keep confidentiality. Any resemblance of any type of name or date orplace or anything else to real world is purely incidental.", "label": 2}
{"date_time": "2022-09-08 22:49:09+00:00", "username": "Deejayrayman", "user_location": "Texas", "user_description": "Father of 3. Follower of Christ. Lover of all things tech. Photography & DJ enthusiast. But most importantly I am forgiven! Jer. 29:11 Carpe diem.", "verified": false, "followers_count": 48, "following_count": 153, "tweet_like_count": 0, "tweet_retweet_count": 0, "tweet_reply_count": 0, "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", "tweet_text": "@TMobile @TMobileHelp will you be able to order the iPhone 14 Pro online tomorrow? Or phone only?"}
{"date_time": "2022-09-08 22:48:54+00:00", "username": "TheGalox_", "user_location": "Hello!", "user_description": "The latest Tech, Aviation, Gaming and Car news all in one place!", "verified": false, "followers_count": 30309, "following_count": 193, "tweet_like_count": 3, "tweet_retweet_count": 0, "tweet_reply_count": 0, "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>", "tweet_text": "China's four major carriers do not support the US version of the iPhone 14 series because they don't support eSIM https://t.co/yy5ut1BEBA"}
{"task": "2165b184_lcome_to_Chester_National_Bank__s_Chester_National_Bank_share_", "input": "For joint marketing with other financial companies [Can you limit this sharing?] No", "output": "No", "options": [["Y", "e", "s"], ["N", "o"]], "pageTitle": "Welcome to Chester National Bank", "outputColName": "Does Chester National Bank share?", "url": "http://www.chesternationalbank.com/privacy.htm", "wdcFile": "39/1438043062723.96_20150728002422-00178-ip-10-236-191-2_348445319_7.json"}
{"task": "2165b184_lcome_to_Chester_National_Bank__s_Chester_National_Bank_share_", "input": "For our affiliates to market to you [Can you limit this sharing?] Yes", "output": "No", "options": [["Y", "e", "s"], ["N", "o"]], "pageTitle": "Welcome to Chester National Bank", "outputColName": "Does Chester National Bank share?", "url": "http://www.chesternationalbank.com/privacy.htm", "wdcFile": "39/1438043062723.96_20150728002422-00178-ip-10-236-191-2_348445319_7.json"}
{"task": "2165b184_lcome_to_Chester_National_Bank__s_Chester_National_Bank_share_", "input": "For nonaffiliates to market to you [Can you limit this sharing?] Yes", "output": "No", "options": [["Y", "e", "s"], ["N", "o"]], "pageTitle": "Welcome to Chester National Bank", "outputColName": "Does Chester National Bank share?", "url": "http://www.chesternationalbank.com/privacy.htm", "wdcFile": "39/1438043062723.96_20150728002422-00178-ip-10-236-191-2_348445319_7.json"}
{"task": "5d49281d_Privacy_Policy__Mid_Cities_Credit_Union_share_", "input": "For joint marketing with other financial companies [Can you limit this sharing?] No", "output": "Yes", "options": [["Y", "e", "s"], ["N", "o"]], "pageTitle": "Privacy Policy", "outputColName": "Does Mid Cities Credit Union share?", "url": "https://midcitiescu.org/privacy", "wdcFile": "39/1438042989126.22_20150728002309-00175-ip-10-236-191-2_887342889_1.json"}
{"token": "demi grand axe", "frequency": 28562}
{"token": "grand axe ua", "frequency": 15333}
{"token": "wide field infrared", "frequency": 14192}
{"feat_Unnamed: 0": 30, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: The diminishing supply of this nonrenewable resource is not leading to advancements in automotive technology\nA. petrol\nB. steam\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -3.8320364952087402, -13.549420356750488, -3.445493221282959, -0.037799470126628876, -7.947388172149658, -5.257794380187988, -0.2113477736711502, -5.2689116273541003e-05, -0.0015486401971429586, -0.2187063843011856, -1.2177703380584717, -4.50150728225708, -6.815438270568848, -0.11370402574539185, -13.5460786819458, -0.09770593047142029, -9.35024356842041, -0.8646656274795532, -5.4704270362854, -4.617382526397705, -0.2142331749200821, -8.690889358520508, -0.6373406052589417, -0.004871760495007038, -0.0016386188799515367, -6.056154727935791, -0.19977383315563202, -10.856172561645508, -0.027138561010360718, -1.4274587631225586, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 122, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: Lamps that convert electricity into light and heat aren't known as\nA. candle\nB. incadescent\nAnswer:", "classes": [" A", " B"], "target": 0, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -3.8320364952087402, -13.549420356750488, -3.445493221282959, -0.037799470126628876, -7.947388172149658, -5.257794380187988, -0.2113477736711502, -5.2689116273541003e-05, -0.0015486401971429586, -0.2187063843011856, -1.2177703380584717, -4.50150728225708, -6.815438270568848, -0.11370402574539185, -13.5460786819458, -0.09770593047142029, -9.35024356842041, -0.8646656274795532, -5.4704270362854, -4.617382526397705, -0.2142331749200821, -8.690889358520508, -0.6373406052589417, -0.004871760495007038, -0.0016386188799515367, -6.056154727935791, -0.19977383315563202, -10.856172561645508, -0.027138561010360718, -1.3649511337280273, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 120, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: Which is not needed for photosynthesis to occur\nA. energy that takes 8.3 minutes to travel to Earth\nB. the 8th entry on the periodic table\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -7.546529293060303, -5.685612678527832, -3.549483299255371, -9.080159187316895, -0.8948298692703247, -0.7963760495185852, -0.37646088004112244, -3.027893543243408, -1.7919189929962158, -6.76089334487915, -0.4557627737522125, -6.06879997253418, -0.9453337788581848, -3.0141043663024902, -3.7026994228363037, -0.3114982843399048, -6.890157699584961, -2.8918871879577637, -0.010407225228846073, -0.0011308948742225766, -1.6013734340667725, -9.242892265319824, -0.10964515805244446, -0.417575865983963, -9.93819522857666, -0.022598478943109512, -1.7203764915466309, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 147, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: A creature that is not a biped and which regularly uses tools will occasionally enjoy munching on\nA. chia seeds\nB. old feces\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -7.546529293060303, -5.685612678527832, -3.549483299255371, -9.080159187316895, -0.8948298692703247, -0.7963760495185852, -0.37646088004112244, -3.027893543243408, -1.7919189929962158, -6.76089334487915, -0.4557627737522125, -6.06879997253418, -0.9453337788581848, -3.0141043663024902, -3.7026994228363037, -0.3114982843399048, -6.890157699584961, -2.8918871879577637, -0.010407225228846073, -0.0011308948742225766, -1.6013734340667725, -9.242892265319824, -0.10964515805244446, -0.417575865983963, -9.93819522857666, -0.022598478943109512, -1.399075984954834, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 87, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: One way to retain your own thermal energy is not to\nA. wear fluffy socks\nB. sit in snow\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -2.7594923973083496, -1.833573818206787, -2.9184155464172363, -6.975120544433594, -1.2151885032653809, -6.081847190856934, -0.015398895367980003, -3.1413230895996094, -0.46213391423225403, -5.517919540405273, -3.1235716342926025, -0.3013315498828888, -4.55611515045166, -6.346986293792725, -7.74485969543457, -5.8245320320129395, -2.7058539390563965, -1.9804006814956665, -2.231118679046631, -0.10899948328733444, -1.6776539087295532, -3.370371103286743, -2.48840069770813, -1.461798906326294, -0.01421081367880106, -0.0015662556979805231, -2.594835042953491, -6.609663009643555, -4.824169158935547, -10.974448204040527, -1.2111760377883911, -0.30911505222320557, -0.19739429652690887, -0.00662476010620594, -0.28783032298088074, -8.508321762084961, -0.039803601801395416, -1.4904612302780151, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 158, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: An extremely rapid surge of rising flood water that moves across usually dry land at about 30 feet or more each second is not powerful enough to\nA. lift and carry a tall mountain\nB. lift a 250-ton object off the ground\nAnswer:", "classes": [" A", " B"], "target": 0, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -2.7594923973083496, -1.833573818206787, -2.9184155464172363, -6.975120544433594, -1.2151885032653809, -6.081847190856934, -0.015398895367980003, -3.1413230895996094, -0.46213391423225403, -5.517919540405273, -3.1235716342926025, -0.3013315498828888, -4.55611515045166, -6.346986293792725, -7.74485969543457, -5.8245320320129395, -2.7058539390563965, -1.9804006814956665, -2.231118679046631, -0.10899948328733444, -1.6776539087295532, -3.370371103286743, -2.48840069770813, -1.461798906326294, -0.01421081367880106, -0.0015662556979805231, -2.594835042953491, -6.609663009643555, -4.824169158935547, -10.974448204040527, -1.2111760377883911, -0.30911505222320557, -0.19739429652690887, -0.00662476010620594, -0.28783032298088074, -8.508321762084961, -0.039803601801395416, -1.308771014213562, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 149, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: A thing's position is not altered when\nA. thing feels moved emotionally\nB. the thing adjusts its location\nAnswer:", "classes": [" A", " B"], "target": 0, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -2.984931468963623, -9.228616714477539, -1.887966513633728, -1.249636173248291, -3.1157636642456055, -1.393967866897583, -6.433497905731201, -0.001007526065222919, -3.6101529598236084, -4.776247978210449, -8.141153335571289, -2.7415831089019775, -3.007847785949707, -3.4533371925354004, -5.134883880615234, -8.740917205810547, -7.832932949066162, -0.21149589121341705, -0.005934475921094418, -0.19680102169513702, -5.9368181228637695, -4.564757347106934, -0.5761467218399048, -7.6558308601379395, -3.5606627464294434, -0.30452367663383484, -0.5608313083648682, -0.008637686260044575, -0.001042656716890633, -7.3213701248168945, -9.664186477661133, -0.06399304419755936, -10.072819709777832, -0.026249587535858154, -1.362160563468933, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 176, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: A pot of pasta is boiling on the stove, and the lid on top of the pot is shaking as the water boils more rapidly. A person goes to the stove and removes the pot, releasing steam into the air above, and so the steam is not\nA. water vapor\nB. cold air\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -2.984931468963623, -9.228616714477539, -1.887966513633728, -1.249636173248291, -3.1157636642456055, -1.393967866897583, -6.433497905731201, -0.001007526065222919, -3.6101529598236084, -4.776247978210449, -8.141153335571289, -2.7415831089019775, -3.007847785949707, -3.4533371925354004, -5.134883880615234, -8.740917205810547, -7.832932949066162, -0.21149589121341705, -0.005934475921094418, -0.19680102169513702, -5.9368181228637695, -4.564757347106934, -0.5761467218399048, -7.6558308601379395, -3.5606627464294434, -0.30452367663383484, -0.5608313083648682, -0.008637686260044575, -0.001042656716890633, -7.3213701248168945, -9.664186477661133, -0.06399304419755936, -10.072819709777832, -0.026249587535858154, -1.0725163221359253, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 255, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: A plant that gets extra minerals such as zinc aren't probably\nA. placed in good soil\nB. made out of soil\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -5.648952960968018, -3.9220056533813477, -0.3784838914871216, -8.719961166381836, -3.3013322353363037, -4.103150367736816, -9.866247177124023, -0.2978246808052063, -0.37684327363967896, -6.227013111114502, -0.05748108774423599, -4.279689788818359, -5.351686477661133, -0.33962324261665344, -3.7595343589782715, -8.755351066589355, -3.4850516319274902, -1.3135008811950684, -0.0042716688476502895, -0.0006755692302249372, -4.240409851074219, -1.016162395477295, -6.68571138381958, -0.7649861574172974, -11.296207427978516, -0.02335340902209282, -2.123838424682617, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"feat_Unnamed: 0": 174, "text": "The following are multiple choice questions (with answers) about common sense.\n\nQuestion: Which isn't more likely the result of a big earthquake\nA. a big house\nB. a mountain\nAnswer:", "classes": [" A", " B"], "target": 0, "evaluation_predictions": [-3.4291396141052246, -6.448093414306641, -3.0980453491210938, -9.417852401733398, -2.395113945007324, -0.18490242958068848, -4.3374528884887695, -2.4998297691345215, -3.015044689178467, -0.3819268047809601, -2.6656839847564697, -6.166228294372559, -4.64093017578125, -1.3252134323120117, -1.4938381910324097, -0.418433278799057, -4.4523162841796875, -2.0930585861206055, -5.648952960968018, -3.9220056533813477, -0.3784838914871216, -8.719961166381836, -3.3013322353363037, -4.103150367736816, -9.866247177124023, -0.2978246808052063, -0.37684327363967896, -6.227013111114502, -0.05748108774423599, -4.279689788818359, -5.351686477661133, -0.33962324261665344, -3.7595343589782715, -8.755351066589355, -3.4850516319274902, -1.3135008811950684, -0.0042716688476502895, -0.0006755692302249372, -4.240409851074219, -1.016162395477295, -6.68571138381958, -0.7649861574172974, -11.296207427978516, -0.02335340902209282, -1.0872783660888672, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"Unnamed: 0": 0, "text": "Dr. Seuss would sure be mad right now if he was alive. Cat in the Hat proves to show how movie productions can take a classic story and turn it into a mindless pile of goop. We have Mike Myers as the infamous Cat in the Hat, big mistake! Myers proves he can't act in this film. He acts like a prissy show girl with a thousand tricks up his sleeve. The kids in this movie are all right, somewhere in between the lines of dull and annoying. The story is just like the original with a couple of tweaks and like most movies based on other stories, never tweak with the original story! Bringing in the evil neighbor Quin was a bad idea. He is a stupid villain that would never get anywhere in life.This movie is like a rejected comic strip from the newspaper if you think about it. The film sure does look tacky! Sure there are a funny adult jokes like where the cat cuts of his tail and the censor goes off before he says a naughty word, mildly funny. At least the Grinch had spunk, and the film was actually good! This film is a cartoonish piece of snot with bright colors and bad mediocre acting. Was Mike Myers even in this movie actually? And another thing, the fish. What is with that stupid fish! First time you see him, he's an actual fish. Next time you see him, he's all animated and talking. But he looks like an animated piece of rubber play dough! This film is a total off target wreck. Good joke, bad joke, bad, bad, bad, good joke! I'm surprised it even had good jokes like the water park ride joke, that was good. So please if you have the choice, watch the Grinch instead of this mess.", "id": 0, "label": 0}
{"Unnamed: 0": 1, "text": "Boy what a dud this mess was.But it only lasts an hour and I only paid a buck for it so I'll live....unlike the entire cast of this 1933 clunker who are all dust by now.So anyway a small village starts having bodies turning up that have been drained of all their blood.The local yokels start talking about vampires ,of course,and a little more loudly after each body is found.The town sheriff or constable or whatever he is,played by awesome actor Melvyn Douglas,tries to tell them otherwise.When he mentions the fact that the dead have one large hole on each side of the neck,instead of two holes close together, the locals simply then say it's a giant vampire bat.The constable insists that vampires do not exist and it must be a human culprit doing the killings.But Melvyn doesn't seem too bothered either way.He spends most of his time trying to get into the pantaloons of his sweetie,played by Faye Wray.Also in this mix is the town simpleton,played by Dwight Frye,who always seemed to have played the same role in every movie he did.He further freaks out the townspeople by catching bats and drinking his own blood.Lionel Atwill plays the town doctor who seemingly is trying to help the constable solve the crimes.And boy does he ever stink as an actor.Atwill is as close to cardboard in this role as he could get.And Lionel Barrymore is also in this thing....lots of big names to be such a pile of guano.Other than the terrible mis-title this movie has,the alternate name,\"The Blood Sucker\" is much better,this movie is also dull and plodding and just silly.For me the high point of the movie is watching Frye,he nails the freaky town weirdo but other than him this movie didn't offer much.And then when you find out the reason for the strange deaths and see the special effect thing that required all this blood you'll really be let down.Bela Lugosi did a lot of awful pictures but at least he was fun and interesting to watch.Think of this movie as a really bad Lugosi clunker WITHOUT Lugosi and you'll get a feel for how miserably bad this mess was.If you can't make a good 1930's horror film at least put Lugosi in it.", "id": 1, "label": 0}
{"Unnamed: 0": 2, "text": "The episodic version of Robert Heinlein's Starship Troopers plays out at a deathly slow pace, following Johnny Rico leaving his parents, the (not very attractive) girl he lusts for, and joining the mobile infantry. The aliens in the show are nothing like the barbaric bugs from the film, instead being squid-like monsters that shoot lasers out of their mouths.Throughout watching this version, I was continually amazed at just how fruity they've managed to make the whole thing. The show is concerned mostly with the relationships between the recruits, and the aching, prolonged gazes they give each other through their battle armour visors, with 80s synth pop sometimes arriving *during* the sparse battle sequences which at last turning up in the final few episodes. In terms of construction, it owes a debt to Top Gun, sharing much in terms of pacing and content (and all that implies).", "id": 2, "label": 0}
{"Unnamed: 0": 3, "text": "It's such a shame that because of it's title this film will be avoided by people who hate football. Bend it Like Beckham is much more than a cheesy sports flick. The story line is touching and intelligent without being soppy, the jokes were laugh out loud funny, and the characters are well acted. Parminder Nagra and Keira Knightley are brilliant as teenagers Jess and Jules, putting in great performances both on and off the pitch. Anupam Kher is wonderful as Jess' worried father, and Jonathan Rhys-Meyers, who was so amazingly evil in 'Ride with the Devil,' comes across so well as the nice guy for once, making full use of his gorgeous Irish accent! Even if you don't like football, go see this film. If anything it'll make you smile.", "id": 3, "label": 1}
{"Unnamed: 0": 4, "text": "I thought this film was just about perfect. The descriptions/summaries you'll read about this movie don't do it justice. The plot just does not sound very interesting, BUT IT IS. Just rent it and you will not be sorry!!", "id": 4, "label": 1}
{"Unnamed: 0": 5, "text": "Okay the promos promised a comedy and people(few) went to watch it Being the first release of 2006 is not a bad thing, or for that matter of any year, because the first and last films mostly flop except GHAJINI and some moreOkay coming to JAWANI DIWANIReview in short The film is about Emraan Hashmi doing his usual stuff sadly it's annoying this time after repetitions It has an irritating Hrishita Bhatt and a flop Celina JaitleyCringeworthy dialogues, comedy scenes and badly handled drama and lots of loopholesDirection is bad Emraan Hashmi is annoying here, luckily now he is coming of age But post FOOTPATH and MURDER and some decent work in some more films the actor in him took a backseat and directors focused on his kisses and womaniser image which sadly lost it's touch after repetitions Hrishita and Celina are bad Mahesh is horrible", "id": 5, "label": 0}
{"Unnamed: 0": 6, "text": "It's a testament to Gosha's incredible film-making prowess that he was able to complete both Hitokiri and his stunning masterpiece, Goyokin, in the same year, 1969. And it's a testament to how criminally underrated he remains for the general public (compared to media darlings like the great Akira Kurosawa), that both Hitokiri and Goyokin have received less than 500 votes between the two of them.Shintaro Katsu is Okada Izo: mad dog killer, loyal to the Tosha clan and their boss Takechi, played by another genre stalwart, Tatsuya Nakadai. The Tosha clan was part of a larger alliance that supported the Emperor against the flailing Shogunate. The historical backdrop is fairly accurate - with Japan's increasing political turmoil between imperialists and the Tokugawa and the pressure by the West to end a 300 year social and political seclusion. It helps a lot to know a thing or two about Japanese history and what eventually led to the Meiji Restoration and the abolition of the Tokugawa Shogunate, but it's not essential by any means. The movie was made primarily for a Japanese audience so certain things are taken for granted but it flows very well for the uninitiated as well.As one would expect from a Hideo Gosha film in his golden years (the late 60's) the visual palette is breathtaking, the use of external and internal symbolism hiding behind pictorial beauty. Style however is never decorative for Gosha - it is always employed in the service of story. And speaking of story, Hitokiri is dominated both literally and figuratively by the tortured main character Izo Okada. As most chambara protagonists, Izo finds himself in a moral double-bind, torn between giri (obligation) and ninjo (natural impulse) - although it takes a while for him to realize what exactly his giri is. In the first half of the movie Izo is trying for social self-advancement. Lofty aspirations of social rank and marriage with an aristocrat's daughter - a great progression for someone coming from a farmer's background in the rigid social caste system of 19th century Japan. The turning point for Izo is when he realizes at what cost self-advancement comes, the loss of identity and by consequence the loss of self. It is at that point that he undergoes a very symbolic transformation from a famous swordsman of the Tosha Clan to a \"nameless\" drifter without past or future, Torazo the Vagrant. Although not technically nameless and not a genre drifter in Yojimbo's mold, it is the loss of his former self and the cast off of ego, ambition and self-dillusion that allows Izo to see things as they really are and redeem himself. Hitokiri ends (which I won't reveal here) in the best way any story can end: both positive and negative with a deeply ironic twist that gives Izo the last laugh, a last sardonic remark in the face of death.", "id": 6, "label": 1}
{"Unnamed: 0": 7, "text": "Serious HOME ALONE/KARATE KID knock off with enough bad character stereotypes to have the writer sued and then shot. You could see blatant stunt man usage in almost every scene. Oh, and the acting sucks too. Although I must say that the line: \"Sorry, dude, I have to take a major dump big time\" made me laugh my ass off.", "id": 7, "label": 0}
{"Unnamed: 0": 9, "text": "There are no spoilers here... Because there is no plot to spoil. Madchen Amick is living proof a face can make a living acting-- no talent required. The only bright spot are a few really good one-liners delivered very nicely by Alice Krige, but then again, she IS Alice Krige. Her soft dreamy voice gives the only hint at just how seductively dangerous these odd creatures can be. She is believably creepy in this otherwise unbelievable plot. How they got her to agree to this project remains a mystery. The screenplay writers must have been medicated when they submitted this script. It has major continuity problems, superficial stereotypical characters, horror formula writing, and simply falls short of making any sense what-so-ever. The creatures, while they have neat skills like going \"dim\", the question of where they come from and what they are is never so much explored. Don't waste any time on this one.", "id": 9, "label": 0}
{"URL": "https://i.ebayimg.com/thumbs/images/g/U-0AAOSwsZJaV5dT/s-l225.jpg", "TEXT": "RICKIE FREEMAN FOR TERI JON Crepe 3/4 Sleeve Peplum Sheath Dress Size 18", "WIDTH": 114, "HEIGHT": 225, "similarity": 0.32746464014053345, "hash": -5234848107577475789, "punsafe": 0.0025808215141296387, "pwatermark": 0.19487164914608002}
{"URL": "https://pp.userapi.com/c840136/u112942/video/m_43fc01fc.jpg", "TEXT": "Van Halen - Atomic Punk guitar cover - Neogeofanatic", "WIDTH": 160, "HEIGHT": 120, "similarity": 0.3179418444633484, "hash": 1697207312268378074, "punsafe": 0.04734879732131958, "pwatermark": 0.431315541267395}
{"URL": "https://rioclaroonline.com.br/wp-content/uploads/2017/01/mara-depilacao-rio-claro-sp.png", "TEXT": "mara-depilacao-rio-claro-sp", "WIDTH": 842, "HEIGHT": 562, "similarity": 0.2651453912258148, "hash": -5665874341640767511, "punsafe": 0.03643086552619934, "pwatermark": 0.5230225324630737}
{"URL": "https://esdownload.de/468-large_default/microsoft-office-2019-standard.jpg", "TEXT": "Microsoft Office 2019 Standard", "WIDTH": 382, "HEIGHT": 382, "similarity": 0.31129878759384155, "hash": -3368819313294000058, "punsafe": 0.0001379549503326416, "pwatermark": 0.08910685777664185}
{"URL": "https://cdna.lystit.com/200/250/tr/photos/saksoff5th/f89c907c/y-3-Black-Mens-Wool-blend-Shorts-Black-Size-Xl.jpeg", "TEXT": "Y-3 Men's Wool-blend Shorts - Black - Size L", "WIDTH": 200, "HEIGHT": 250, "similarity": 0.29913657903671265, "hash": -8871845687828356327, "punsafe": 0.00011761378846131265, "pwatermark": 0.2120700180530548}
{"URL": "https://www.ctvnews.ca/polopoly_fs/1.4217761.1544784466!/httpImage/image.jpg_gen/derivatives/landscape_960/image.jpg", "TEXT": "U.S.-Mexico border", "WIDTH": 960, "HEIGHT": 539, "similarity": 0.30494871735572815, "hash": 7358134702430121470, "punsafe": 7.434692815877497e-05, "pwatermark": 0.17750957608222961}
{"texts": ["Can I see pictures of a pre-owned item?", "\n\nWe understand that condition is extremely important when purchasing a pre-owned item. ", "Our figures are given a star rating which you can see below. ", "However, other items such as games may not have a condition rating. ", "In general, Japanese pre-owned products are in very good condition. ", "We also hand select the pre-owned items we sell. ", "If you'd like pictures of any pre-owned item, we can send pictures of the pre-owned item, but not before you purchase the item. ", "We apologize for the inconvenience this may cause, but we can only send pictures of a used item after you purchase it. ", "If you're unhappy with the condition, we can of course issue you a full refund.", "\n\nSolaris Japan uses the following system to rate the condition of pre-owned items:\n\n5 Star Rating: Near mint condition with little to no signs of usage4 Star Rating: Very good condition with minor signs of usage3 Star Rating: Good condition with some signs of usage2 Star Rating: Average condition with several signs of usage or damage1 Star Rating: Very used condition with obvious signs of usage or damage\n\nAll pre-owned items come complete with accessories and in box.", "Please note that any pre-order or initial release bonuses are usually not included.", "\n\nDLC codes included with pre-owned games are not guaranteed to be valid."], "meta": {"pile_set_name": "Pile-CC"}, "scores": [0.0007251707720570266, 0.0005906375008635223, 0.0005937707028351724, 0.0006526768556796014, 0.0006162349018268287, 0.0006321793771348894, 0.0005801176885142922, 0.0006354673532769084, 0.0012240472715348005, 0.0006371113704517484, 0.0005692368722520769, 0.0007002578349784017], "avg_score": 0.0006797423751171058, "num_sents": 12}
{"texts": ["Q:\n\nCan I trade in off-hours and if not what does the graph shows in that case?", "\n\nI new to trading and I would like to know why the graph of the stock after closing still follows a path up and down and why it is not a straight line.", "\nCan I trade using on the weekend using the gray graph shown?", "\nIs there any significance of this path/graph in the after hours? ", " Does it affect anything or offer\nanything valuable that I can use to some advantage?", "\n\nA:\n\nIn the US, pre-market trading is from 4 a.m. to 9:30 a.m. EST and after-hours trading is from 4 p.m. to 8 p.m. on weekdays. ", " Some collectively call both after hours trading.", "\nSome brokers do not offer after hours trading. ", " For those that do, it often requires that you get approval to do so, usually just a formality.", "\nAfter hours trading tends to be more volatile with larger bid/ask spreads due to illiquidity. ", " You need to be quick thinking and decisive because price can turn on a dime.", "\n\n"], "meta": {"pile_set_name": "StackExchange"}, "scores": [0.0011996603570878506, 0.0006140723708085716, 0.000747247482649982, 0.0006260157679207623, 0.0008478920790366828, 0.0005927839665673673, 0.0005931999767199159, 0.0006160488119348884, 0.0005782443913631141, 0.0006080666789785028, 0.0030284568201750517, 0.0019954426679760218], "avg_score": 0.0010039276142682259, "num_sents": 12}
{"texts": ["Q:\n\ndjango loop through model fields\n\nPossible Duplicate:\nDjango get a model's fields \n\nI have next model: \nclass People(models.", "Model):\n name = models.", "CharField(max_length=100)\n lastname = models.", "CharField(max_length=100)\n\nI want to loop through all items from People table.", "\nIn views.py \n-When I try this one:\n for each in People().objects.all():\n name=each.name\n\nI am getting that error: \nManager isn't accessible via People instances\n\n-When I try this one:\n for each in People():\n name=each.name\n\nI am getting this error:\n'People' object is not iterable\n\nHow can I fix that and how to loop through all items from my People table ? ", "\n\nA:\n\nPeople.objects.all()\nit works on the class not an instance People not People()\n\n"], "meta": {"pile_set_name": "StackExchange"}, "scores": [0.0006837541004642844, 0.0006931451498530805, 0.00066936801886186, 0.0005734165897592902, 0.0006787633174099028, 0.0007071057334542274], "avg_score": 0.0006675921516337743, "num_sents": 6}
{"texts": ["Pipes\n\nDNA Pipe\n\nBox Mods\n\nHookahs\n\nSauce\n\nFEATURED PRODUCTS\n\nFLAVOR\n\nePipeMods has 3 lines of \"sauce\".", "\n\nPipe Sauce is our premiere line featuring fine artificial tobacco blends that are not meant to mimic traditional pipe tobacco's. ", "Instead they are carefully blended to taste like what you would want a good pipe tobacco to be. ", "Steam Sauce is our sweet and savory non-tobacco flavors. ", "WTF is our Dripper line with Max thick VG and is only available in 0,3,6mg strengths.", "\n\nHISTORY\n\nOur Heritage!", "\n\nePipeMods was established in 2010 and has maintained a high standard in quality craftsmanship paired with excellent customer service. ", "We take great pride and care in every product we make and hope that you will do the same in owning one of our uniquely hand crafted mods.", "\n\nWHOLESALE\n\nYes we do wholesale.", "\n\nPlease contact [email protected] to learn more...\n\nAlbert Einstein (Lifetime Member of the Montreal Pipe Smokers Club)\n\n\"I believe that pipe smoking contributes to a somewhat calm and objective judgment in all human affairs,\""], "meta": {"pile_set_name": "Pile-CC"}, "scores": [0.0007628164021298289, 0.0006510429666377604, 0.0007782673346810043, 0.0007924081292003393, 0.4887109398841858, 0.0010709918569773436, 0.0005330027197487652, 0.0006492732791230083, 0.0005967757315374911, 0.0005905741709284484], "avg_score": 0.04951360924751498, "num_sents": 10}
{"texts": ["Q:\n\n\"Too many openfiles\" error with Glassfish on Ubuntu\n\nI am having issues with tuning Glassfish 2.1.1 on Ubuntu 10.04 LTS 64-bit (Amazon EC2). ", " As soon as I change the HTTP Service thread count from the default 5 value to 100, I get the following errors in the server.log. ", "\njava.net.", "SocketException: Too many open files\nOther errors include:\n[#|2011-05-19T15:41:38.034-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=16;_ThreadName=Timer-20;_RequestID=1bd7cd3e-0011-4ebc-95e5-487b96c76b20;|\"DPL8011: autodeployment failure while deploying the application : null\"|#]\n\n[#|2011-05-19T15:41:39.555-0500|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=20;_ThreadName=Timer-1;_RequestID=0d9630b5-2752-4ffb-ac7c-1cf51920155a;|\njava.lang.", "NullPointerException\n at com.sun.jbi.management.system.", "AutoAdminTask.pollAutoDirectory(AutoAdminTask.java:1031)\n at com.sun.jbi.management.system.", "AutoAdminTask.performAutoInstall(AutoAdminTask.java:329)\n at com.sun.jbi.management.system.", "AutoAdminTask.performAutoFunctions(AutoAdminTask.java:288)\n at com.sun.jbi.management.system.", "AdminService.heartBeat(AdminService.java:967)\n at com.sun.jbi.management.system.", "AdminService.handleNotification(AdminService.java:198)\n at com.sun.jmx.interceptor.", "DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)\n at javax.management.", "NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)\n at javax.management.", "NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)\n at javax.management.", "NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)\n at javax.management.", "NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)\n at javax.management.timer.", "Timer.sendNotification(Timer.java:1237)\n at javax.management.timer.", "Timer.notifyAlarmClock(Timer.java:1206)\n at javax.management.timer.", "TimerAlarmClock.run(Timer.java:1289)\n at java.util.", "TimerThread.mainLoop(Timer.java:512)\n at java.util.", "TimerThread.run(Timer.java:462)\n|#]\n\nand \n[#|2011-05-19T16:30:40.228-0500|SEVERE|sun-appserver2.1|org.apache.jasper.servlet.", "JspServlet|_ThreadID=16;_ThreadName=httpWorkerThread-4949-48;_RequestID=63d6908e-cc09-4fa8-aac0-241e7582c42f;|PWC6117: File \"/opt/glassfish-v2.1.1-b31g/lib/install/applications/admingui/adminGUI_war/header.jsp\" not found|#]\n\nand \n[#|2011-05-19T16:30:40.229-0500|SEVERE|sun-appserver2.1|org.apache.jasper.servlet.", "JspServlet|_ThreadID=17;_ThreadName=httpWorkerThread-4949-46;_RequestID=869579eb-887d-4dc4-b0fc-edc4e41755a7;|PWC6117: File \"/opt/glassfish-v2.1.1-b31g/lib/install/applications/admingui/adminGUI_war/homePage.jsp\" not found|#]\n\nGoogling I found the follow resources: \nhttp://felipeferreira.net/?p=873\nhttp://www.netadmintools.com/art295.html\nMy /etc/security/limits.confg has the following configuration. ", "And I have change the tcp settings as noted in http://mariosgaee.blogspot.com/2011/04/glassfish-211-on-linux-performance.html\n* soft nofile 65535\n* hard nofile 65535\n* soft stack unlimited\n* hard stack unlimited\n\n/proc/sys/fs/file-max has a value of 762655 (I did not change this) but I did add to /etc/sysctl.conf as 'fs.file-max = 762655'\nulimit output\n$ ulimit -a\ncore file size (blocks, -c) 0\ndata seg size (kbytes, -d) unlimited\nscheduling priority (-e) 20\nfile size (blocks, -f) unlimited\npending signals (-i) 16382\nmax locked memory (kbytes, -l) 64\nmax memory size (kbytes, -m) unlimited\nopen files (-n) 65535\npipe size (512 bytes, -p) 8\nPOSIX message queues (bytes, -q) 819200\nreal-time priority (-r) 0\nstack size (kbytes, -s) unlimited\ncpu time (seconds, -t) unlimited\nmax user processes (-u) unlimited\nvirtual memory (kbytes, -v) unlimited\nfile locks (-x) unlimited\n\nAny ideas what may be causing this issue? ", " Thanks in advance!", "\n\nA:\n\nTo see actual limits of running process you may use /proc , just get pid of your glassfish/java process and look at cat /proc/$PID_OF_PROCESS/limits\nIt should be \"Max open files\" there. ", "\nAlso you can monitor number of open files with \"lsof -p\".", "\n\n"], "meta": {"pile_set_name": "StackExchange"}, "scores": [0.000937344622798264, 0.0008477268274873495, 0.0008473743218928576, 0.0038117028307169676, 0.0008391504525206983, 0.0007614796049892902, 0.0009274631156586111, 0.0008840296068228781, 0.0008548406767658889, 0.0008983492152765393, 0.0011163837043568492, 0.0007697347900830209, 0.001022621989250183, 0.000837433326523751, 0.0008354997844435275, 0.0007714721723459661, 0.000852696190122515, 0.001136764301918447, 0.0009152143029496074, 0.0008421867387369275, 0.0011360147036612034, 0.0007057945476844907, 0.0007082538795657456, 0.0006449358188547194, 0.000585763540584594, 0.0006117785815149546, 0.0019954426679760218], "avg_score": 0.0010036093450185876, "num_sents": 27}
{"texts": ["More Articles\n\nBY JASON KAPLAN\n\nPhotographer Jason Kaplan takes a look at Murray's Pharmacy in Heppner. ", "The family owned business is run by John and Ann Murray, who were featured in our July/August cover story: 10 Innovators in Rural Health Care.", "\n\nBY JACOB PALMER | DIGITAL NEWS EDITOR\n\nIn 2014, total revenue for camping and day use in Oregon State Parks was a little more than $17 million. ", "That figure may even higher this year \"because we've had exceptionally nice weather,\" Hughes says.", "\n\nBY STUART WATSON\n\nBY JON SHADEL\n\nThe technology industry is always in flux. ", "And this rapid rate of change poses challenges to companies ranging from nimble startups aiming to make their mark to established organizations fighting to remain relevant. ", "This is particularly true in the competitive digital display market, where an Oregon company has been at the forefront of nearly every major breakthrough in the last three decades.", "\n\nPress Releases\n\nRobert S. Wiggins has joined Lane Powell as a Shareholder in the Corporate/M&A Practice Group. ", "Wiggins is a well-known lawyer, entrepreneur, and investor with more than 30 years of experience leading and advising established and emerging companies in the Pacific Northwest. ", "Wiggins will focus his practice on offering outside general counsel services, including general corporate and board representation, business transactions and capital events."], "meta": {"pile_set_name": "Pile-CC"}, "scores": [0.0006062510656192899, 0.0006292813341133296, 0.0005551461945287883, 0.0005849330918863416, 0.0006085832137614489, 0.0006062761531211436, 0.0005888057057745755, 0.000603517226409167, 0.0005898741073906422, 0.0006153601570986211], "avg_score": 0.0005988028249703347, "num_sents": 10}
{"title": "electromagnetic energy is absorbed or emitted in discrete packets", " story": "https://en.wikipedia.org/wiki/Quantum", " time": "2022-10-12 01:47:58.485120"}
{"title": "speeches", " story": "https://en.wikipedia.org/wiki/Cicero", " time": "2022-10-12 01:48:09.186213"}
{"title": "cerebrovascular disease", " story": "https://en.wikipedia.org/wiki/Alzheimer%27s_disease", " time": "2022-10-12 01:48:18.661961"}
{"title": "antidepressant medications", " story": "https://en.wikipedia.org/wiki/Peripheral_neuropathy", " time": "2022-10-12 01:48:25.728941"}
{"title": "Scalp cooling", " story": "https://en.wikipedia.org/wiki/Chemotherapy", " time": "2022-10-12 01:48:37.233833"}
{"title": "pro-aging trance", " story": "https://en.wikipedia.org/wiki/Death", " time": "2022-10-12 01:48:45.158220"}
{"title": "by", " story": "https://en.wikipedia.org/wiki/Securitization", " time": "2022-10-12 01:48:56.000813"}
{"title": "New York City is the largest", " story": "https://en.wikipedia.org/wiki/Financial_services", " time": "2022-10-12 01:49:00.637205"}
{"title": "the collective nature of the text", " story": "https://en.wikipedia.org/wiki/Anthology", " time": "2022-10-12 01:49:04.268440"}
{"repo_name": "WangWenjun559/Weiss", "path": "summary/sumy/sklearn/ensemble/tests/test_weight_boosting.py", "copies": "32", "size": "15697", "content": "\"\"\"Testing for the boost module (sklearn.ensemble.boost).\"\"\"\n\nimport numpy as np\nfrom sklearn.utils.testing import assert_array_equal, assert_array_less\nfrom sklearn.utils.testing import assert_array_almost_equal\nfrom sklearn.utils.testing import assert_equal\nfrom sklearn.utils.testing import assert_raises, assert_raises_regexp\n\nfrom sklearn.cross_validation import train_test_split\nfrom sklearn.grid_search import GridSearchCV\nfrom sklearn.ensemble import AdaBoostClassifier\nfrom sklearn.ensemble import AdaBoostRegressor\nfrom scipy.sparse import csc_matrix\nfrom scipy.sparse import csr_matrix\nfrom scipy.sparse import coo_matrix\nfrom scipy.sparse import dok_matrix\nfrom scipy.sparse import lil_matrix\nfrom sklearn.svm import SVC, SVR\nfrom sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor\nfrom sklearn.utils import shuffle\nfrom sklearn import datasets\n\n\n# Common random state\nrng = np.random.RandomState(0)\n\n# Toy sample\nX = [[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1]]\ny_class = [\"foo\", \"foo\", \"foo\", 1, 1, 1] # test string class labels\ny_regr = [-1, -1, -1, 1, 1, 1]\nT = [[-1, -1], [2, 2], [3, 2]]\ny_t_class = [\"foo\", 1, 1]\ny_t_regr = [-1, 1, 1]\n\n# Load the iris dataset and randomly permute it\niris = datasets.load_iris()\nperm = rng.permutation(iris.target.size)\niris.data, iris.target = shuffle(iris.data, iris.target, random_state=rng)\n\n# Load the boston dataset and randomly permute it\nboston = datasets.load_boston()\nboston.data, boston.target = shuffle(boston.data, boston.target,\n random_state=rng)\n\n\ndef test_classification_toy():\n # Check classification on a toy dataset.\n for alg in ['SAMME', 'SAMME.R']:\n clf = AdaBoostClassifier(algorithm=alg, random_state=0)\n clf.fit(X, y_class)\n assert_array_equal(clf.predict(T), y_t_class)\n assert_array_equal(np.unique(np.asarray(y_t_class)), clf.classes_)\n assert_equal(clf.predict_proba(T).shape, (len(T), 2))\n assert_equal(clf.decision_function(T).shape, (len(T),))\n\n\ndef test_regression_toy():\n # Check classification on a toy dataset.\n clf = AdaBoostRegressor(random_state=0)\n clf.fit(X, y_regr)\n assert_array_equal(clf.predict(T), y_t_regr)\n\n\ndef test_iris():\n # Check consistency on dataset iris.\n classes = np.unique(iris.target)\n clf_samme = prob_samme = None\n\n for alg in ['SAMME', 'SAMME.R']:\n clf = AdaBoostClassifier(algorithm=alg)\n clf.fit(iris.data, iris.target)\n\n assert_array_equal(classes, clf.classes_)\n proba = clf.predict_proba(iris.data)\n if alg == \"SAMME\":\n clf_samme = clf\n prob_samme = proba\n assert_equal(proba.shape[1], len(classes))\n assert_equal(clf.decision_function(iris.data).shape[1], len(classes))\n\n score = clf.score(iris.data, iris.target)\n assert score > 0.9, \"Failed with algorithm %s and score = %f\" % \\\n (alg, score)\n\n # Somewhat hacky regression test: prior to\n # ae7adc880d624615a34bafdb1d75ef67051b8200,\n # predict_proba returned SAMME.R values for SAMME.\n clf_samme.algorithm = \"SAMME.R\"\n assert_array_less(0,\n np.abs(clf_samme.predict_proba(iris.data) - prob_samme))\n\n\ndef test_boston():\n # Check consistency on dataset boston house prices.\n clf = AdaBoostRegressor(random_state=0)\n clf.fit(boston.data, boston.target)\n score = clf.score(boston.data, boston.target)\n assert score > 0.85\n\n\ndef test_staged_predict():\n # Check staged predictions.\n rng = np.random.RandomState(0)\n iris_weights = rng.randint(10, size=iris.target.shape)\n boston_weights = rng.randint(10, size=boston.target.shape)\n\n # AdaBoost classification\n for alg in ['SAMME', 'SAMME.R']:\n clf = AdaBoostClassifier(algorithm=alg, n_estimators=10)\n clf.fit(iris.data, iris.target, sample_weight=iris_weights)\n\n predictions = clf.predict(iris.data)\n staged_predictions = [p for p in clf.staged_predict(iris.data)]\n proba = clf.predict_proba(iris.data)\n staged_probas = [p for p in clf.staged_predict_proba(iris.data)]\n score = clf.score(iris.data, iris.target, sample_weight=iris_weights)\n staged_scores = [\n s for s in clf.staged_score(\n iris.data, iris.target, sample_weight=iris_weights)]\n\n assert_equal(len(staged_predictions), 10)\n assert_array_almost_equal(predictions, staged_predictions[-1])\n assert_equal(len(staged_probas), 10)\n assert_array_almost_equal(proba, staged_probas[-1])\n assert_equal(len(staged_scores), 10)\n assert_array_almost_equal(score, staged_scores[-1])\n\n # AdaBoost regression\n clf = AdaBoostRegressor(n_estimators=10, random_state=0)\n clf.fit(boston.data, boston.target, sample_weight=boston_weights)\n\n predictions = clf.predict(boston.data)\n staged_predictions = [p for p in clf.staged_predict(boston.data)]\n score = clf.score(boston.data, boston.target, sample_weight=boston_weights)\n staged_scores = [\n s for s in clf.staged_score(\n boston.data, boston.target, sample_weight=boston_weights)]\n\n assert_equal(len(staged_predictions), 10)\n assert_array_almost_equal(predictions, staged_predictions[-1])\n assert_equal(len(staged_scores), 10)\n assert_array_almost_equal(score, staged_scores[-1])\n\n\ndef test_gridsearch():\n # Check that base trees can be grid-searched.\n # AdaBoost classification\n boost = AdaBoostClassifier(base_estimator=DecisionTreeClassifier())\n parameters = {'n_estimators': (1, 2),\n 'base_estimator__max_depth': (1, 2),\n 'algorithm': ('SAMME', 'SAMME.R')}\n clf = GridSearchCV(boost, parameters)\n clf.fit(iris.data, iris.target)\n\n # AdaBoost regression\n boost = AdaBoostRegressor(base_estimator=DecisionTreeRegressor(),\n random_state=0)\n parameters = {'n_estimators': (1, 2),\n 'base_estimator__max_depth': (1, 2)}\n clf = GridSearchCV(boost, parameters)\n clf.fit(boston.data, boston.target)\n\n\ndef test_pickle():\n # Check pickability.\n import pickle\n\n # Adaboost classifier\n for alg in ['SAMME', 'SAMME.R']:\n obj = AdaBoostClassifier(algorithm=alg)\n obj.fit(iris.data, iris.target)\n score = obj.score(iris.data, iris.target)\n s = pickle.dumps(obj)\n\n obj2 = pickle.loads(s)\n assert_equal(type(obj2), obj.__class__)\n score2 = obj2.score(iris.data, iris.target)\n assert_equal(score, score2)\n\n # Adaboost regressor\n obj = AdaBoostRegressor(random_state=0)\n obj.fit(boston.data, boston.target)\n score = obj.score(boston.data, boston.target)\n s = pickle.dumps(obj)\n\n obj2 = pickle.loads(s)\n assert_equal(type(obj2), obj.__class__)\n score2 = obj2.score(boston.data, boston.target)\n assert_equal(score, score2)\n\n\ndef test_importances():\n # Check variable importances.\n X, y = datasets.make_classification(n_samples=2000,\n n_features=10,\n n_informative=3,\n n_redundant=0,\n n_repeated=0,\n shuffle=False,\n random_state=1)\n\n for alg in ['SAMME', 'SAMME.R']:\n clf = AdaBoostClassifier(algorithm=alg)\n\n clf.fit(X, y)\n importances = clf.feature_importances_\n\n assert_equal(importances.shape[0], 10)\n assert_equal((importances[:3, np.newaxis] >= importances[3:]).all(),\n True)\n\n\ndef test_error():\n # Test that it gives proper exception on deficient input.\n assert_raises(ValueError,\n AdaBoostClassifier(learning_rate=-1).fit,\n X, y_class)\n\n assert_raises(ValueError,\n AdaBoostClassifier(algorithm=\"foo\").fit,\n X, y_class)\n\n assert_raises(ValueError,\n AdaBoostClassifier().fit,\n X, y_class, sample_weight=np.asarray([-1]))\n\n\ndef test_base_estimator():\n # Test different base estimators.\n from sklearn.ensemble import RandomForestClassifier\n from sklearn.svm import SVC\n\n # XXX doesn't work with y_class because RF doesn't support classes_\n # Shouldn't AdaBoost run a LabelBinarizer?\n clf = AdaBoostClassifier(RandomForestClassifier())\n clf.fit(X, y_regr)\n\n clf = AdaBoostClassifier(SVC(), algorithm=\"SAMME\")\n clf.fit(X, y_class)\n\n from sklearn.ensemble import RandomForestRegressor\n from sklearn.svm import SVR\n\n clf = AdaBoostRegressor(RandomForestRegressor(), random_state=0)\n clf.fit(X, y_regr)\n\n clf = AdaBoostRegressor(SVR(), random_state=0)\n clf.fit(X, y_regr)\n\n # Check that an empty discrete ensemble fails in fit, not predict.\n X_fail = [[1, 1], [1, 1], [1, 1], [1, 1]]\n y_fail = [\"foo\", \"bar\", 1, 2]\n clf = AdaBoostClassifier(SVC(), algorithm=\"SAMME\")\n assert_raises_regexp(ValueError, \"worse than random\",\n clf.fit, X_fail, y_fail)\n\n\ndef test_sample_weight_missing():\n from sklearn.linear_model import LinearRegression\n from sklearn.cluster import KMeans\n\n clf = AdaBoostClassifier(LinearRegression(), algorithm=\"SAMME\")\n assert_raises(ValueError, clf.fit, X, y_regr)\n\n clf = AdaBoostRegressor(LinearRegression())\n assert_raises(ValueError, clf.fit, X, y_regr)\n\n clf = AdaBoostClassifier(KMeans(), algorithm=\"SAMME\")\n assert_raises(ValueError, clf.fit, X, y_regr)\n\n clf = AdaBoostRegressor(KMeans())\n assert_raises(ValueError, clf.fit, X, y_regr)\n\n\ndef test_sparse_classification():\n # Check classification with sparse input.\n\n class CustomSVC(SVC):\n \"\"\"SVC variant that records the nature of the training set.\"\"\"\n\n def fit(self, X, y, sample_weight=None):\n \"\"\"Modification on fit caries data type for later verification.\"\"\"\n super(CustomSVC, self).fit(X, y, sample_weight=sample_weight)\n self.data_type_ = type(X)\n return self\n\n X, y = datasets.make_multilabel_classification(n_classes=1, n_samples=15,\n n_features=5,\n return_indicator=True,\n random_state=42)\n # Flatten y to a 1d array\n y = np.ravel(y)\n\n X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)\n\n for sparse_format in [csc_matrix, csr_matrix, lil_matrix, coo_matrix,\n dok_matrix]:\n X_train_sparse = sparse_format(X_train)\n X_test_sparse = sparse_format(X_test)\n\n # Trained on sparse format\n sparse_classifier = AdaBoostClassifier(\n base_estimator=CustomSVC(probability=True),\n random_state=1,\n algorithm=\"SAMME\"\n ).fit(X_train_sparse, y_train)\n\n # Trained on dense format\n dense_classifier = AdaBoostClassifier(\n base_estimator=CustomSVC(probability=True),\n random_state=1,\n algorithm=\"SAMME\"\n ).fit(X_train, y_train)\n\n # predict\n sparse_results = sparse_classifier.predict(X_test_sparse)\n dense_results = dense_classifier.predict(X_test)\n assert_array_equal(sparse_results, dense_results)\n\n # decision_function\n sparse_results = sparse_classifier.decision_function(X_test_sparse)\n dense_results = dense_classifier.decision_function(X_test)\n assert_array_equal(sparse_results, dense_results)\n\n # predict_log_proba\n sparse_results = sparse_classifier.predict_log_proba(X_test_sparse)\n dense_results = dense_classifier.predict_log_proba(X_test)\n assert_array_equal(sparse_results, dense_results)\n\n # predict_proba\n sparse_results = sparse_classifier.predict_proba(X_test_sparse)\n dense_results = dense_classifier.predict_proba(X_test)\n assert_array_equal(sparse_results, dense_results)\n\n # score\n sparse_results = sparse_classifier.score(X_test_sparse, y_test)\n dense_results = dense_classifier.score(X_test, y_test)\n assert_array_equal(sparse_results, dense_results)\n\n # staged_decision_function\n sparse_results = sparse_classifier.staged_decision_function(\n X_test_sparse)\n dense_results = dense_classifier.staged_decision_function(X_test)\n for sprase_res, dense_res in zip(sparse_results, dense_results):\n assert_array_equal(sprase_res, dense_res)\n\n # staged_predict\n sparse_results = sparse_classifier.staged_predict(X_test_sparse)\n dense_results = dense_classifier.staged_predict(X_test)\n for sprase_res, dense_res in zip(sparse_results, dense_results):\n assert_array_equal(sprase_res, dense_res)\n\n # staged_predict_proba\n sparse_results = sparse_classifier.staged_predict_proba(X_test_sparse)\n dense_results = dense_classifier.staged_predict_proba(X_test)\n for sprase_res, dense_res in zip(sparse_results, dense_results):\n assert_array_equal(sprase_res, dense_res)\n\n # staged_score\n sparse_results = sparse_classifier.staged_score(X_test_sparse,\n y_test)\n dense_results = dense_classifier.staged_score(X_test, y_test)\n for sprase_res, dense_res in zip(sparse_results, dense_results):\n assert_array_equal(sprase_res, dense_res)\n\n # Verify sparsity of data is maintained during training\n types = [i.data_type_ for i in sparse_classifier.estimators_]\n\n assert all([(t == csc_matrix or t == csr_matrix)\n for t in types])\n\n\ndef test_sparse_regression():\n # Check regression with sparse input.\n\n class CustomSVR(SVR):\n \"\"\"SVR variant that records the nature of the training set.\"\"\"\n\n def fit(self, X, y, sample_weight=None):\n \"\"\"Modification on fit caries data type for later verification.\"\"\"\n super(CustomSVR, self).fit(X, y, sample_weight=sample_weight)\n self.data_type_ = type(X)\n return self\n\n X, y = datasets.make_regression(n_samples=15, n_features=50, n_targets=1,\n random_state=42)\n\n X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)\n\n for sparse_format in [csc_matrix, csr_matrix, lil_matrix, coo_matrix,\n dok_matrix]:\n X_train_sparse = sparse_format(X_train)\n X_test_sparse = sparse_format(X_test)\n\n # Trained on sparse format\n sparse_classifier = AdaBoostRegressor(\n base_estimator=CustomSVR(),\n random_state=1\n ).fit(X_train_sparse, y_train)\n\n # Trained on dense format\n dense_classifier = dense_results = AdaBoostRegressor(\n base_estimator=CustomSVR(),\n random_state=1\n ).fit(X_train, y_train)\n\n # predict\n sparse_results = sparse_classifier.predict(X_test_sparse)\n dense_results = dense_classifier.predict(X_test)\n assert_array_equal(sparse_results, dense_results)\n\n # staged_predict\n sparse_results = sparse_classifier.staged_predict(X_test_sparse)\n dense_results = dense_classifier.staged_predict(X_test)\n for sprase_res, dense_res in zip(sparse_results, dense_results):\n assert_array_equal(sprase_res, dense_res)\n\n types = [i.data_type_ for i in sparse_classifier.estimators_]\n\n assert all([(t == csc_matrix or t == csr_matrix)\n for t in types])\n", "license": "apache-2.0"}
{"repo_name": "vipullakhani/mi-instrument", "path": "mi/core/instrument/file_publisher.py", "copies": "5", "size": "4306", "content": "\"\"\"\n@package mi.core.instrument.publisher\n@file /mi-instrument/mi/core/instrument/file_publisher.py\n@author Peter Cable\n@brief Event file publisher\nRelease notes:\n\ninitial release\n\"\"\"\nimport cPickle as pickle\nimport json\n\nimport numpy as np\nimport pandas as pd\nimport xarray as xr\nfrom mi.core.instrument.publisher import Publisher\nfrom mi.logging import log\n\n\nclass CountPublisher(Publisher):\n def __init__(self, allowed):\n super(CountPublisher, self).__init__(allowed)\n self.total = 0\n\n def _publish(self, events, headers):\n for e in events:\n try:\n json.dumps(e)\n except (ValueError, UnicodeDecodeError) as err:\n log.exception('Unable to publish event: %r %r', e, err)\n count = len(events)\n self.total += count\n log.info('Publish %d events (%d total)', count, self.total)\n\n\nclass FilePublisher(Publisher):\n def __init__(self, *args, **kwargs):\n super(FilePublisher, self).__init__(*args, **kwargs)\n self.samples = {}\n\n @staticmethod\n def _flatten(sample):\n values = sample.pop('values')\n for each in values:\n sample[each['value_id']] = each['value']\n return sample\n\n def _publish(self, events, headers):\n for event in events:\n # file publisher only applicable to particles\n if event.get('type') != 'DRIVER_ASYNC_EVENT_SAMPLE':\n continue\n\n particle = event.get('value', {})\n stream = particle.get('stream_name')\n if stream:\n particle = self._flatten(particle)\n self.samples.setdefault(stream, []).append(particle)\n\n def to_dataframes(self):\n data_frames = {}\n for particle_type in self.samples:\n data_frames[particle_type] = self.fix_arrays(pd.DataFrame(self.samples[particle_type]))\n return data_frames\n\n def to_datasets(self):\n datasets = {}\n for particle_type in self.samples:\n datasets[particle_type] = self.fix_arrays(pd.DataFrame(self.samples[particle_type]), return_as_xr=True)\n return datasets\n\n @staticmethod\n def fix_arrays(data_frame, return_as_xr=False):\n # round-trip the dataframe through xray to get the multidimensional indexing correct\n new_ds = xr.Dataset()\n for each in data_frame:\n if data_frame[each].dtype == 'object' and isinstance(data_frame[each].values[0], list):\n data = np.array([np.array(x) for x in data_frame[each].values])\n new_ds[each] = xr.DataArray(data)\n else:\n new_ds[each] = data_frame[each]\n if return_as_xr:\n return new_ds\n return new_ds.to_dataframe()\n\n def write(self):\n log.info('Writing output files...')\n self._write()\n log.info('Done writing output files...')\n\n def _write(self):\n raise NotImplemented\n\n\nclass CsvPublisher(FilePublisher):\n def _write(self):\n dataframes = self.to_dataframes()\n for particle_type in dataframes:\n file_path = '%s.csv' % particle_type\n dataframes[particle_type].to_csv(file_path)\n\n\nclass PandasPublisher(FilePublisher):\n def _write(self):\n dataframes = self.to_dataframes()\n for particle_type in dataframes:\n # very large dataframes don't work with pickle\n # split if too large\n df = dataframes[particle_type]\n max_size = 5000000\n if len(df) > max_size:\n num_slices = len(df) / max_size\n slices = np.array_split(df, num_slices)\n for index, df_slice in enumerate(slices):\n file_path = '%s_%d.pd' % (particle_type, index)\n df_slice.to_pickle(file_path)\n else:\n log.info('length of dataframe: %d', len(df))\n file_path = '%s.pd' % particle_type\n dataframes[particle_type].to_pickle(file_path)\n\n\nclass XarrayPublisher(FilePublisher):\n def _write(self):\n datasets = self.to_datasets()\n for particle_type in datasets:\n file_path = '%s.xr' % particle_type\n with open(file_path, 'w') as fh:\n pickle.dump(datasets[particle_type], fh, protocol=-1)\n", "license": "bsd-2-clause"}
{"repo_name": "costypetrisor/scikit-learn", "path": "examples/mixture/plot_gmm_sin.py", "copies": "248", "size": "2747", "content": "\"\"\"\n=================================\nGaussian Mixture Model Sine Curve\n=================================\n\nThis example highlights the advantages of the Dirichlet Process:\ncomplexity control and dealing with sparse data. The dataset is formed\nby 100 points loosely spaced following a noisy sine curve. The fit by\nthe GMM class, using the expectation-maximization algorithm to fit a\nmixture of 10 Gaussian components, finds too-small components and very\nlittle structure. The fits by the Dirichlet process, however, show\nthat the model can either learn a global structure for the data (small\nalpha) or easily interpolate to finding relevant local structure\n(large alpha), never falling into the problems shown by the GMM class.\n\"\"\"\n\nimport itertools\n\nimport numpy as np\nfrom scipy import linalg\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\nfrom sklearn import mixture\nfrom sklearn.externals.six.moves import xrange\n\n# Number of samples per component\nn_samples = 100\n\n# Generate random sample following a sine curve\nnp.random.seed(0)\nX = np.zeros((n_samples, 2))\nstep = 4 * np.pi / n_samples\n\nfor i in xrange(X.shape[0]):\n x = i * step - 6\n X[i, 0] = x + np.random.normal(0, 0.1)\n X[i, 1] = 3 * (np.sin(x) + np.random.normal(0, .2))\n\n\ncolor_iter = itertools.cycle(['r', 'g', 'b', 'c', 'm'])\n\n\nfor i, (clf, title) in enumerate([\n (mixture.GMM(n_components=10, covariance_type='full', n_iter=100),\n \"Expectation-maximization\"),\n (mixture.DPGMM(n_components=10, covariance_type='full', alpha=0.01,\n n_iter=100),\n \"Dirichlet Process,alpha=0.01\"),\n (mixture.DPGMM(n_components=10, covariance_type='diag', alpha=100.,\n n_iter=100),\n \"Dirichlet Process,alpha=100.\")]):\n\n clf.fit(X)\n splot = plt.subplot(3, 1, 1 + i)\n Y_ = clf.predict(X)\n for i, (mean, covar, color) in enumerate(zip(\n clf.means_, clf._get_covars(), color_iter)):\n v, w = linalg.eigh(covar)\n u = w[0] / linalg.norm(w[0])\n # as the DP will not use every component it has access to\n # unless it needs it, we shouldn't plot the redundant\n # components.\n if not np.any(Y_ == i):\n continue\n plt.scatter(X[Y_ == i, 0], X[Y_ == i, 1], .8, color=color)\n\n # Plot an ellipse to show the Gaussian component\n angle = np.arctan(u[1] / u[0])\n angle = 180 * angle / np.pi # convert to degrees\n ell = mpl.patches.Ellipse(mean, v[0], v[1], 180 + angle, color=color)\n ell.set_clip_box(splot.bbox)\n ell.set_alpha(0.5)\n splot.add_artist(ell)\n\n plt.xlim(-6, 4 * np.pi - 6)\n plt.ylim(-5, 5)\n plt.title(title)\n plt.xticks(())\n plt.yticks(())\n\nplt.show()\n", "license": "bsd-3-clause"}
{"repo_name": "cpcloud/ibis", "path": "ibis/expr/window.py", "copies": "1", "size": "15482", "content": "\"\"\"Encapsulation of SQL window clauses.\"\"\"\n\nimport functools\nfrom typing import NamedTuple, Union\n\nimport numpy as np\nimport pandas as pd\n\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nimport ibis.expr.types as ir\nimport ibis.util as util\n\n\ndef _sequence_to_tuple(x):\n return tuple(x) if util.is_iterable(x) else x\n\n\nRowsWithMaxLookback = NamedTuple('RowsWithMaxLookback',\n [('rows', Union[int, np.integer]),\n ('max_lookback', ir.IntervalValue)]\n )\n\n\ndef _choose_non_empty_val(first, second):\n if isinstance(first, (int, np.integer)) and first:\n non_empty_value = first\n elif not isinstance(first, (int, np.integer)) and first is not None:\n non_empty_value = first\n else:\n non_empty_value = second\n return non_empty_value\n\n\ndef _determine_how(preceding):\n offset_type = type(_get_preceding_value(preceding))\n if issubclass(offset_type, (int, np.integer)):\n how = 'rows'\n elif issubclass(offset_type, ir.IntervalScalar):\n how = 'range'\n else:\n raise TypeError(\n 'Type {} is not supported for row- or range- based trailing '\n 'window operations'.format(offset_type)\n )\n return how\n\n\[email protected]\ndef _get_preceding_value(preceding):\n raise TypeError(\n \"Type {} is not a valid type for 'preceding' \"\n \"parameter\".format(type(preceding))\n )\n\n\n@_get_preceding_value.register(tuple)\ndef _get_preceding_value_tuple(preceding):\n start, end = preceding\n if start is None:\n preceding_value = end\n else:\n preceding_value = start\n return preceding_value\n\n\n@_get_preceding_value.register(int)\n@_get_preceding_value.register(np.integer)\n@_get_preceding_value.register(ir.IntervalScalar)\ndef _get_preceding_value_simple(preceding):\n return preceding\n\n\n@_get_preceding_value.register(RowsWithMaxLookback)\ndef _get_preceding_value_mlb(preceding):\n preceding_value = preceding.rows\n if not isinstance(preceding_value, (int, np.integer)):\n raise TypeError(\"'Rows with max look-back' only supports integer \"\n \"row-based indexing.\")\n return preceding_value\n\n\nclass Window:\n \"\"\"Class to encapsulate the details of a window frame.\n\n Notes\n -----\n This class is patterned after SQL window clauses.\n\n Using None for preceding or following currently indicates unbounded. Use 0\n for ``CURRENT ROW``.\n\n \"\"\"\n\n def __init__(\n self,\n group_by=None,\n order_by=None,\n preceding=None,\n following=None,\n max_lookback=None,\n how='rows',\n ):\n if group_by is None:\n group_by = []\n\n if order_by is None:\n order_by = []\n\n self._group_by = util.promote_list(group_by)\n\n self._order_by = []\n for x in util.promote_list(order_by):\n if isinstance(x, ir.SortExpr):\n pass\n elif isinstance(x, ir.Expr):\n x = ops.SortKey(x).to_expr()\n self._order_by.append(x)\n\n if isinstance(preceding, RowsWithMaxLookback):\n # the offset interval is used as the 'preceding' value of a window\n # while 'rows' is used to adjust the window created using offset\n self.preceding = preceding.max_lookback\n self.max_lookback = preceding.rows\n else:\n self.preceding = _sequence_to_tuple(preceding)\n self.max_lookback = max_lookback\n\n self.following = _sequence_to_tuple(following)\n self.how = how\n\n self._validate_frame()\n\n def __hash__(self) -> int:\n return hash(\n (\n tuple(gb.op() for gb in self._group_by),\n tuple(ob.op() for ob in self._order_by),\n self.preceding,\n self.following,\n self.how,\n )\n )\n\n def _validate_frame(self):\n preceding_tuple = has_preceding = False\n following_tuple = has_following = False\n if self.preceding is not None:\n preceding_tuple = isinstance(self.preceding, tuple)\n has_preceding = True\n\n if self.following is not None:\n following_tuple = isinstance(self.following, tuple)\n has_following = True\n\n if (preceding_tuple and has_following) or (\n following_tuple and has_preceding\n ):\n raise com.IbisInputError(\n 'Can only specify one window side when you want an '\n 'off-center window'\n )\n elif preceding_tuple:\n start, end = self.preceding\n if end is None:\n raise com.IbisInputError(\"preceding end point cannot be None\")\n if end < 0:\n raise com.IbisInputError(\n \"preceding end point must be non-negative\"\n )\n if start is not None:\n if start < 0:\n raise com.IbisInputError(\n \"preceding start point must be non-negative\"\n )\n if start <= end:\n raise com.IbisInputError(\n \"preceding start must be greater than preceding end\"\n )\n elif following_tuple:\n start, end = self.following\n if start is None:\n raise com.IbisInputError(\n \"following start point cannot be None\"\n )\n if start < 0:\n raise com.IbisInputError(\n \"following start point must be non-negative\"\n )\n if end is not None:\n if end < 0:\n raise com.IbisInputError(\n \"following end point must be non-negative\"\n )\n if start >= end:\n raise com.IbisInputError(\n \"following start must be less than following end\"\n )\n else:\n if not isinstance(self.preceding, ir.Expr):\n if has_preceding and self.preceding < 0:\n raise com.IbisInputError(\n \"'preceding' must be positive, got {}\".format(\n self.preceding\n )\n )\n\n if not isinstance(self.following, ir.Expr):\n if has_following and self.following < 0:\n raise com.IbisInputError(\n \"'following' must be positive, got {}\".format(\n self.following\n )\n )\n if self.how not in {'rows', 'range'}:\n raise com.IbisInputError(\n \"'how' must be 'rows' or 'range', got {}\".format(self.how)\n )\n\n if self.max_lookback is not None:\n if not isinstance(\n self.preceding, (ir.IntervalValue, pd.Timedelta)):\n raise com.IbisInputError(\n \"'max_lookback' must be specified as an interval \"\n \"or pandas.Timedelta object\"\n )\n\n def bind(self, table):\n # Internal API, ensure that any unresolved expr references (as strings,\n # say) are bound to the table being windowed\n groups = table._resolve(self._group_by)\n sorts = [ops.to_sort_key(table, k) for k in self._order_by]\n return self._replace(group_by=groups, order_by=sorts)\n\n def combine(self, window):\n if self.how != window.how:\n raise com.IbisInputError(\n (\n \"Window types must match. \"\n \"Expecting '{}' Window, got '{}'\"\n ).format(self.how.upper(), window.how.upper())\n )\n\n kwds = dict(\n preceding=_choose_non_empty_val(self.preceding, window.preceding),\n following=_choose_non_empty_val(self.following, window.following),\n max_lookback=self.max_lookback or window.max_lookback,\n group_by=self._group_by + window._group_by,\n order_by=self._order_by + window._order_by,\n )\n return Window(**kwds)\n\n def group_by(self, expr):\n new_groups = self._group_by + util.promote_list(expr)\n return self._replace(group_by=new_groups)\n\n def _replace(self, **kwds):\n new_kwds = dict(\n group_by=kwds.get('group_by', self._group_by),\n order_by=kwds.get('order_by', self._order_by),\n preceding=kwds.get('preceding', self.preceding),\n following=kwds.get('following', self.following),\n max_lookback=kwds.get('max_lookback', self.max_lookback),\n how=kwds.get('how', self.how),\n )\n return Window(**new_kwds)\n\n def order_by(self, expr):\n new_sorts = self._order_by + util.promote_list(expr)\n return self._replace(order_by=new_sorts)\n\n def equals(self, other, cache=None):\n if cache is None:\n cache = {}\n\n if self is other:\n cache[self, other] = True\n return True\n\n if not isinstance(other, Window):\n cache[self, other] = False\n return False\n\n try:\n return cache[self, other]\n except KeyError:\n pass\n\n if len(self._group_by) != len(other._group_by) or not ops.all_equal(\n self._group_by, other._group_by, cache=cache\n ):\n cache[self, other] = False\n return False\n\n if len(self._order_by) != len(other._order_by) or not ops.all_equal(\n self._order_by, other._order_by, cache=cache\n ):\n cache[self, other] = False\n return False\n\n equal = ops.all_equal(\n self.preceding, other.preceding, cache=cache\n ) and ops.all_equal(\n self.following, other.following, cache=cache\n ) and ops.all_equal(\n self.max_lookback, other.max_lookback, cache=cache\n )\n cache[self, other] = equal\n return equal\n\n\ndef rows_with_max_lookback(rows, max_lookback):\n \"\"\"Create a bound preceding value for use with trailing window functions\"\"\"\n return RowsWithMaxLookback(rows, max_lookback)\n\n\ndef window(preceding=None, following=None, group_by=None, order_by=None):\n \"\"\"Create a window clause for use with window functions.\n\n This ROW window clause aggregates adjacent rows based on differences in row\n number.\n\n All window frames / ranges are inclusive.\n\n Parameters\n ----------\n preceding : int, tuple, or None, default None\n Specify None for unbounded, 0 to include current row tuple for\n off-center window\n following : int, tuple, or None, default None\n Specify None for unbounded, 0 to include current row tuple for\n off-center window\n group_by : expressions, default None\n Either specify here or with TableExpr.group_by\n order_by : expressions, default None\n For analytic functions requiring an ordering, specify here, or let Ibis\n determine the default ordering (for functions like rank)\n\n Returns\n -------\n Window\n\n \"\"\"\n return Window(\n preceding=preceding,\n following=following,\n group_by=group_by,\n order_by=order_by,\n how='rows',\n )\n\n\ndef range_window(preceding=None, following=None, group_by=None, order_by=None):\n \"\"\"Create a range-based window clause for use with window functions.\n\n This RANGE window clause aggregates rows based upon differences in the\n value of the order-by expression.\n\n All window frames / ranges are inclusive.\n\n Parameters\n ----------\n preceding : int, tuple, or None, default None\n Specify None for unbounded, 0 to include current row tuple for\n off-center window\n following : int, tuple, or None, default None\n Specify None for unbounded, 0 to include current row tuple for\n off-center window\n group_by : expressions, default None\n Either specify here or with TableExpr.group_by\n order_by : expressions, default None\n For analytic functions requiring an ordering, specify here, or let Ibis\n determine the default ordering (for functions like rank)\n\n Returns\n -------\n Window\n\n \"\"\"\n return Window(\n preceding=preceding,\n following=following,\n group_by=group_by,\n order_by=order_by,\n how='range',\n )\n\n\ndef cumulative_window(group_by=None, order_by=None):\n \"\"\"Create a cumulative window for use with aggregate window functions.\n\n All window frames / ranges are inclusive.\n\n Parameters\n ----------\n group_by : expressions, default None\n Either specify here or with TableExpr.group_by\n order_by : expressions, default None\n For analytic functions requiring an ordering, specify here, or let Ibis\n determine the default ordering (for functions like rank)\n\n Returns\n -------\n Window\n\n \"\"\"\n return Window(\n preceding=None, following=0, group_by=group_by, order_by=order_by\n )\n\n\ndef trailing_window(preceding, group_by=None, order_by=None):\n \"\"\"Create a trailing window for use with aggregate window functions.\n\n Parameters\n ----------\n preceding : int, float or expression of intervals, i.e.\n ibis.interval(days=1) + ibis.interval(hours=5)\n Int indicates number of trailing rows to include;\n 0 includes only the current row.\n Interval indicates a trailing range window.\n group_by : expressions, default None\n Either specify here or with TableExpr.group_by\n order_by : expressions, default None\n For analytic functions requiring an ordering, specify here, or let Ibis\n determine the default ordering (for functions like rank)\n\n Returns\n -------\n Window\n\n \"\"\"\n how = _determine_how(preceding)\n return Window(\n preceding=preceding,\n following=0,\n group_by=group_by,\n order_by=order_by,\n how=how\n )\n\n\ndef trailing_range_window(preceding, order_by, group_by=None):\n \"\"\"Create a trailing time window for use with aggregate window functions.\n\n Parameters\n ----------\n preceding : float or expression of intervals, i.e.\n ibis.interval(days=1) + ibis.interval(hours=5)\n order_by : expressions, default None\n For analytic functions requiring an ordering, specify here, or let Ibis\n determine the default ordering (for functions like rank)\n group_by : expressions, default None\n Either specify here or with TableExpr.group_by\n\n Returns\n -------\n Window\n\n \"\"\"\n return Window(\n preceding=preceding,\n following=0,\n group_by=group_by,\n order_by=order_by,\n how='range',\n )\n\n\ndef propagate_down_window(expr, window):\n op = expr.op()\n\n clean_args = []\n unchanged = True\n for arg in op.args:\n if isinstance(arg, ir.Expr) and not isinstance(op, ops.WindowOp):\n new_arg = propagate_down_window(arg, window)\n if isinstance(new_arg.op(), ops.AnalyticOp):\n new_arg = ops.WindowOp(new_arg, window).to_expr()\n if arg is not new_arg:\n unchanged = False\n arg = new_arg\n\n clean_args.append(arg)\n\n if unchanged:\n return expr\n else:\n return type(op)(*clean_args).to_expr()\n", "license": "apache-2.0"}
{"repo_name": "econpy/google-ngrams", "path": "getngrams.py", "copies": "2", "size": "6725", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*\nfrom ast import literal_eval\nfrom pandas import DataFrame # http://github.com/pydata/pandas\nimport re\nimport requests # http://github.com/kennethreitz/requests\nimport subprocess\nimport sys\n\ncorpora = dict(eng_us_2012=17, eng_us_2009=5, eng_gb_2012=18, eng_gb_2009=6,\n chi_sim_2012=23, chi_sim_2009=11, eng_2012=15, eng_2009=0,\n eng_fiction_2012=16, eng_fiction_2009=4, eng_1m_2009=1,\n fre_2012=19, fre_2009=7, ger_2012=20, ger_2009=8, heb_2012=24,\n heb_2009=9, spa_2012=21, spa_2009=10, rus_2012=25, rus_2009=12,\n ita_2012=22)\n\n\ndef getNgrams(query, corpus, startYear, endYear, smoothing, caseInsensitive):\n params = dict(content=query, year_start=startYear, year_end=endYear,\n corpus=corpora[corpus], smoothing=smoothing,\n case_insensitive=caseInsensitive)\n if params['case_insensitive'] is False:\n params.pop('case_insensitive')\n if '?' in params['content']:\n params['content'] = params['content'].replace('?', '*')\n if '@' in params['content']:\n params['content'] = params['content'].replace('@', '=>')\n req = requests.get('http://books.google.com/ngrams/graph', params=params)\n res = re.findall('var data = (.*?);\\\\n', req.text)\n if res:\n data = {qry['ngram']: qry['timeseries']\n for qry in literal_eval(res[0])}\n df = DataFrame(data)\n df.insert(0, 'year', list(range(startYear, endYear + 1)))\n else:\n df = DataFrame()\n return req.url, params['content'], df\n\n\ndef runQuery(argumentString):\n arguments = argumentString.split()\n query = ' '.join([arg for arg in arguments if not arg.startswith('-')])\n if '?' in query:\n query = query.replace('?', '*')\n if '@' in query:\n query = query.replace('@', '=>')\n params = [arg for arg in arguments if arg.startswith('-')]\n corpus, startYear, endYear, smoothing = 'eng_2012', 1800, 2000, 3\n printHelp, caseInsensitive, allData = False, False, False\n toSave, toPrint, toPlot = True, True, False\n\n # parsing the query parameters\n for param in params:\n if '-nosave' in param:\n toSave = False\n elif '-noprint' in param:\n toPrint = False\n elif '-plot' in param:\n toPlot = True\n elif '-corpus' in param:\n corpus = param.split('=')[1].strip()\n elif '-startYear' in param:\n startYear = int(param.split('=')[1])\n elif '-endYear' in param:\n endYear = int(param.split('=')[1])\n elif '-smoothing' in param:\n smoothing = int(param.split('=')[1])\n elif '-caseInsensitive' in param:\n caseInsensitive = True\n elif '-alldata' in param:\n allData = True\n elif '-help' in param:\n printHelp = True\n else:\n print(('Did not recognize the following argument: %s' % param))\n if printHelp:\n print('See README file.')\n else:\n if '*' in query and caseInsensitive is True:\n caseInsensitive = False\n notifyUser = True\n warningMessage = \"*NOTE: Wildcard and case-insensitive \" + \\\n \"searches can't be combined, so the \" + \\\n \"case-insensitive option was ignored.\"\n elif '_INF' in query and caseInsensitive is True:\n caseInsensitive = False\n notifyUser = True\n warningMessage = \"*NOTE: Inflected form and case-insensitive \" + \\\n \"searches can't be combined, so the \" + \\\n \"case-insensitive option was ignored.\"\n else:\n notifyUser = False\n url, urlquery, df = getNgrams(query, corpus, startYear, endYear,\n smoothing, caseInsensitive)\n if not allData:\n if caseInsensitive is True:\n for col in df.columns:\n if col.count('(All)') == 1:\n df[col.replace(' (All)', '')] = df.pop(col)\n elif col.count(':chi_') == 1 or corpus.startswith('chi_'):\n pass\n elif col.count(':ger_') == 1 or corpus.startswith('ger_'):\n pass\n elif col.count(':heb_') == 1 or corpus.startswith('heb_'):\n pass\n elif col.count('(All)') == 0 and col != 'year':\n if col not in urlquery.split(','):\n df.pop(col)\n if '_INF' in query:\n for col in df.columns:\n if '_INF' in col:\n df.pop(col)\n if '*' in query:\n for col in df.columns:\n if '*' in col:\n df.pop(col)\n if toPrint:\n print((','.join(df.columns.tolist())))\n for row in df.iterrows():\n try:\n print(('%d,' % int(row[1].values[0]) +\n ','.join(['%.12f' % s for s in row[1].values[1:]])))\n except:\n print((','.join([str(s) for s in row[1].values])))\n queries = ''.join(urlquery.replace(',', '_').split())\n if '*' in queries:\n queries = queries.replace('*', 'WILDCARD')\n if caseInsensitive is True:\n word_case = 'caseInsensitive'\n else:\n word_case = 'caseSensitive'\n filename = '%s-%s-%d-%d-%d-%s.csv' % (queries, corpus, startYear,\n endYear, smoothing, word_case)\n if toSave:\n for col in df.columns:\n if '&gt;' in col:\n df[col.replace('&gt;', '>')] = df.pop(col)\n df.to_csv(filename, index=False)\n print(('Data saved to %s' % filename))\n if toPlot:\n try:\n subprocess.call(['python', 'xkcd.py', filename])\n except:\n if not toSave:\n print(('Currently, if you want to create a plot you ' +\n 'must also save the data. Rerun your query, ' +\n 'removing the -nosave option.'))\n else:\n print(('Plotting Failed: %s' % filename))\n if notifyUser:\n print(warningMessage)\n\nif __name__ == '__main__':\n argumentString = ' '.join(sys.argv[1:])\n if argumentString == '':\n argumentString = eval(input('Enter query (or -help):'))\n else:\n try:\n runQuery(argumentString)\n except:\n print('An error occurred.')\n", "license": "mit"}
{"repo_name": "gregreen/legacypipe", "path": "py/legacypipe/write_initial_catalog.py", "copies": "1", "size": "3639", "content": "from __future__ import print_function\nif __name__ == '__main__':\n import matplotlib\n matplotlib.use('Agg')\nimport numpy as np\n\nfrom common import *\nfrom tractor import *\n\nif __name__ == '__main__':\n import optparse\n parser = optparse.OptionParser()\n parser.add_option('-b', '--brick', type=int, help='Brick ID to run: default %default',\n default=377306)\n parser.add_option('-s', '--sed-matched', action='store_true', default=False,\n help='Run SED-matched filter?')\n parser.add_option('--bands', default='grz', help='Bands to retrieve')\n parser.add_option('-o', '--output', help='Output filename for catalog',\n default='initial-cat.fits')\n parser.add_option('--threads', type=int, help='Run multi-threaded')\n parser.add_option('-W', type=int, default=3600, help='Target image width (default %default)')\n parser.add_option('-H', type=int, default=3600, help='Target image height (default %default)')\n\n if not (('BOSS_PHOTOOBJ' in os.environ) and ('PHOTO_RESOLVE' in os.environ)):\n print('''$BOSS_PHOTOOBJ and $PHOTO_RESOLVE not set -- on NERSC, you can do:\nexport BOSS_PHOTOOBJ=/project/projectdirs/cosmo/data/sdss/pre13/eboss/photoObj.v5b\nexport PHOTO_RESOLVE=/project/projectdirs/cosmo/data/sdss/pre13/eboss/resolve/2013-07-29\nTo read SDSS files from the local filesystem rather than downloading them.\n''')\n\n \n opt,args = parser.parse_args()\n brickid = opt.brick\n bands = opt.bands\n if opt.threads and opt.threads > 1:\n from astrometry.util.multiproc import multiproc\n mp = multiproc(opt.threads)\n else:\n mp = multiproc()\n\n ps = None\n plots = False\n\n decals = Decals()\n brick = decals.get_brick(brickid)\n print('Chosen brick:')\n brick.about()\n targetwcs = wcs_for_brick(brick, W=opt.W, H=opt.H)\n W,H = targetwcs.get_width(), targetwcs.get_height()\n\n # Read SDSS sources\n cat,T = get_sdss_sources(bands, targetwcs)\n\n if opt.sed_matched:\n # Read images\n tims = decals.tims_touching_wcs(targetwcs, mp, mock_psf=True, bands=bands)\n print('Rendering detection maps...')\n detmaps, detivs = detection_maps(tims, targetwcs, bands, mp)\n\n SEDs = sed_matched_filters(bands)\n Tnew,newcat,nil = run_sed_matched_filters(SEDs, bands, detmaps, detivs,\n (T.itx,T.ity), targetwcs)\n T = merge_tables([T,Tnew], columns='fillzero')\n cat.extend(newcat)\n\n\n from desi_common import prepare_fits_catalog\n TT = T.copy()\n for k in ['itx','ity','index']:\n TT.delete_column(k)\n for col in TT.get_columns():\n if not col in ['tx', 'ty', 'blob']:\n TT.rename(col, 'sdss_%s' % col)\n\n TT.brickid = np.zeros(len(TT), np.int32) + brickid\n TT.objid = np.arange(len(TT)).astype(np.int32)\n\n invvars = None\n hdr = None\n fs = None\n \n cat.thawAllRecursive()\n T2,hdr = prepare_fits_catalog(cat, invvars, TT, hdr, bands, fs)\n # Unpack shape columns\n T2.shapeExp_r = T2.shapeExp[:,0]\n T2.shapeExp_e1 = T2.shapeExp[:,1]\n T2.shapeExp_e2 = T2.shapeExp[:,2]\n T2.shapeDev_r = T2.shapeExp[:,0]\n T2.shapeDev_e1 = T2.shapeExp[:,1]\n T2.shapeDev_e2 = T2.shapeExp[:,2]\n T2.shapeExp_r_ivar = T2.shapeExp_ivar[:,0]\n T2.shapeExp_e1_ivar = T2.shapeExp_ivar[:,1]\n T2.shapeExp_e2_ivar = T2.shapeExp_ivar[:,2]\n T2.shapeDev_r_ivar = T2.shapeExp_ivar[:,0]\n T2.shapeDev_e1_ivar = T2.shapeExp_ivar[:,1]\n T2.shapeDev_e2_ivar = T2.shapeExp_ivar[:,2]\n \n T2.writeto(opt.output)\n print('Wrote', opt.output)\n \n", "license": "gpl-2.0"}
{"repo_name": "SuLab/scheduled-bots", "path": "scheduled_bots/phenotypes/mitodb_bot.py", "copies": "1", "size": "6364", "content": "import argparse\nimport json\nimport os\nfrom datetime import datetime\nfrom itertools import groupby\nfrom time import gmtime, strftime, strptime\n\nimport pandas as pd\nfrom tqdm import tqdm\n\nfrom scheduled_bots import PROPS, ITEMS\nfrom wikidataintegrator import wdi_core, wdi_helpers, wdi_login\nfrom wikidataintegrator.ref_handlers import update_retrieved_if_new_multiple_refs\nfrom wikidataintegrator.wdi_helpers import PublicationHelper\nfrom wikidataintegrator.wdi_helpers import try_write\n\n__metadata__ = {\n 'name': 'MitoBot',\n 'maintainer': 'GSS',\n 'tags': ['disease', 'phenotype'],\n 'properties': [PROPS['symptoms']]\n}\ntry:\n from scheduled_bots.local import WDUSER, WDPASS\nexcept ImportError:\n if \"WDUSER\" in os.environ and \"WDPASS\" in os.environ:\n WDUSER = os.environ['WDUSER']\n WDPASS = os.environ['WDPASS']\n else:\n raise ValueError(\"WDUSER and WDPASS must be specified in local.py or as environment variables\")\n\n\nclass MitoBot:\n def __init__(self, records, login, write=True, run_one=False):\n \"\"\"\n # records is a list of dicts that look like:\n {'Added on(yyyy-mm-dd)': '2011-10-27',\n 'Organ system': 'nervous',\n 'Percent affected': '100 %',\n 'Pubmed id': 19696032,\n 'Symptom/sign': 'ataxia',\n 'disease': 606002,\n 'hpo': 'HP:0001251'}\n \"\"\"\n self.records = records\n self.login = login\n self.write = write\n self.run_one = run_one\n self.core_props = set()\n self.append_props = [PROPS['symptoms']]\n self.item_engine = self.make_item_engine()\n\n def make_item_engine(self):\n append_props = self.append_props\n core_props = self.core_props\n\n class SubCls(wdi_core.WDItemEngine):\n def __init__(self, *args, **kwargs):\n kwargs['fast_run'] = False\n kwargs['ref_handler'] = update_retrieved_if_new_multiple_refs\n kwargs['core_props'] = core_props\n kwargs['append_value'] = append_props\n super(SubCls, self).__init__(*args, **kwargs)\n\n return SubCls\n\n @staticmethod\n def create_reference(omim, pmid, login=None):\n \"\"\"\n Reference is:\n retrieved: date\n stated in: links to pmid items\n optional reference URL\n \"\"\"\n #\n ref = [wdi_core.WDItemID(ITEMS['MitoDB'], PROPS['curator'], is_reference=True)]\n t = strftime(\"+%Y-%m-%dT00:00:00Z\", gmtime())\n ref.append(wdi_core.WDTime(t, prop_nr=PROPS['retrieved'], is_reference=True))\n pmid_qid, _, success = PublicationHelper(ext_id=pmid, id_type='pmid', source=\"europepmc\").get_or_create(login)\n if success is True:\n ref.append(wdi_core.WDItemID(pmid_qid, PROPS['stated in'], is_reference=True))\n ref_url = \"http://mitodb.com/symptoms.php?oid={}&symptoms=Show\"\n ref.append(wdi_core.WDUrl(ref_url.format(omim), PROPS['reference URL'], is_reference=True))\n return ref\n\n @staticmethod\n def create_qualifier(incidence):\n q = []\n if incidence:\n q.append(wdi_core.WDQuantity(incidence, PROPS['incidence'], is_qualifier=True,\n unit=\"http://www.wikidata.org/entity/\" + ITEMS['percentage']))\n pass\n return q\n\n def run_one_disease(self, disease_qid, records):\n ss = []\n for record in records:\n incidence = float(record['Percent affected'][:-2])\n pmid = record['Pubmed id']\n phenotype_qid = record['phenotype_qid']\n omim_id = record['disease']\n\n refs = [self.create_reference(omim_id, pmid=pmid, login=self.login)]\n qual = self.create_qualifier(incidence)\n s = wdi_core.WDItemID(phenotype_qid, PROPS['symptoms'], references=refs, qualifiers=qual)\n ss.append(s)\n\n item = self.item_engine(wd_item_id=disease_qid, data=ss)\n assert not item.create_new_item\n\n try_write(item, record_id=disease_qid, record_prop=PROPS['symptoms'],\n edit_summary=\"Add phenotype from mitodb\", login=self.login, write=self.write)\n\n def run(self):\n if self.run_one:\n d = [x for x in self.records if x['disease_qid'] == self.run_one]\n if d:\n print(d[0])\n self.run_one_disease(d[0]['disease_qid'], d)\n else:\n raise ValueError(\"{} not found\".format(self.run_one))\n return None\n self.records = sorted(self.records, key=lambda x: x['disease_qid'])\n record_group = groupby(self.records, key=lambda x: x['disease_qid'])\n for disease_qid, sub_records in tqdm(record_group):\n self.run_one_disease(disease_qid, sub_records)\n\n\ndef main(write=True, run_one=None):\n omim_qid = wdi_helpers.id_mapper(PROPS['OMIM ID'], prefer_exact_match=True, return_as_set=True)\n omim_qid = {k: list(v)[0] for k, v in omim_qid.items() if len(v) == 1}\n hpo_qid = wdi_helpers.id_mapper(PROPS['Human Phenotype Ontology ID'], prefer_exact_match=True, return_as_set=True)\n hpo_qid = {k: list(v)[0] for k, v in hpo_qid.items() if len(v) == 1}\n\n df = pd.read_csv(\"mitodb.csv\", dtype=str)\n df['disease_qid'] = df.disease.map(omim_qid.get)\n df['phenotype_qid'] = df.hpo.map(hpo_qid.get)\n df.dropna(subset=['disease_qid', 'phenotype_qid'], inplace=True)\n\n records = df.to_dict(\"records\")\n login = wdi_login.WDLogin(user=WDUSER, pwd=WDPASS)\n bot = MitoBot(records, login, write=write, run_one=run_one)\n bot.run()\n\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser(description='run mitodb phenotype bot')\n parser.add_argument('--dummy', help='do not actually do write', action='store_true')\n parser.add_argument('--run-one', help='run one disease, by qid')\n args = parser.parse_args()\n log_dir = \"./logs\"\n run_id = datetime.now().strftime('%Y%m%d_%H:%M')\n __metadata__['run_id'] = run_id\n\n log_name = '{}-{}.log'.format(__metadata__['name'], run_id)\n if wdi_core.WDItemEngine.logger is not None:\n wdi_core.WDItemEngine.logger.handles = []\n wdi_core.WDItemEngine.setup_logging(log_dir=log_dir, log_name=log_name, header=json.dumps(__metadata__),\n logger_name='mitodb')\n\n main(write=not args.dummy, run_one=args.run_one)\n", "license": "mit"}
{"repo_name": "pbreach/pysd", "path": "tests/unit_test_utils.py", "copies": "2", "size": "7923", "content": "from unittest import TestCase\nimport xarray as xr\nimport pandas as pd\nfrom . import test_utils\nimport doctest\n\nclass TestUtils(TestCase):\n\n def test_get_return_elements_subscirpts(self):\n from pysd.utils import get_return_elements\n\n self.assertEqual(\n get_return_elements([\"Inflow A[Entry 1,Column 1]\",\n \"Inflow A[Entry 1,Column 2]\"],\n {'Inflow A': 'inflow_a'},\n {'Dim1': ['Entry 1', 'Entry 2'],\n 'Dim2': ['Column 1', 'Column 2']}),\n (['inflow_a'],\n {'Inflow A[Entry 1,Column 1]': ('inflow_a', {'Dim1': ['Entry 1'],\n 'Dim2': ['Column 1']}),\n 'Inflow A[Entry 1,Column 2]': ('inflow_a', {'Dim1': ['Entry 1'],\n 'Dim2': ['Column 2']})}\n )\n )\n\n def test_get_return_elements_realnames(self):\n from pysd.utils import get_return_elements\n self.assertEqual(\n get_return_elements([\"Inflow A\",\n \"Inflow B\"],\n subscript_dict={'Dim1': ['Entry 1', 'Entry 2'],\n 'Dim2': ['Column 1', 'Column 2']},\n namespace={'Inflow A': 'inflow_a',\n 'Inflow B': 'inflow_b'}),\n (['inflow_a', 'inflow_b'],\n {'Inflow A': ('inflow_a', {}),\n 'Inflow B': ('inflow_b', {})}\n )\n )\n\n def test_get_return_elements_pysafe_names(self):\n from pysd.utils import get_return_elements\n self.assertEqual(\n get_return_elements([\"inflow_a\",\n \"inflow_b\"],\n subscript_dict={'Dim1': ['Entry 1', 'Entry 2'],\n 'Dim2': ['Column 1', 'Column 2']},\n namespace={'Inflow A': 'inflow_a',\n 'Inflow B': 'inflow_b'}),\n (['inflow_a', 'inflow_b'],\n {'inflow_a': ('inflow_a', {}),\n 'inflow_b': ('inflow_b', {})}\n )\n )\n\n def test_make_flat_df(self):\n from pysd.utils import make_flat_df\n\n frames = [{'elem1': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2']),\n 'elem2': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2'])},\n {'elem1': xr.DataArray([[2, 4, 6], [8, 10, 12], [14, 16, 19]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2']),\n 'elem2': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2'])}]\n\n return_addresses = {'Elem1[B,F]': ('elem1', {'Dim1': ['B'], 'Dim2': ['F']})}\n df = pd.DataFrame([{'Elem1[B,F]': 6}, {'Elem1[B,F]': 12}])\n resultdf = make_flat_df(frames, return_addresses)\n\n test_utils.assert_frames_close(resultdf, df, rtol=.01)\n\n def test_visit_addresses(self):\n from pysd.utils import visit_addresses\n\n frame = {'elem1': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2']),\n 'elem2': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2'])}\n\n return_addresses = {'Elem1[B,F]': ('elem1', {'Dim1': ['B'], 'Dim2': ['F']})}\n self.assertEqual(visit_addresses(frame, return_addresses),\n {'Elem1[B,F]': 6})\n\n def test_visit_addresses_nosubs(self):\n from pysd.utils import visit_addresses\n\n frame = {'elem1': 25, 'elem2': 13}\n return_addresses = {'Elem1': ('elem1', {}),\n 'Elem2': ('elem2', {})}\n\n self.assertEqual(visit_addresses(frame, return_addresses),\n {'Elem1': 25, 'Elem2': 13})\n\n def test_visit_addresses_return_array(self):\n \"\"\" There could be cases where we want to\n return a whole section of an array - ie, by passing in only part of\n the simulation dictionary. in this case, we can't force to float...\"\"\"\n from pysd.utils import visit_addresses\n\n frame = {'elem1': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2']),\n 'elem2': xr.DataArray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2'])}\n return_addresses = {'Elem1[A, Dim2]': ('elem1', {'Dim1': ['A'], 'Dim2': ['D', 'E', 'F']})}\n\n actual = visit_addresses(frame, return_addresses)\n expected = {'Elem1[A, Dim2]':\n xr.DataArray([[1, 2, 3]],\n {'Dim1': ['A'],\n 'Dim2': ['D', 'E', 'F']},\n dims=['Dim1', 'Dim2']),\n }\n self.assertIsInstance(list(actual.values())[0], xr.DataArray)\n self.assertEqual(actual['Elem1[A, Dim2]'].shape,\n expected['Elem1[A, Dim2]'].shape)\n # Todo: test that the values are equal\n\n def test_make_coord_dict(self):\n from pysd.utils import make_coord_dict\n self.assertEqual(make_coord_dict(['Dim1', 'D'],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n terse=True),\n {'Dim2': ['D']})\n self.assertEqual(make_coord_dict(['Dim1', 'D'],\n {'Dim1': ['A', 'B', 'C'],\n 'Dim2': ['D', 'E', 'F']},\n terse=False),\n {'Dim1': ['A', 'B', 'C'], 'Dim2': ['D']})\n\n def test_find_subscript_name(self):\n from pysd.utils import find_subscript_name\n self.assertEqual(find_subscript_name({'Dim1': ['A', 'B'],\n 'Dim2': ['C', 'D', 'E'],\n 'Dim3': ['F', 'G', 'H', 'I']},\n 'D'),\n 'Dim2')\n\n self.assertEqual(find_subscript_name({'Dim1': ['A', 'B'],\n 'Dim2': ['C', 'D', 'E'],\n 'Dim3': ['F', 'G', 'H', 'I']},\n 'Dim3'),\n 'Dim3')\n\n def test_doctests(self):\n import pysd.utils\n doctest.DocTestSuite(pysd.utils)\n", "license": "mit"}
{"repo_name": "mayblue9/scikit-learn", "path": "sklearn/datasets/mlcomp.py", "copies": "289", "size": "3855", "content": "# Copyright (c) 2010 Olivier Grisel <[email protected]>\n# License: BSD 3 clause\n\"\"\"Glue code to load http://mlcomp.org data as a scikit.learn dataset\"\"\"\n\nimport os\nimport numbers\nfrom sklearn.datasets.base import load_files\n\n\ndef _load_document_classification(dataset_path, metadata, set_=None, **kwargs):\n if set_ is not None:\n dataset_path = os.path.join(dataset_path, set_)\n return load_files(dataset_path, metadata.get('description'), **kwargs)\n\n\nLOADERS = {\n 'DocumentClassification': _load_document_classification,\n # TODO: implement the remaining domain formats\n}\n\n\ndef load_mlcomp(name_or_id, set_=\"raw\", mlcomp_root=None, **kwargs):\n \"\"\"Load a datasets as downloaded from http://mlcomp.org\n\n Parameters\n ----------\n\n name_or_id : the integer id or the string name metadata of the MLComp\n dataset to load\n\n set_ : select the portion to load: 'train', 'test' or 'raw'\n\n mlcomp_root : the filesystem path to the root folder where MLComp datasets\n are stored, if mlcomp_root is None, the MLCOMP_DATASETS_HOME\n environment variable is looked up instead.\n\n **kwargs : domain specific kwargs to be passed to the dataset loader.\n\n Read more in the :ref:`User Guide <datasets>`.\n\n Returns\n -------\n\n data : Bunch\n Dictionary-like object, the interesting attributes are:\n 'filenames', the files holding the raw to learn, 'target', the\n classification labels (integer index), 'target_names',\n the meaning of the labels, and 'DESCR', the full description of the\n dataset.\n\n Note on the lookup process: depending on the type of name_or_id,\n will choose between integer id lookup or metadata name lookup by\n looking at the unzipped archives and metadata file.\n\n TODO: implement zip dataset loading too\n \"\"\"\n\n if mlcomp_root is None:\n try:\n mlcomp_root = os.environ['MLCOMP_DATASETS_HOME']\n except KeyError:\n raise ValueError(\"MLCOMP_DATASETS_HOME env variable is undefined\")\n\n mlcomp_root = os.path.expanduser(mlcomp_root)\n mlcomp_root = os.path.abspath(mlcomp_root)\n mlcomp_root = os.path.normpath(mlcomp_root)\n\n if not os.path.exists(mlcomp_root):\n raise ValueError(\"Could not find folder: \" + mlcomp_root)\n\n # dataset lookup\n if isinstance(name_or_id, numbers.Integral):\n # id lookup\n dataset_path = os.path.join(mlcomp_root, str(name_or_id))\n else:\n # assume name based lookup\n dataset_path = None\n expected_name_line = \"name: \" + name_or_id\n for dataset in os.listdir(mlcomp_root):\n metadata_file = os.path.join(mlcomp_root, dataset, 'metadata')\n if not os.path.exists(metadata_file):\n continue\n with open(metadata_file) as f:\n for line in f:\n if line.strip() == expected_name_line:\n dataset_path = os.path.join(mlcomp_root, dataset)\n break\n if dataset_path is None:\n raise ValueError(\"Could not find dataset with metadata line: \" +\n expected_name_line)\n\n # loading the dataset metadata\n metadata = dict()\n metadata_file = os.path.join(dataset_path, 'metadata')\n if not os.path.exists(metadata_file):\n raise ValueError(dataset_path + ' is not a valid MLComp dataset')\n with open(metadata_file) as f:\n for line in f:\n if \":\" in line:\n key, value = line.split(\":\", 1)\n metadata[key.strip()] = value.strip()\n\n format = metadata.get('format', 'unknow')\n loader = LOADERS.get(format)\n if loader is None:\n raise ValueError(\"No loader implemented for format: \" + format)\n return loader(dataset_path, metadata, set_=set_, **kwargs)\n", "license": "bsd-3-clause"}
{"id": "316", "url": "https://en.wikipedia.org/wiki/Academy%20Award%20for%20Best%20Production%20Design", "title": "Academy Award for Best Production Design", "text": "The Academy Award for Best Production Design recognizes achievement for art direction in film. The category's original name was Best Art Direction, but was changed to its current name in 2012 for the 85th Academy Awards. This change resulted from the Art Director's branch of the Academy of Motion Picture Arts and Sciences (AMPAS) being renamed the Designer's branch. Since 1947, the award is shared with the set decorator(s). It is awarded to the best interior design in a film.\n\nThe films below are listed with their production year (for example, the 2000 Academy Award for Best Art Direction is given to a film from 1999). In the lists below, the winner of the award for each year is shown first, followed by the other nominees in alphabetical order.\n\nSuperlatives\n\nWinners and nominees\n\n1920s\n\n1930s\n\n1940s\n\n1950s\n\n1960s\n\n1970s\n\n1980s\n\n1990s\n\n2000s\n\n2010s\n\n2020s\n\nSee also\n BAFTA Award for Best Production Design\n Critics' Choice Movie Award for Best Production Design\n\nNotes\n\nReferences\n\nBest Production Design\n\nAwards for best art direction"}
{"text": "The counselor helped the laborer because", "classes": [" he is a very kind person.", " she is a very kind person."], "target": 0, "evaluation_predictions": [-11.801000595092773, -7.630799293518066, -2.5329456329345703, -9.494977951049805, -3.8189189434051514, -7.39968729019165, -1.160144567489624, -4.395509719848633, -1.8475193977355957, -4.942625999450684, -5.369691848754883, -1.0915039777755737, -1.3059463500976562, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"text": "The lawyer talked with the counselor because", "classes": [" she needed to gather additional evidence for the case.", " he needed to gather additional evidence for the case."], "target": 0, "evaluation_predictions": [-11.801000595092773, -7.630799293518066, -2.5329456329345703, -9.494977951049805, -3.8189189434051514, -7.39968729019165, -1.549304723739624, -4.517389297485352, -1.9073556661605835, -5.071595191955566, -5.068202972412109, -0.9425056576728821, -1.316280722618103, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}
{"text": "The driver offered a ride to the teacher but", "classes": [" he refused the offer.", " she refused the offer."], "target": 0, "evaluation_predictions": [-9.440568923950195, -9.033777236938477, -2.5707430839538574, -1.647308349609375, -9.484993934631348, -6.108336448669434, -1.394105076789856, -4.6460065841674805, -0.8255335688591003, -7.153525352478027, -4.077359676361084, -1.5171363353729248, -3.1631827354431152, -1.246666669845581, -1.7835267782211304, -0.6487072706222534, 0.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]}