text
stringlengths
13
30k
{"first": " Do you really think so ? I don't . It will just make us fat and act silly . Remember last time ? ", "second": " I guess you are right.But what shall we do ? I don't feel like sitting at home . ", "labels": 2}
{"first": " I guess you are right.But what shall we do ? I don't feel like sitting at home . ", "second": " I suggest a walk over to the gym where we can play singsong and meet some of our friends . ", "labels": 3}
{"first": " I suggest a walk over to the gym where we can play singsong and meet some of our friends . ", "second": " That's a good idea . I hear Mary and Sally often go there to play pingpong.Perhaps we can make a foursome with them . ", "labels": 4}
{"first": " That's a good idea . I hear Mary and Sally often go there to play pingpong.Perhaps we can make a foursome with them . ", "second": " Sounds great to me ! If they are willing , we could ask them to go dancing with us.That is excellent exercise and fun , too . ", "labels": 1}
{"first": " Sounds great to me ! If they are willing , we could ask them to go dancing with us.That is excellent exercise and fun , too . ", "second": " Good.Let ' s go now . ", "labels": 3}
{"first": " Good.Let ' s go now . ", "second": " All right . ", "labels": 4}
{"first": "Can you do push-ups ? ", "second": " Of course I can . It's a piece of cake ! Believe it or not , I can do 30 push-ups a minute . ", "labels": 1}
{"rel": "/r/Antonym", "arg1": "/c/en/12_hour_clock/n", "arg2": "/c/en/24_hour_clock", "weight": 1.0}
{"rel": "/r/Antonym", "arg1": "/c/en/24_hour_clock/n", "arg2": "/c/en/12_hour_clock", "weight": 1.0}
{"rel": "/r/Antonym", "arg1": "/c/en/ab_extra/r", "arg2": "/c/en/ab_intra", "weight": 1.0}
{"rel": "/r/Antonym", "arg1": "/c/en/ab_intra/r", "arg2": "/c/en/ab_extra", "weight": 1.0}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] spermiogenesis [Question] ", "output": "the size of sperm is sloughed off during which phase?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] germinal ridges [Question] ", "output": "gonad precursors are what structures?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] seminiferous tubules [Question] ", "output": "before puberty, testicular sex cords develop lumens to become?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] spermatogonia [Question] ", "output": "at puberty, primordial germ cells in males become what?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] provide support and nutrition to sperm cells [Question] ", "output": "what is the function for sertoli cells?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] incomplete cytokenesis via mitosis [Question] ", "output": "how do spermatogonia divide?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] meiosis [Question] ", "output": "how do spermatogonia differentiate into primary spermatocytes?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] the first meiotic division [Question] ", "output": "what event causes primary spermatocytes to become secondary spermatocytes?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] 22 days [Question] ", "output": "how long is the prophase of primary spermatocytes?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"task": "0b8f4f10_Flashcards_about_Gametogenesis__Question", "input": "[Answer] spermatids [Question] ", "output": "after the second meiotic division, secondary spermatocytes are called what?", "options": [], "pageTitle": "Flashcards about Gametogenesis", "outputColName": "Question", "url": "http://www.studystack.com/flashcard-144780", "wdcFile": "36/1438042988598.68_20150728002308-00126-ip-10-236-191-2_744629413_3.json"}
{"text": "Q: Which is more likely?\n1. Michael is an accountant.\n2. Michael is an accountant and is careful.\nA:", "classes": [" 1", " 2"], "target": 0, "evaluation_predictions": [-7.8936662673950195, -2.6204512119293213, -4.781426429748535, -2.188048839569092, -2.2053658962249756, -2.6022567749023438, -2.4834039211273193, -3.2248971462249756, -3.8368873596191406, -0.609182596206665, -7.56729793548584, -3.958899974822998, -3.5944652557373047, -7.354846954345703, -1.9579206705093384, -0.22800612449645996, -0.06297071278095245, -0.001510432455688715, -0.28279221057891846, -0.4360524117946625, -1.4757812023162842, -1.7450231313705444, -1.2722169160842896, -2.1741068363189697, -9.74331283569336, -3.1280717849731445, -0.04653645679354668, -2.4997823238372803, -0.20503897964954376, -2.294696092605591, 0.0, -100.0, -100.0, -100.0]}
{"text": "Question: Which is more likely?\nA. Andrew is a scientist and is smart.\nB. Andrew is a scientist.\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-7.8936662673950195, -2.6204512119293213, -4.781426429748535, -2.188048839569092, -2.2053658962249756, -2.6022567749023438, -2.4834039211273193, -3.2248971462249756, -3.8368873596191406, -0.609182596206665, -7.56729793548584, -3.958899974822998, -3.5944652557373047, -7.354846954345703, -1.9579206705093384, -0.22800612449645996, -0.06297071278095245, -0.001510432455688715, -0.28279221057891846, -0.4360524117946625, -1.4757812023162842, -1.7450231313705444, -1.2722169160842896, -2.1741068363189697, -9.74331283569336, -3.1280717849731445, -0.04653645679354668, -2.4997823238372803, -0.20503897964954376, -2.2005808353424072, 0.0, -100.0, -100.0, -100.0]}
{"text": "Question: Which is more likely?\nA. Andrew is a scientist and is smart.\nB. Andrew is a scientist.\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -1.5830678939819336, 0.0, -100.0, -100.0, -100.0]}
{"text": "Question: Which is more likely?\nA. Andrew is a scientist and is smart.\nB. Andrew is a scientist.\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -0.9841852784156799, 0.0, -100.0, -100.0, -100.0]}
{"text": "Q: Which is more likely?\n1. Michael is an accountant.\n2. Michael is an accountant and is careful.\nA:", "classes": [" 1", " 2"], "target": 0, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -1.5830678939819336, 0.0, -100.0, -100.0, -100.0]}
{"text": "Q: Which is more likely to be true?\n1. Jessica is a teacher.\n2. Jessica is a teacher and is patient.\nA:", "classes": [" 1", " 2"], "target": 0, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -0.9841852784156799, 0.0, -100.0, -100.0, -100.0]}
{"text": "Question: Which is more likely?\nA. Andrew is a scientist and is smart.\nB. Andrew is a scientist.\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -1.5830678939819336, 0.0, -100.0, -100.0, -100.0]}
{"text": "Q: Which is more likely to be true?\n1. Jessica is a teacher.\n2. Jessica is a teacher and is patient.\nA:", "classes": [" 1", " 2"], "target": 0, "evaluation_predictions": [-8.343938827514648, -1.126341700553894, -5.631369590759277, -2.2601852416992188, -1.7647343873977661, -2.347611904144287, -2.175929307937622, -3.4101321697235107, -3.5114545822143555, -1.8469656705856323, -8.238725662231445, -4.905284881591797, -2.0771679878234863, -7.684255599975586, -2.0640511512756348, -2.5535101890563965, -6.219785690307617, -2.770754814147949, -0.4089832007884979, -0.13399696350097656, -0.002304519060999155, -0.17501555383205414, -0.23239560425281525, -0.6009291410446167, -1.1228164434432983, -4.661308288574219, -0.2048770934343338, -4.314413070678711, -0.09359461069107056, -0.9841852784156799, 0.0, -100.0, -100.0, -100.0]}
{"text": "Q: Which is more likely to be true?\n1. Jessica is a teacher.\n2. Jessica is a teacher and is patient.\nA:", "classes": [" 1", " 2"], "target": 0, "evaluation_predictions": [-7.8936662673950195, -2.6204512119293213, -4.781426429748535, -2.188048839569092, -2.2053658962249756, -2.6022567749023438, -2.4834039211273193, -3.2248971462249756, -3.8368873596191406, -0.609182596206665, -7.56729793548584, -3.958899974822998, -3.5944652557373047, -7.354846954345703, -1.9579206705093384, -0.22800612449645996, -0.06297071278095245, -0.001510432455688715, -0.28279221057891846, -0.4360524117946625, -1.4757812023162842, -1.7450231313705444, -1.2722169160842896, -2.1741068363189697, -9.74331283569336, -3.1280717849731445, -0.04653645679354668, -2.4997823238372803, -0.20503897964954376, -2.294696092605591, 0.0, -100.0, -100.0, -100.0]}
{"text": "Question: Which is more likely?\nA. Andrew is a scientist and is smart.\nB. Andrew is a scientist.\nAnswer:", "classes": [" A", " B"], "target": 1, "evaluation_predictions": [-7.8936662673950195, -2.6204512119293213, -4.781426429748535, -2.188048839569092, -2.2053658962249756, -2.6022567749023438, -2.4834039211273193, -3.2248971462249756, -3.8368873596191406, -0.609182596206665, -7.56729793548584, -3.958899974822998, -3.5944652557373047, -7.354846954345703, -1.9579206705093384, -0.22800612449645996, -0.06297071278095245, -0.001510432455688715, -0.28279221057891846, -0.4360524117946625, -1.4757812023162842, -1.7450231313705444, -1.2722169160842896, -2.1741068363189697, -9.74331283569336, -3.1280717849731445, -0.04653645679354668, -2.4997823238372803, -0.20503897964954376, -2.2005808353424072, 0.0, -100.0, -100.0, -100.0]}
{"text": "Donna: Bohemian Rapsody Central Cinema tomorrow 8pm\r\nDonna: Are u in?\r\nMichael: totally!\r\nMichael: great idea\r\nDonna: OK, see you in front of the main entrance at 7:50", "target": "Tomorrow Donna and Michael will meet in front of the main entrance of Central Cinema at 7:50 pm to watch Bohemian Rapsody at 8.", "evaluation_predictions": [2, 0, 6766, 2133, 35, 35118, 811, 248, 7527, 9956, 1505, 20036, 3859, 290, 1685, 4, 988, 35, 4940, 4, 14997, 35, 4954, 6, 192, 47, 11, 760, 9, 5, 1049, 7266, 23, 262, 35, 1096, 4, 988, 8, 14997, 35, 2860, 1114, 328, 14997, 35, 3945, 1717, 11, 116, 988, 35, 41380, 328, 1599, 75, 4309, 7, 836, 110, 2280, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "John: Anything from the store?\r\nTracy: Hmmm... there was this goat cheese last time that I really liked. You remember which one.\r\nJohn: I think I do. Anything else?\r\nTracy: Maybe milk, cause we're running out. And like a couple of rolls, the grainy ones.\r\nTracy: oh and tissues.\r\nJohn: Ok, roger that.", "target": "John will buy the goat cheese Tracy liked, milk, a couple of grainy rolls, and tissues.", "evaluation_predictions": [2, 0, 10567, 35, 21893, 31, 5, 1400, 116, 50188, 15340, 35, 289, 41311, 734, 89, 21, 42, 24791, 7134, 94, 86, 14, 38, 269, 6640, 4, 370, 2145, 61, 65, 116, 610, 35, 38, 206, 38, 109, 4, 21893, 1493, 116, 50142, 15340, 35, 5359, 5803, 6, 1303, 52, 214, 878, 66, 4, 178, 101, 10, 891, 9, 12357, 6, 5, 10924, 219, 1980, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Jimmy: so how is the dispute between your countries going? hihi\nJimmy: I think it's a never-ending epic\nJose: Actually, it seems it's better now\nJimmy: is it?\nDean: yup. they held a referendum in Guatemala last year\nJimmy: only Guatemala? I thought the referendums were supposed to be held simultaneously\nHugo: yes, but they decided to change it\nJimmy: so what about Belize?\nHugo: Belize will hold a referendum in April 2019\nDean: at least it's the official plan\nJimmy: wow, that's amazing after a few centuries hahaha\nDean: true, but it's not settling the dispute, they will just send the case to the international tribunal\nJimmy: I see, it's interesting", "target": "Two countries haven't been able to reach agreement for centuries. There was a referendum in Guatemala last year. According to the plan, Belize will hold a referendum in April 2019. However, it's not settling the dispute and they'll send the case to the international tribunal.", "evaluation_predictions": [2, 0, 35693, 35, 98, 141, 16, 5, 4464, 227, 110, 749, 164, 116, 1368, 4001, 118, 33011, 35, 18894, 6, 24, 1302, 24, 18, 357, 122, 4, 35693, 35, 16, 24, 116, 33011, 35, 3216, 6, 24, 16, 4, 51, 547, 10, 5047, 11, 17088, 94, 76, 4, 5905, 35, 129, 17088, 116, 38, 802, 5, 30114, 1187, 8014, 58, 3518, 7, 28, 547, 11586, 4, 40710, 139, 35, 4420, 6, 53, 51, 1276, 7, 464, 24, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Ben: I'm waiting downstairs\nTom: Adam is shitting\nAdam: Give me 5 more minutes!!!", "target": "Ben is waiting downstairs.", "evaluation_predictions": [2, 0, 17521, 35, 38, 437, 2445, 28239, 28239, 4, 15691, 35, 3086, 16, 1481, 9451, 4, 24671, 35, 12192, 162, 195, 55, 728, 16506, 1664, 35, 38, 581, 28, 2445, 28239, 4, 1560, 35, 3086, 6, 492, 162, 292, 55, 728, 4, 3086, 35, 38, 348, 300, 7, 213, 4, 1664, 35, 15321, 28239, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Jimmy: get me some fries too!!\r\nDan: okay, ketchup?\r\nJimmy: and mayo\r\nDan: ok!", "target": "Dan will get Jimmy some fries with ketchup and mayo.", "evaluation_predictions": [2, 0, 0, 35693, 35, 120, 162, 103, 22391, 350, 12846, 2503, 35, 8578, 6, 449, 36862, 116, 5905, 35, 8, 189, 139, 116, 2503, 35, 15983, 328, 5905, 35, 178, 449, 36862, 350, 328, 2503, 35, 4954, 328, 35693, 35, 178, 189, 139, 350, 12846, 25887, 35, 15983, 12846, 5905, 35, 2315, 162, 103, 449, 36862, 6, 350, 12846, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Eve: Has anyone seen the new HP film?\r\nAlice: I saw it with Phillip yesterday\r\nEve: And, how did you like it?\r\nAlice: I really liked it. Phillip a lot less :P\r\nCarla: No spoilers! I am planning on going this weekend\r\nEve: Great, I am going with a friend from my studies. Care to join us?\r\nCarla: Saturday or Sunday?\r\nEve: We aren't sure yet, but we want 2D, so not a lot of choice. Maybe Saturday at 16:50?\r\nCarla: Works for me :) Later we can go to the main square for some hot wine?\r\nEve: Great idea ;) Will you join us Alice?\r\nAlice: I wish I could, but I am going to that wedding I mentioned last time :(\r\nCarla: Uuuu, be sure to find me a future husband among Phillips family ;)\r\nAlice: As far as I know we will be the youngest couple there :p\r\nCarla: I don't mind some old and wealthy guy ;)", "target": "Phillip and Alice saw the new HP film yesterday. She liked it more than him. Eve is going to see it with friends from studies on Saturday at 16:50. Carla will join them. Alice can't go because she is going to the wedding. ", "evaluation_predictions": [2, 0, 717, 548, 35, 6233, 1268, 450, 5, 92, 13064, 822, 116, 41553, 35, 38, 794, 24, 19, 14142, 2350, 4, 6716, 35, 2860, 6, 38, 524, 164, 19, 10, 1441, 31, 127, 3218, 4, 41553, 35, 3800, 7, 1962, 201, 116, 6716, 35, 166, 2025, 75, 686, 648, 6, 53, 52, 236, 132, 495, 6, 98, 45, 10, 319, 9, 2031, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Eva: I've signed the agreement\r\nTina: You did? omg so happy for ya\r\nEva: Thanks:) I am super excited\r\nBarb: Omg babe! awesome!\r\nEva: hahaha thanks! I didn't know it's gonna be so emotional!\r\nBarb: Hell yeah! It's kinda binding for 25 years you know, kinda scary\r\nEva: I know, but, Mat and I are getting married so after that we're gonna consolidate or sth and pay it off together faster\r\nBarb: You guys are getting married? \r\nEva: Yes we are! you didn't know? \r\nBarb: First time hearing this\r\nTina: No worries I just found out myself\r\nBarb: Anyway! Congrats love! You guys are awesome!\r\nEva: Thank you so much! It's an exciting time\r\nBarb: Well I hope we're all invited for the housewarming party\r\nEva: Of course! I'll be sending emails", "target": "Eva signed the agreement. She and Mat are getting married. They will organize the housewarming party in their new flat.", "evaluation_predictions": [2, 0, 46672, 35, 38, 348, 1419, 5, 1288, 13, 564, 107, 4, 4101, 8, 38, 32, 562, 2997, 98, 71, 14, 52, 214, 6908, 19752, 50, 1690, 298, 8, 582, 24, 160, 561, 3845, 4, 15720, 35, 440, 7697, 38, 95, 303, 66, 2185, 4, 12249, 28814, 657, 328, 370, 1669, 32, 6344, 328, 370, 214, 6344, 328, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "John: I'm starving. What's for dinner?\r\nJane: Whatever you cook :-)\r\nJohn: Damn! I best get some take-aways.", "target": "John will get a take-away.", "evaluation_predictions": [2, 0, 10567, 35, 38, 437, 31323, 4, 653, 18, 13, 3630, 116, 35903, 35, 11999, 47, 7142, 48433, 610, 35, 41163, 328, 38, 275, 120, 103, 185, 12, 17119, 4, 653, 109, 47, 33, 11, 5, 22087, 116, 7343, 35, 653, 18, 15, 5, 5765, 116, 610, 35, 38, 218, 75, 216, 4, 11999, 47, 14166, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Elena: Hi! What's up?\r\nAnn: Nothing much, I'm working.\r\nElena: Oh, I see. When will you be free?\r\nAnn: I'm off at 5. Wanna grab some coffee?\r\nElena: Yeah, it's been ages, I have to talk to you.\r\nAnn: Great, is everything OK?\r\nElena: Yeah, it's just Robert, he's acting weird.\r\nAnn: Again? I thought you guys figured everything out.\r\nElena: I thought so too... But he keeps getting these \"thoughts\", you know. About the future and stuff and he acts weirder than normal.\r\nAnn: Yeah, he's always been like that, right? Getting worked up over nothing. \r\nElena: That's the thing. He gets mad over some things he made up in his mind and he blames me for it!\r\nAnn: You have to be patient, you know what he went through last year.\r\nElena: I know, but I stood by him, every step of the way. And he acts as if I didn't understand.\r\nAnn: Honey, I'm sure it will all get better, we'll talk it through this afternoon, but I really need to get back to work, sorry.\r\nElena: Sure thing, sorry I kept you.\r\nAnn: Don't mention it, it's just my boss is looking. \r\nElena: LOL, tell him you're counseling your crazy friend.\r\nAnn: I'm not sure it's the best way to suck up to your boss xD\r\nElena: haha, I figure it's not. See you!", "target": "Ann and Elena arrange meeting for a coffee around 5, after Anna has finished work. Elena would like to talk about Robert, as he's acting weird, having 'thoughts' about the future and blaming her for some things he made up. She needs to be very patient with him. ", "evaluation_predictions": [2, 0, 9682, 4242, 35, 12289, 6, 24, 18, 57, 4864, 6, 38, 33, 7, 1067, 7, 47, 4, 85, 18, 95, 1738, 6, 37, 18, 3501, 7735, 4, 91, 4719, 562, 209, 22, 18401, 1872, 1297, 47, 216, 4, 1936, 5, 499, 8, 2682, 8, 37, 4504, 52, 853, 3624, 87, 2340, 4, 91, 1516, 7758, 81, 103, 383, 37, 156, 62, 11, 39, 1508, 8, 37, 23079, 162, 13, 24, 328, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"token": ")", "frequency": 18219424}
{"token": "(", "frequency": 14618306}
{"token": "\"", "frequency": 7690671}
{"token": ":", "frequency": 6227393}
{"sent_id": "tid.519476716902051840.2", "tokens": ["To", "danes", "so", "zgolj", "slabe", "igralke", "."], "norms": ["To", "danes", "so", "zgolj", "slabe", "igralke", "."], "lemmas": ["ta", "danes", "biti", "zgolj", "slab", "igralka", "."], "xpos_tags": ["Pd-nsn", "Rgp", "Va-r3p-n", "Q", "Agpfpn", "Ncfpn", "Z"], "feats": ["Case=Nom|Gender=Neut|Number=Sing|PronType=Dem", "Degree=Pos", "Mood=Ind|Number=Plur|Person=3|Polarity=Pos|Tense=Pres|VerbForm=Fin", "_", "Case=Nom|Degree=Pos|Gender=Fem|Number=Plur", "Case=Nom|Gender=Fem|Number=Plur", "_"], "upos_tags": [70, 25, 48, 55, 5, 1, 65]}
{"query": "Java launch error selection does not contain a main type", "positive": ["Error: Selection does not contain a main type", "Selection does not contain any Java files from eclipse"], "negative": ["Selection Sort in Java", "App used to launch now it does not", "Eclipse: \"selection does not contain a main type\" error when main function exists", "Eclipse Main program Launch error", "Why do I get the \"Selection does not contain a main type\" when my class has a main?", "Can't launch app with ParseLoginActivity", "Date Selection in Java", "Launch file from Java", "Selection does not contain main type - error", "how can i run a code just on first launch?", "Eclipse launch existing launch-configuration", "Code won't launch", "How to call launch() more than once in java", "Launch application Java", "Selection Sort, For Java", "Selection does not contain a main Type - Eclipse Run Error", "Selection Sort (Java)", "JComboxBox selection", "Launch Java class from another Java application", "Selection using a string array (java)", "Launch main method from object with type \"Class<?>\"", "Return Type Based on User Selection?", "Eclipse Java Launch Error: Selection does not contain a main type", "Eclipse error when trying to run Java application - \"Selection does not contain a main type\" - But it does?", "Eclipse saying selection does not contain a main type?", "Launch powershellscript in java application", "Create new instance on launch"]}
{"query": "No active contexts for scope type javax.enterprise.context.RequestScoped when invoking a bean from a thread", "positive": ["Why am I getting a WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped exception?"], "negative": ["Working with different contexts with JUEL", "Not getting request parameters in @RequestScoped ManagedBean", "Variable of same class in separate contexts", "@Remote EJB which uses @RequestScoped CDI bean", "Difference between Java Bean and Enterprise Java Beans?", "REST endpoint - Singleton vs RequestScoped", "What is the difference between using RequestScoped (faces) and RequestScoped (context)", "method-invoking Spring bean", "Difference between Bean, Java Bean and Enterprise Java Beans", "WebSocket endpoint and CDI injection: No active contexts for scope RequestScoped", "@Stateless vs @RequestScoped", "JPA's EntityManager should be RequestScoped?", "What is an Enterprise Java Bean really?", "Jersey - Inject variable from filter as RequestScoped", "Inject a @RequestScoped bean twice as different instances", "Enterprise App and the Enterprise App Client", "selected bean is not in the same module or enterprise application", "Enterprise Library DAAB for JAVA?", "Cleaning up a @RequestScoped object?", "Downloading and adding javax.enterprise.context.RequestScoped to my project", "HttpServletRequest injection on RequestScoped bean CDI", "Testing a project using Guice Servlet: How to bind out-of-scope RequestScoped instances?", "WebBeans context with scope type annotation @RequestScoped does not exist within current thread", "How do i get file path of my file in java enterprise application?", "Can I start a ManagedThread in a Singleton Enterprise Java Bean?", "the package javax.enterprise.context is missing after glassfish update", "JSF2: Pass objects from one requestscoped bean into another Requestscoped bean?", "How to use RequestScoped objects within singleton jersey interceptor?", "Is there a way to make a bean thread-scope?"]}
{"query": "Using Java To Download Files From a HTTPS URL", "positive": ["Download file from HTTPS server using Java"], "negative": ["Java how to find out if a URL is http or https?", "Simple Java HTTPS server", "from http to https", "Java: download web content from Google https", "Download file from HTTPS in browser on android", "where can i find an example of how to setup https on java where https is not supported", "VirusTotal HTTPS connection Java", "Download file over HTTPS", "how to do HTTPS post/get in java.", "How to save the file from HTTPS url in JAVA?", "How to open a stream to httpS URL", "What should I do to make my Java web application to use HTTPS?", "Java HTTPS file download?", "HTTPS web request in Java", "connect to a HTTPS url and post to it", "How to get response code from a Https Url using java", "WDSL2Java exception when I run it on https URL", "Java https server", "Handle HTTPS Tunnling using java", "How do I use a local HTTPS URL in java?", "How to download files without making application GUI freeze", "How do I login and download a file from a https web page from Java?", "How to make a https post in Java?", "How to get xml from https url on Android?", "Java connection to a https URL", "Using HTTPS with REST in Java", "HTTPS download file error android 4.4", "Download images from a HTTPS URL in Java", "Spring Security Https - Error when try to login with https"]}
{"query": "Displaying a 2D array of integers as an image in Java", "positive": ["How to convert a 2d array of integers to an image in java?"], "negative": ["Storing integers from file to 2D array", "Displaying the elements of 2d array", "Messup with 2D string array in java", "java - displaying a list", "Why doesn't my 2D array displaying properly and doesn't display input", "int[] Array displaying", "Image not displaying with random", "Displaying image from separate java file", "Java file to 2D array", "image not displaying in java frame", "Array is not displaying (Java)", "Displaying change java", "Displaying an image, Java", "Java 2D array encirclement", "Displaying Image in Java", "2D array in Java", "Java 2D array error", "Insert integers into 2d array", "Convert vector of integers into a 2D array", "How do I print a 2d array?", "Java: Image Not Displaying", "My image is not displaying in my list", "Displaying an Image Android", "Android displaying image from Database", "displaying image in java, no main class found", "Displaying information from a 2d array", "displaying index array", "Error in displaying values"]}
{"query": "How do I configure Maven for offline development?", "positive": ["How do I configure Ivy to be used offline?"], "negative": ["Use maven offline", "Offline Javadoc Server", "GWT/Web Java offline application example", "Offline Java Documentation", "could the first ever maven build be made offline?", "Android - application depending on own api - server offline", "How do i view or access java docs offline?", "javadoc location for eclipse offline", "Can I \"see\" Java Standard Libraries Offline", "Get User online/offline state", "Check if Offline with GWT", "Fierebase and Java offline storage", "GVM Always Offline", "Caching Maven parent in offline build", "Maven + javadoc: add offline links", "Converting user to an offline user?", "How can i run this Applet offline?", "Is it possible to run maven in offline mode?", "offline image search in java", "How to know if app user is offline android app?", "Maven doesn't download dependencies: \"The repository system is offline\"", "Library Development with Maven", "Get data from Parse server for offline usage", "Connect Web application to an offline compiler (Java/Python)", "Creating an offline map on Android", "Is there a maven command line option for offline mode?", "Download maven project dependencies to build offline later", "How to Cache Json data to be available offline?"]}
{"query": "Spring Security Logout doesn't work with Spring 4 CORS", "positive": ["Spring Data Rest and Cors"], "negative": ["Spring Security remember me logout issue", "Login Logout use case in Spring security", "Spring Security - Simple CORS authentication error", "Which way is correct for setting CORS in new Spring?", "CORS doesn't work for different url", "how to correctly logout user in spring security", "Spring Security login/logout problems", "How to add logout functionality in spring security", "spring security : logout does not work when having long relative path", "Spring Security Logout", "Logout is not working in Spring Security", "Spring security logout call", "Spring Security - cannot logout", "How to no redirect to another page when user logout in spring security", "Spring Security: 404 on logout", "Spring security logout not working because of CORS", "Spring security CORS Filter", "Logout through spring-security code", "Doing CORS manually", "Spring Data REST (2.4.4.RELEASE) and CORS", "Custom logout URL with Spring Security", "Redirect for logout Spring Security", "CORS thetransactioncompany does not work for one specific path", "spring security j_spring_security logout problem", "CORS implementation with Spring 3.x", "Spring, CORS, and j_spring_security_logout", "Spring security logout goes to j_spring_security_logout", "Spring Security logout issues", "Spring security login and logout"]}
{"query": "How to check if resultset has one row or more?", "positive": ["Java ResultSet how to check if there are any results"], "negative": ["How to get data from a specific row in using a ResultSet object?", "Need help for ResultSet in java", "Resultset To List", "How to get row count using ResultSet in Java?", "ResultSet to Array", "Working with a ResultSet", "Check ResultSet values one by one", "ResultSet to String java?", "Error while getting resultset", "Resultset get all values", "Resultset within resultset", "ResultSet update row is not working", "ResultSet doesn't return all the values", "Resultset to list", "ResultSet is from UPDATE. No Data", "How to return 2 ResultSet?", "How to get only the first row from a java.sql.ResultSet?", "Why ResultSet isn't null,But I can't get data from the ResultSet", "How to check if Resultset empty or not", "Do I need next() for a ResultSet with one row?", "Do not update row in ResultSet if data has changed", "get ResultSet into JTxtField", "Java:ResultSet error", "Any way to return a ResultSet in Java?", "Check if ResultSet is empty in Java", "Get value from ResultSet Java", "Using Resultset in Java Program", "Difference between ResultSet.TypeForwardOnly and ResultSet.TypeScrollable", "ResultSet in Java"]}
{"query": "JavaFX is now out: Are Applets and Java Desktop officially dead/dying?", "positive": ["Is JavaFX a replacement for Java Applets?"], "negative": ["Dead Code Error in Java", "Applets in Java", "Why do applets not need a main()?", "Session dying when using curl from command line", "Why is this code dying on Windows?", "Java+Tomcat, Dying database connection?", "I can't run my own applets in browser", "Why is my RMI server dying after 20 hours", "Does Java cache applets?", "what is dead code ?", "Java applets run in web browser", "How does java run its applets in the browser?", "What's the difference between http://localhost:8000/ and http://127.0.0.1:8000/ for Java Applets", "Is there a way to tell if a join exits from a timeout or thread dying?", "How to run Applets on Android?", "How to create Java applets?", "Issues running Java applets", "Understanding applets", "Where did all the java applets go?", "application dying at port creation", "Convert Application to Applets", "How does Eclipse run .java files as applets?", "How do you debug Java Applets?", "Java Applets and HTML", "Why is this \"if\" a \"dead code\"?", "Tomcat7 dying, nothing in the logs", "Applets not working in Browser", "What Applets Can and Cannot Do", "Images in applets"]}
{"query": "How to Sort an Arraylist of Date in ascending and descending order which is in String format", "positive": ["How to Sort Date in descending order From Arraylist Date in android?"], "negative": ["sort array of objects in descending order", "sort arraylist in ascending order", "Find out which row is sorted and if it is ascending or descending", "print range of integers in descending or ascending order in java", "Ascending / Descending order in object array using element length", "Sorting Custom Object Price Values in Ascending and Descending order", "Sort ArrayList of Strings in descending order", "How to sort ArrayList in descending order", "Design a compareTo that can sort in ascending or descending order", "How to sort List of string with delimiters by ascending and descending order", "How to sort ArrayList<Object> in Ascending order android", "Sort List based on conditions (ascending or descending)", "Sort ArrayList in descending order", "Ascending order Sorted array is getting printed in descending order?", "How to print a descending/ascending number of spaces in Java?", "Java sort list object by date ascending", "How do I use a method to input an array in ascending and descending order?", "Sort Ascending or Descending inside a Bubble-Sort", "how to i change this insertion sort from ascending to descending - java", "Sort all even numbers in ascending order and then sort all odd numbers in descending order in a collection", "How to sort the string number in descending order?", "Sorting List ascending and descending android java", "Will you get descending order if you reverse list of objects which is sorted by ascending order?", "How to sort an arrayList with string in descending order", "How can I sort one column by ascending and another by descending in Spring Data?", "Ascending order and Descending Java", "Quick Sort Sorts Descending Not Ascending", "Iterator with descending and ascending order does not work", "sort arraylist with key ascending"]}
{"query": "Why would one declare a Java interface method as abstract?", "positive": ["Do we need to declare interface methods as abstract", "In Java, when should I use an abstract method in an interface?"], "negative": ["Interface or Abstract class", "When should I declare abstract methods?", "Same method in Interface and Abstract class", "Java abstract interface", "What should I declare my object with when the class has an interface and a abstract superclass?", "interface/abstract class", "Abstract Data Type and Interface", "Why declare an interface as abstract?", "Java abstract class and interface", "What (not) to declare when implementing an interface with an abstract class?", "Java interface and abstract class", "what is a abstract method on a interface in java", "Abstract interface", "When to use abstract class or interface?", "Java Interface\\abstract class constriction", "Abstract and Interface in java", "Is a Java interface an abstract class?", "Why use abstract class and not interface?", "Can't declare an abstract method private", "Do I need to declare methods of abstract class in respective interface?", "interface with in an abstract class", "Java - abstract class and interface", "Using Interface and Abstract class", "Abstract class return in interface", "abstract class or interface", "Abstract class ,class, interface", "Java abstract method and interface", "How to declare abstract method in non-abstract class"]}
{"labels": 1, "text": "Though the sizing was correct, the back was so stiff that it rubbed the heels of my feet raw within hours."}
{"labels": 0, "text": "I bought two pairs of these and made the mistake of throwing away the boxes. Now I'm stuck with shoes I cannot wear.<br />They are WAY too large and won't stay on my feet. I walk right out of them. Had to go into a shoe store next to the movie theaterl to buy a pair of shoes I could walk in before a movie started because I could not even walk."}
{"labels": 3, "text": "If you like flip-flops, these are the best, in my opinion. They are durable and comfortable (as far as flip-flops go)."}
{"labels": 1, "text": "i returned them because the length was fine but the straps were baggy and not adjustable, couldn't wear them at all"}
{"labels": 3, "text": "They will be perfect once they are stretched out. The insides are very comfy!"}
{"labels": 4, "text": "Great shoes for racquetball according to my husband for whom I ordered these."}
{"labels": 0, "text": "The lenses fit in my frames properly. I have 20/40 vision and these lenses give me a headache and make me dizzy like being drunk and meticulously placing one foot in front of the other due to depth perception issues. It's like wearing prescription lenses without needing them. The packaging and cleaning The packaging is wonderful and even includes a cleaning cloth. Maybe I got a bad set?"}
{"labels": 1, "text": "Shoes are too big overall."}
{"labels": 3, "text": "I was recommended to get these boots by a Guide in Newfoundland for a hunt this fall. Since no stores here locally can purchase these I am going off reviews and online research.<br />I ordered a size 10 (US) for my normal size, and for my hunting colleague to try who also uses the same size. They are definitely 1 size larger than normal sizing in US. The boots are very lightweight, which comes with the lack of support and rigidness. I will be ordering a size 9 though, as they do appear to be a quality made boot."}
{"labels": 4, "text": "Size is perfect and Amazon maintain the delivery schedule."}
{"text": "Nick: You look absolutely gorgeous and have a lovely smile. \r\nNick: Would love to get to know you a bit more. How about we meet up for a drink sometime?\r\nJane: Hmmm... You're shooting a bit above your range aren't you?\r\nNick: Why would you think that hon?\r\nJane: Because I'm not that desperate.\r\nNick: That was a bit below the belt.\r\nNick: You're nice but you're not THAT hot.\r\nJane: Oh is your poor little dick shriveling at the thought?\r\nNick: Actually I'll take it back. Forget about the drink.\r\nNick: Forget I ever wrote to you.\r\nJane: Bye loser!\r\nNick: Fucking bitch!\r\nJane: You're welcome!", "target": "Nick finds Jane pretty and invites her for a drink to get to know her better. Jane rejects Nick and is unpleasant to him. Nick suggests Jane to forget about their conversation.", "evaluation_predictions": [2, 0, 0, 0, 25602, 1072, 7, 972, 62, 13, 10, 4076, 19, 7343, 6, 53, 79, 4265, 37, 18, 45, 14, 2131, 4, 2651, 1239, 5, 4076, 124, 8, 31928, 3699, 69, 6, 53, 16766, 7, 3116, 7, 69, 655, 456, 4, 7343, 2446, 123, 13, 5, 4076, 4, 2651, 1519, 69, 10, 32594, 4, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Kate: I've just heard you want to sell your flat?! \r\nRob: That's true. Do you want to buy it?\r\nKate: Ha ha! I wish.. \r\nRob: I'll give you a discount ;)\r\nKate: Sure. You moved in a year ago or so?! Why do you wanna sell it?\r\nRob: We're thinking about having a baby and it is too small.\r\nKate: It's not that bad. Mine is smaller and I have two.\r\nRob: There's no room for a cot in our bedroom.\r\nKate: You're right. So are you looking for two bed now?\r\nRob: Three bed would be perfect so that we won't have to move out again when we decide to have another baby. \r\nKate: That's sounds reasonable.\r\nRob: I know. It just the prices.. total madness!!!\r\nKate: I can only imagine. It's getting more expensive year after year. \r\nRob: I've got a friend who's relocating to another city so want to sell his flat ASAP and offers a good price. We're seeing him tomorrow. \r\nKate: Good luck with that! ;)\r\nRob: Fingers crossed! ;)", "target": "Rob wants to sell his flat, because it's too small. Rob will meet a friend tomorrow who has a flat to sell.", "evaluation_predictions": [2, 0, 0, 0, 18776, 16, 2183, 39, 3269, 25, 24, 18, 350, 650, 13, 123, 8, 39, 1141, 7, 33, 10, 1928, 4, 91, 1410, 11, 10, 76, 536, 4, 3005, 16, 1782, 10, 1441, 54, 18, 6258, 18106, 7, 277, 343, 3859, 8, 1523, 10, 205, 425, 13, 39, 3269, 4, 1437, 1437, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Pedro: batman or superman??\r\nAlex: honestly.. neither\r\nPedro: WHAT??\r\nAlex: i honestly like the flash\r\nPedro: whats so good about the flash :P\r\nAlex: duuude, he can do almost anything\r\nPedro: not anything\r\nAlex: yea im sure batman can run as fast -_-\r\nPedro: superhuman speed? thats your pitch?\r\nAlex: that speed opens up the whole multiverse for him.. you seriously dont get how powerful he can be\r\nPedro: yeah i get your point", "target": "Alex prefers the Flash to Barman and Superman thanks to his speed.", "evaluation_predictions": [2, 0, 0, 0, 16804, 3829, 5, 7462, 357, 87, 17923, 4, 91, 4265, 14, 17923, 18, 2078, 5699, 62, 5, 1086, 7268, 32273, 13, 123, 8, 14, 37, 64, 109, 818, 932, 4, 12090, 630, 75, 120, 141, 2247, 17923, 64, 28, 4, 91, 630, 75, 206, 14, 17923, 64, 422, 25, 1769, 25, 123, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Jane: Hey\r\nMartin: Whats up\r\nMaria: Hey\r\nJane: Anyone going to Value Village? \r\nJane: I am getting halloween costumes with my sister\r\nJane: If anyone wants to join\r\nConnor: I got mine today so thanks\r\nConnor: At Value Village\r\nJane: I am going with u ok? priv msg\r\nJane: ok ok", "target": "Connor bought his halloween costumes at Value Village where Jane plans to get her and her sister's costume.", "evaluation_predictions": [2, 0, 0, 0, 35903, 16, 164, 7, 11714, 6389, 19, 69, 2761, 7, 907, 8789, 14690, 4, 11472, 300, 39, 12111, 452, 23, 11714, 6389, 4, 7343, 8, 11472, 40, 213, 89, 561, 4, 1437, 1437, 1437, 5011, 8, 1896, 32, 67, 164, 89, 4, 252, 40, 905, 7343, 216, 114, 51, 236, 7, 1962, 106, 4, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Val: it's raining!\r\nCandy: I know, just started...\r\nVal: r we going? we will be wet\r\nCandy: maybe wait a little? see if stops\r\nVal: ok. let's wait half h and than see\r\nCandy: god idea, I call u then\r\nVal: great :)", "target": "It's raining, so Val and Candy will wait half an hour before they go.", "evaluation_predictions": [2, 0, 0, 0, 243, 18, 31832, 4, 3767, 8, 25575, 32, 164, 7, 2067, 457, 41, 1946, 8, 192, 114, 5, 1895, 6897, 4, 25575, 40, 486, 3767, 172, 7, 905, 123, 216, 114, 51, 64, 213, 4, 1437, 1437, 1437, 111, 24, 18, 164, 7, 28, 7727, 6, 98, 51, 40, 2067, 4, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Tim: The situation there is terrible now\nJohn: I know and, honestly, I don't think it's gonna change any time soon\nJeremy: why? I think the world's attention is now on Kongo really\nJohn: exactly, too much money involved\nJohn: everybody wants it's resources, they are crucial for the US, for China, for everybody\nAlice: for our smartphones\nJohn: Exactly\nAlice: yes, I'm not very positive either\nTim: yup, just the same story all the time\nJohn: Ebola, war, militias, diamonds...\nTim: Hard to say what should be done\nJohn: Surely the elections were not done properly\nTim: this for sure", "target": "The situation in Kongo is terrible because of its resources and politics.", "evaluation_predictions": [2, 0, 0, 0, 133, 1068, 11, 3532, 139, 16, 6587, 4, 20, 232, 18, 1503, 16, 122, 2061, 15, 3532, 139, 4, 3532, 139, 18, 1915, 32, 4096, 13, 5, 382, 6, 13, 436, 6, 13, 3370, 4, 20, 1727, 58, 45, 626, 5083, 6, 25, 610, 8, 2668, 224, 4, 3532, 366, 32, 5, 276, 527, 70, 5, 86, 4, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Paula: Can we meet with the new person soon?\r\nRalph: Sure. In an hour okay?\r\nPaula: Perfect.", "target": "Paula and Ralph will meet the new person in an hour. ", "evaluation_predictions": [2, 0, 0, 0, 12083, 102, 8, 10594, 40, 972, 19, 5, 92, 621, 11, 41, 1946, 7, 1067, 59, 49, 1272, 4, 1437, 1437, 1437, 2537, 1437, 1437, 50141, 1437, 1437, 111, 18223, 8, 10594, 32, 529, 19, 10, 92, 621, 1010, 4, 1437, 111, 10594, 40, 1962, 106, 4, 1437, 2537, 111, 18223, 40, 1962, 123, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Mary: Hello, I think you've left your credit card at our shop\r\nJenny: Thank you for getting in touch! Thank you so much!\r\nMary: No worries :)\r\nJenny: When can I pick it up?\r\nMary: Whenever you come, it's safe with one of our cashiers :)", "target": "Jenny has left her credit car at the Mary's shop.", "evaluation_predictions": [2, 0, 0, 0, 863, 11867, 34, 314, 69, 1361, 1886, 23, 2708, 18, 2792, 4, 264, 40, 1339, 24, 62, 19, 65, 9, 5, 1055, 4733, 8378, 79, 606, 7, 5, 2792, 6, 142, 24, 18, 1522, 19, 10, 1055, 906, 89, 4, 1437, 1437, 1437, 111, 2708, 18, 1400, 16, 2034, 11, 5, 2792, 4, 1437, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"text": "Victoria: yo\r\nVictoria: are you free this weekend?\r\nRosemary: let me see...\r\nRosemary: yeah\r\nVictoria: <3\r\nVictoria: let's record the drums?\r\nRosemary: you see\r\nRosemary: there's a problem\r\nVictoria: yeah?\r\nRosemary: namely, i don't have a working laptop atm\r\nVictoria: XD\r\nVictoria: i have a tablet but it has 2gb ram, so probably not enough for recording\r\nRosemary: but does it have all the software? usb ports? windows?\r\nVictoria: yeah it's running windows 10\r\nRosemary: still 2gb is probably not enough\r\nRosemary: so we need to borrow it from somebody\r\nVictoria: yeah, any ideas?\r\nRosemary: actually i have a few\r\nRosemary: i'll get back to you later\r\nVictoria: okay, thanks!\r\nVictoria: but don't forget xd", "target": "Rosemary and Victoria would like to record the drums this weekend. Rosemary doesn't have a working laptop, whereas Victoria's tablet doesn't have enough memory for recording. Rosemary will try to borrow a laptop from somebody and will get back to Victoria later.", "evaluation_predictions": [2, 0, 0, 38672, 8, 3199, 22501, 32, 164, 7, 638, 5, 21072, 42, 983, 4, 4769, 34, 10, 9995, 19, 132, 19562, 19634, 6, 53, 24, 18, 878, 6410, 158, 4, 3199, 22501, 630, 75, 33, 10, 447, 9972, 23, 5, 1151, 6, 98, 51, 240, 7, 12152, 24, 31, 4909, 4, 264, 34, 10, 367, 2956, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
{"Unnamed: 0": 2, "text": "Upto freebets lol gunners matchedbetting c racing cheltenhamfestival ", "sentiment": 0}
{"Unnamed: 0": 4, "text": " Leon bailey or Federico cheisa", "sentiment": 0}
{"texts": ["Perioperative ventricular arrhythmias in patients undergoing partial left ventriculectomy.", "\nAlthough incidence of ventricular arrhythmias after partial left ventriculectomy (PLV) has been reported, there are no studies comparing incidence before and after PLV. ", "Although operative scars may give rise to arrhythmias, improved energetic efficiency after PLV may decrease their incidence. ", "Pre- and postoperative ventricular arrhythmias were monitored by Holter ECG and analyzed in 17 patients undergoing PLV in Curitiba, Brazil. ", "Although total 24-hour heart beat (THB) increased significantly (p = 0.018), ventricular premature contractions (VPCs) decreased markedly (p = 0.036), excluding one patient dying in low cardiac output (LOS) who had terminal arrhythmias increased multifold. ", "In the remaining 16 patients, VPC pairs were also reduced significantly on the average (p = 0.038). ", "In contrast, ventricular tachycardia (VT; more than three consecutive VPCs) disappeared in five patients, decreased in two patients, and newly occurred in four patients, with five patients showing no change; one of them developed a prolonged VT, successfully reversed by external cardioversion. ", "Despite notable significant increase in THB immediately after PLV, PVC and PVC pairs were significantly decreased in contrast to VT, which disappeared in some patients and newly occurred in other patients, remaining constant on the average. ", "Sustained VT occurring in a patient with all other arrhythmias suppressed may suggest a unique electrophysiological substrate, may justify prophylactic use of amiodarone or an implantable cardioverter-defibrillator, and may underscore the importance of further and extended studies."], "meta": {"pile_set_name": "PubMed Abstracts"}, "scores": [0.009413612075150013, 0.0016193374758586287, 0.0006160467164590955, 0.0011881119571626186, 0.0010475203162059188, 0.0006180889322422445, 0.001321229268796742, 0.0006329103489406407, 0.0006711434689350426], "avg_score": 0.0019031111733056605, "num_sents": 9}
{"texts": ["Bosses make hiring decision within 10 minutes\n\nWhile execs spend an average of 55 minutes interviewing staff-level applicants (and 86 minutes for management candidates), they form an opinion of job-seekers in an average of 10 minutes, according to a Robert Half poll of 150 senior execs at large companies.", "\n\nLegal risk: Quick first impressions may be based on illegal biases (age, race, gender, etc.)."], "meta": {"pile_set_name": "Pile-CC"}, "scores": [0.000639400735963136, 0.0006248652935028076], "avg_score": 0.0006321330147329718, "num_sents": 2}
{"texts": ["Skynet Strikes Again: Terminator Genisys\n\nThe quest to eradicate man's leading threat against robotic domination continues in Terminator Genisys. ", "Skynet, this time, is hidden in a consumer friendly operating system called Genisys, which promises to link all of a person's home electroncs for convenience. ", "It, of course, evolves into the defense system that keeps sending machines into the past to kill Sarah Connor (Emilia Clarke). ", "Without her, the human resistance would not have John Connor (Jason Clarke). ", "He knows this, so he sends a reprogrammed Terminator known as Guardian (Arnold Schwarzenegger) over half a century into the past. ", "Before he sends Kyle Reese (Jai Courtney) back to 1984 Los Angeles, Sarah has become a fierce resistance fighter. ", "Guardian not only dispatches the original terminator, but he also helps to neutralize T-1000 (Byung-hun Lee), disguised as a police officer to kill both Sarah and Kyle. ", "Before T-1000 gets another chance at the pair, they get in the time machine that brought Kyle and head to the year 2017, where they try and stop Genisys from going live. ", "Guardian, though, remains in that time because of damage he suffered fighting the other machines.", "\n\nOn arriving in 2017, the pair gets arrested, but chaos soon follows. ", "Someone is pursuing them, but the only person who believes their time travel story is a detective named O'Brien (J. K. Simmons), who'd been there when T-1000 killed his partner. ", "O'Brien assists Kyle and Sarah avoid the new terminator. ", "Guardian has also found them, and John has also traveled back to this time. ", "As Kyle witnessed in part before his initial time travel, Skynet confronted John, and the results are clear to Guardian. ", "The trio remains undaunted as they plan an assault on Cyberdine headquarters before Genisys launches.", "\n\nThe Terminator series continued without Schwarzenegger when he went from the big screen to the Governor's mansion. ", "The greater presence lost, though, was not its lead actor, but its co-creator, James Cameron, who knew how to create fear and action so well in the franchise's first two entries. ", "No subsequent director, including Genisys helmsman Alan Taylor, matches Cameron's leadership. ", "Genisys gets lost in all of its time travel and alternate universe scenarios. ", "Given that Reese, in his journey into the past, can see a past where the nuclear holocaust known as Judgment Day, which supposedly happened in 1997, did not occur, no man or machine should reasonably assume that they will get to the destination planned for them. ", "Further, if Reese had a normal childhood, viewers have to wonder what John is fighting, since Reese's youth did not include the Judgment Day he has supposedly known. ", "The film looks and feels as old as Guardian, and no amount of 3-in-1 Oil can help a franchise entry as rusty as this one. ", "The Back To The Future franchise handled the consequences of time travel so much better.", "\n\nAnother part of the problem is Courtney. ", "His Reese is about as robotic as the machines he fights. ", "There isn't a second of his performance where I didn't miss Michael Biehn playng the man whose backwards journey becomes essential for mankind. ", "Courtney's Reese has Sarah considering abstinence - and I don't blame her. ", "Emilia Clarke fares better as Sarah, a woman whose only family since age 9 is Guardian, whom she calls Pops. ", "Self-preservation has been a must, and the arrival of Kyle gives her a much-needed human ally. ", "At least her Sarah compares favorably to the work Linda Hamilton did so memorably in the first two installments. ", "Jason Clarke does a fine job as John, who shows the effects the long-running war has had on him. ", "Arnold is good, though his best moments come when he shows how awkward it is for him to seem as human as Sarah would like. ", "Simmons, though, has the best moments as O'Brien, a cop who needs to know he's not as crazy as fellow officers think he is, and an unaged Sarah and Kyle arrive at his precinct.", "\n\nI've been living in a time where a hit movie calls for at least one sequel. ", "I wonder where, after 31 years, these Terminator sequels will end. ", "The makers of Terminator Genisys have two more movies planned, and I am sure that I and others think that's two too many. ", "Old Hollywood pushed out film franchises like Our Gang, Blondie, and the Bowery Boys, but these series remained in constant production instead of taking years between entries. ", "The James Bond series has run longer, but the makers of the series keep finding a way to keep this MI6 agent relevant. ", "I, however, believe it's generally not a good idea to keep a film series growing closer in age to Methusalah with every passing day. ", "Some of us would like to still be around for the final outcome of movie franchises that began years before many of today's moviegoers were born. ", "If nothing else, I hope that those involved with Terminator Genisys seek to make their sequels an end game. ", "They can't keep Pops waiting forever.", "\n\nOn a scale of zero to four stars, I give Terminator Genisys two stars. ", "I wish you weren't going to be back.", "\n\nComments\n\nNo HTML is allowed in comments, but URLs will be hyperlinked. ", "Comments are not for promoting your articles or other sites.", "\n\nsending\n\nAUTHOR\n\nPat Mills\n\n3 years agofrom East Chicago, Indiana\n\nThanks. ", "Frankly, Mel, I didn't care either. ", "I liked Rise Of The Machines and Salvation enough, and looked past the spate of negative reviews and went to a matinee. ", "For your sake, I hope your wife isn't the one drooling in the popcorn.", "\n\nMel Carriere\n\n3 years agofrom San Diego California\n\nAnd to think I have to take my wife to see this. ", "She won't care if you only gave it two stars. ", "I hope it's not too much of a snoozer because I hate sleeping in theaters and drooling in the popcorn. ", "Great hub!", "\n\nThis website uses cookies\n\nAs a user in the EEA, your approval is needed on a few things. ", "To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. ", "Please choose which areas of our service you consent to our doing so.", "\n\nThis is used to display charts and graphs on articles and the author center. (", "Privacy Policy)\n\nGoogle AdSense Host API\n\nThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. ", "No data is shared unless you engage with this feature. (", "Privacy Policy)\n\nThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. ", "No data is shared with Paypal unless you engage with this feature. (", "Privacy Policy)\n\nFacebook Login\n\nYou can use this to streamline signing up for, or signing in to your Hubpages account. ", "No data is shared with Facebook unless you engage with this feature. (", "Privacy Policy)\n\nMaven\n\nThis supports the Maven widget and search functionality. (", "Privacy Policy)\n\nWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.", "\n\nConversion Tracking Pixels\n\nWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.", "\n\nStatistics\n\nAuthor Google Analytics\n\nThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (", "Privacy Policy)\n\nComscore\n\nComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. ", "Non-consent will result in ComScore only processing obfuscated personal data. (", "Privacy Policy)\n\nAmazon Tracking Pixel\n\nSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)"], "meta": {"pile_set_name": "Pile-CC"}, "scores": [0.0012090522795915604, 0.0005965775344520807, 0.0035486207343637943, 0.0008476913208141923, 0.001139212166890502, 0.0008439387893304229, 0.006904694251716137, 0.0021862334106117487, 0.0007443881477229297, 0.0009493794641457498, 0.0013547614216804504, 0.000733555352780968, 0.0007386509096249938, 0.0005874290363863111, 0.0007183082634583116, 0.000743397104088217, 0.0006343201384879649, 0.0007579679950140417, 0.0017685729544609785, 0.0006424090242944658, 0.0006373876822181046, 0.0011760403867810965, 0.0005828686407767236, 0.0018370066536590457, 0.0020192915108054876, 0.0008155466639436781, 0.02487662062048912, 0.001973438076674938, 0.0008189681684598327, 0.000611178926192224, 0.0007398411398753524, 0.0005747845279984176, 0.0018304417608305812, 0.0006966202636249363, 0.0006931967218406498, 0.0006341514526866376, 0.0007986222044564784, 0.0006248250720091164, 0.000627528817858547, 0.0006189676350913942, 0.000620740232989192, 0.0029678489081561565, 0.0007570248562842607, 0.09116606414318085, 0.0006364149739965796, 0.0008286525262519717, 0.0006438770215027034, 0.02464752271771431, 0.0006738962838426232, 0.3506276607513428, 0.0014183572493493557, 0.009420973248779774, 0.017051558941602707, 0.00108587765134871, 0.0005686003132723272, 0.0005794506869278848, 0.0005908714956603944, 0.0005417952197603881, 0.0006359178223647177, 0.0005790520808659494, 0.0006080536404624581, 0.0006408930057659745, 0.0006117552984505892, 0.0005857632495462894, 0.0006496372516267002, 0.0006139123579487205, 0.0005739838816225529, 0.0005605461774393916, 0.0006301188259385526, 0.0009590344270691276, 0.0006234709289856255], "avg_score": 0.00822444807600335, "num_sents": 71}
{"texts": ["A novel polysaccharide derived from algae extract induces apoptosis and cell cycle arrest in human gastric carcinoma MKN45 cells via ROS/JNK signaling pathway.", "\nIn recent years, interest in biological activities of compounds from marine organisms has intensified. ", "Cancer is the most principal enemy for human life and health. ", "For the first time, to the best of our knowledge, we investigated a novel algae-derived polysaccharide for its role in inducing apoptosis and cell cycle arrest in human gastric carcinoma MKN45 cells. ", "We found that the novel polysaccharide suppressed MKN45 cell proliferation, induced cell apoptosis and arrested the cells at G2/M phase. ", "Furthermore, we observed that the generation of reactive oxygen species (ROS) and the phosphorylation of Jun N-terminal kinase (JNK), p53, caspase-9 and -3 were induced in the polysaccharide-treated MKN45 cells. ", "In addition, pretreatment with N-acetyl-cysteine (NAC) and SP600125, the inhibitor of ROS and JNK, induced MKN45 cell proliferation, prevented the cell apoptosis and released the cells from cycle arrest. ", "Finally, we found that pretreatment with NAC prevented the JNK, p53, caspase-9 and -3 protein phosphorylation induced by the polysaccharide, however, pretreatment with SP600125 did not affect the generation of ROS, suggesting that ROS is upstream of JNK. ", "Taken together, the novel polysaccharide induced cancer cell apoptosis and arrested cell cycle via ROS/JNK signaling pathway."], "meta": {"pile_set_name": "PubMed Abstracts"}, "scores": [0.0007340812007896602, 0.0005463785491883755, 0.20318536460399628, 0.0006740540266036987, 0.0006663872045464814, 0.0006836579996161163, 0.0008103332365863025, 0.0007945759571157396, 0.0006434194510802627], "avg_score": 0.023193139136613656, "num_sents": 9}
{"texts": ["Q:\n\nOrbeon changed behavior for xforms:alert / xforms:h3lp\n\n[Stackoverflow disallows the word help in the title. ", "Hence the h3lp]\nWe are in the proces of moving our code from Orbeon 3.9 to Orbeon 4.x. ", "One of the many things that changed is the behavior for display of xforms:alert and xforms:help. ", "Example code:\n<xforms:input ref=\"@code\">\n <xforms:alert ref=\"$resources/required-field\"/>\n <xforms:help ref=\"$helptext\"/>\n</xforms:input>\n\nIn Orbeon 3.9 the alert is displayed as a red img with a white exclamation mark that has the text as tooltip, only if the binding fails. ", "The help is displayed as a blue-ish image with a question that activated a tiny pseudo window containing the (potentially large) help text.", "\nIn Orbeon 4.7 the alert text is displayed as-is, no image and no condition based on binding. ", "This interferes with a carefully designed interface as it takes up a lot more space. ", "The help text is not displayed at all because .xforms-help has display: none;. ", "Overriding that doesn't work because the text would then just be displayed inline.", "\nI could not find documentation for these changes. ", "Does anyone know the rationale and how to make \"alert\" and \"help\" useful yet again?", "\n\nA:\n\nThere are two changes with Orbeon Forms 4.x which might be relevant to this:\n\nThe HTML layout of elements has changed a bit. ", "This means existing CSS might have to be adapted. ", "You can check this by comparing the HTML produced by 3.9 vs. 4.x for a given page. ", "With 4.x, all form elements, for example, are wrapped within a <span> or <div> element.", "\nForm Runner uses Twitter Bootstrap as a CSS library. ", "But the Bootstrap CSS files are also included for non-Form Runner pages.", "\n\nThis said, \"red icon\" alerts should still work, see for example the good old Espresso Order or Bookcast demos.", "\nIf you see alerts inline and unconditionally, it means that somehow the proper CSS doesn't apply, either because of the HTML layout change mentioned above, or because some CSS files are missing.", "\n\n"], "meta": {"pile_set_name": "StackExchange"}, "scores": [0.0006573635037057102, 0.0007486800896003842, 0.0005903386627323925, 0.0006677117780782282, 0.0007059997296892107, 0.0006504757329821587, 0.0006717763608321548, 0.0007587911677546799, 0.0006173530127853155, 0.00059066794347018, 0.0006833235966041684, 0.0005778659251518548, 0.0005571704241447151, 0.0005570928333327174, 0.0006277825450524688, 0.0006992801791056991, 0.0006838672561571002, 0.000645747990347445, 0.0005854789051227272, 0.001995444530621171], "avg_score": 0.0007136106083635241, "num_sents": 20}
{"texts": ["1. ", "Field of the Invention\nThis invention relates to offshore oil spill collection devices and particularly to offshore oil spill collection devices that operate below the surface of the sea to collect oil and gas.", "\n2. ", "Description of the Prior Art\nDamage to the environment by leaking oil or gas from underwater pipelines or oil wells has become a serious problem. ", "Costs to remove oil coming to the surface via these leaks from an underwater well or pipeline are tremendous. ", "In addition, the loss of the oil can be in hundreds or thousands of barrels a day, which is a significant loss of a vital natural resource. ", "Recent events in the Gulf of Mexico illustrate the extent and seriousness of this problem.", "\nThe main techniques for dealing with such leaks or spills have been removing the oil from the surface of the water and land, and cleaning wildlife. ", "However, simply cleaning up the oil is not sufficient to prevent or reduce the loss of a vital natural resource. ", "In the recent Gulf spill, millions of gallons of oil were burned off or simply disbursed into the sea, where they may be accumulating on the sea floor.", "\nIn addition to oil leaks, there are natural methane and oil seeps located below the surface of the sea. ", "Such seeps can provide a source of gas and oil, while the recovery of such gas helps control the emission of a greenhouse gas into the environment.", "\nOil recovery apparatus can be effective in preventing the contamination caused by oil and oil/gas leakage from underwater pipelines or oil wells. ", "For example, a large number of oil wells are located offshore in deep water and rupture of a well casing, etc., ", "causes the oil/gas to be discharged upwardly under pressure from the oil well, resulting in a loss of oil. ", "Presently, there are few devices that are used to collect leaked or spilled oil from the sea. ", "One such device is found in U.S. Pat. ", "No. ", "5,213,444 to Henning. ", "This device is a housing that is positioned above an underwater leak and anchored in place. ", "As the oil and gas rise in the water column, the device can trap the oil and gas within the housing. ", "The device has a vent with a burner that can be used to burn off the gas. ", "It also has a pump to remove the oil that is collected. ", "Although this device seems to be a good solution, it has several problems. ", "First, the device must be positioned so that the top of the housing is above the water. ", "This is to allow the gas to be burned off and the oil to be pumped onto barges or other vessels. ", "However, it is difficult to maintain such a device in such a position because of currents, wave action and storms. ", "Moreover, in many cases the oil pipelines or wells are at great depths (the gulf well in the recent spill was over a mile deep). ", "A column of oil rising from that great a depth will be dispersed by currents and wave action long before it breaks the surface. ", "Even a large number of such devices placed on the surface will only collect minor amounts of such oil.", "\nAt present, there is no such device for capturing such gas and oil from undersea seeps. ", "Therefore, there is a need for a collection system that can operate under the surface so that it can be positioned to collect both leaking and seeping oil and gas from the sea floor."], "meta": {"pile_set_name": "USPTO Backgrounds"}, "scores": [0.0009391900966875255, 0.0005707194795832038, 0.001185585861094296, 0.0007774126715958118, 0.0009132313425652683, 0.0007500365609303117, 0.0005912136984989047, 0.0007515648612752557, 0.0008785411482676864, 0.0007745982729829848, 0.0006573020946234465, 0.000634150521364063, 0.0006816870882175863, 0.0005868987645953894, 0.0009183072834275663, 0.0007761879824101925, 0.0007132829632610083, 0.0013785817427560687, 0.0009062039316631854, 0.0007094908505678177, 0.000657683121971786, 0.004857449792325497, 0.0007930634310469031, 0.0006439344142563641, 0.0006459153955802321, 0.0008451137109659612, 0.000571848766412586, 0.0005651200190186501, 0.0007262538420036435, 0.0006872660014778376, 0.0006448962376452982, 0.0006405452731996775], "avg_score": 0.0008866649131960003, "num_sents": 32}
{"feat_id": "13716782", "text": "Kelly: Oh! Oh! Can I pick the first question?\r\nJessica: Sure. Go for it!\r\nKelly: What's the scariest place you've been to!\r\nJessica: I'll start: Palermo in Italy.\r\nMickey: And what's so scary about that? Did you break your nail? :P\r\nJessica: Shut it, Mickey! No, there are the Capuchin Catacombs with 8000 corpses! \r\nKelly: Ewwww! Corpses? Rly?\r\nJessica: Yeah! And you can look at them like museum exhibits. I think they're divided somehow, but have no clue how!\r\nOllie: That's so cool! Do you get to see the bones or are they covered up?\r\nJessica: Well, partly. Most of them were exhibited in their clothes. Basically only skulls and hands. \r\nMickey: I'm writing this one down! That's so precious!\r\nOllie: Me too!", "target": "The scariest place for Jessica was the Capuchin Catacombs in Palermo.", "evaluation_predictions": [0, 16908, 65, 118, 12, 4826, 49, 51, 32, 16, 5308, 5, 290, 33, 4000, 2295, 77, 3431, 9, 9763, 7, 28, 3, 25129, 7527, 15, 7, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13716592", "text": "Carrie: Just back from Fantastic Beast :)\r\nGina: and what do you think?\r\nCarrie: generally good - as usual nice special effect and visuals, an ok plot, a glimpse of the wizarding community in the US.\r\nAlex: Sounds cool. I was thinking of going this weekend with Lane, but I've seen some bad reviews.\r\nCarrie: Depends on what you expect really - I have a lot of sentiment towards Harry Potter so, I'm gonna like everything the do. But seriously the movie was decent. However, if you're expecting to have your mind blown, then no, it's not THAT good.\r\nGina: I agree. I saw it last week and basically I'm satisfied.\r\nAlex: No spoilers, girls.\r\nCarrie: no worries ;)\r\nCarrie: And Gina, what do you think about Eddie Redmayne as Newt?\r\nGina: I loved him <3 I loved how introverted and awkward he was and how caring he was towards the animals. And with all that he showed a lot of confidence in his beliefs and was a genuinely compassionate character\r\nCarrie: not your standard protagonist, that's for sure\r\nGina: and that's what I liked about him\r\nAlex: Maybe I'll go and see it sooner so we can all talk about it.\r\nCarrie: go see it. If' you're not expecting god-knows-what you're going to enjoy it ;)", "target": "Carrie and Gina saw \"Fantastic Beast\" and liked it. Ginna loved Eddie Redmayne as Newt. ", "evaluation_predictions": [0, 1184, 1753, 11, 5104, 33, 352, 12, 217, 96, 371, 288, 10057, 26695, 121, 48, 1851, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13728528", "text": "Samantha: How are you doing today?\r\nRobyn: better, but I really exaggerated with bier last night\r\nSamantha: was it really only bier?\r\nRobyn: sure, why?\r\nSamantha: I don't know, your eyes, behaviour\r\nRobyn: you want to say I took drugs?\r\nSamantha: I'm only asking, I don't have anything against drugs\r\nRobyn: but I have and I never take them\r\nSamantha: ok, sorry, I didn't intend to offend you\r\nRobyn: I just drank too much, that's eat\r\nSamantha: much too much\r\nRobyn: yes, I lost control a bit\r\nRobyn: I am sorry for that\r\nSamantha: important that you feel better today", "target": "Robyn drank too much beer last night and lost control. She is feeling better today.", "evaluation_predictions": [0, 5376, 63, 29, 1215, 9, 6938, 920, 28, 2647, 49, 336, 706, 5, 451, 3, 26, 6254, 396, 231, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13813429", "text": "Peyton: I have been asking you to bring that video game for me\r\nCameron: Honey, I am not having enough time to come home\r\nPeyton: When would you come home?\r\nCameron: I will have to stay out of town for another week i guess\r\nPeyton: Cant you just deliver that game through the courier? :P\r\nCameron: Dont be mean :/\r\nPeyton: Get the job done and come to home then. ASAP :P", "target": "Peyton is expecting Cameron to bring the video game. Cameron will probably be out for another week.", "evaluation_predictions": [0, 18501, 56, 43, 12, 1049, 91, 13, 1511, 21, 430, 471, 5, 216, 56, 2156, 8, 671, 467, 190, 8, 27961, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13731477", "text": "Gene: Did you get the package I sent you\r\nJack: No, when did you send it?\r\nGene: on Friday\r\nJack: shit I should have gotten it by now\r\nJack: send me the tracking umber I;ll check whats up\r\nGene: 12345678900", "target": "Jack has not received yet the package Gene had sent him on Friday. She sent him the tracking number, so he could check the status of the shipment. ", "evaluation_predictions": [0, 6939, 1622, 4496, 3, 9, 2642, 30, 1701, 5, 4496, 225, 43, 1204, 34, 57, 230, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13730896", "text": "Russ: Hi Gurdun, are you feeling better?\r\nGurdun: Hi Ross, a little bit better, yes, thank you.\r\nRuss: Do you think you'll be back at the uni this week?\r\nGurdun: Not tomorrow for sure, but I hope Wednesday maybe.\r\nRuss: Oh, that's fine.\r\nGurdun: Yeah. I'm feeling a bit weak still\r\nRuss: I guess that's pretty normal at this stage.\r\nGurdun: I believe so. And the muscle pain.\r\nRuss: I know what you mean. I had flu like that three months ago.\r\nGurdun: Luckily the headache's gone. It was absolutely awful.\r\nRuss: True enough. I had the same.\r\nGurdun: Anyway, how are things with you?\r\nRuss: Same old, same old, you know. Not much happening in the middle of term.\r\nGurdun: And the team?\r\nRuss: Oh yeah, we won the last match. It was a good game.\r\nGurdun: Great. Listen Russ, I need to run. Catch up later.\r\nRuss: OK, talk to you later.", "target": "Gurdun has the flu. He is feeling better. Gurdun hopes he'll be back at the uni on Wednesday. Russ and his team won the last match. ", "evaluation_predictions": [0, 20402, 26, 202, 19, 1829, 3, 9, 720, 5676, 11, 3, 88, 56, 36, 223, 44, 8, 73, 23, 30, 2875, 5, 2770, 7, 7, 141, 3, 9, 6720, 386, 767, 977, 5, 216, 65, 3, 9, 12085, 11, 3, 9, 5467, 1406, 5, 216, 751, 8, 336, 1588, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13730348", "text": "Susan: Will you be home tomorrow?\r\nRob: Why do you ask?\r\nSusan: We could have dinner together if you have time after work\r\nRob: Sure! Sounds great\r\nSusan: Fantastic! I will cook something special then!", "target": "Rob will be home tomorrow. Rob and Susan will have dinner together after Rob's work. Susan will cook something special.", "evaluation_predictions": [0, 5376, 11, 10445, 56, 43, 2634, 544, 5721, 227, 161, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13731077", "text": "Evan: Hi Dennis, I need to cancel my lesson tomorrow, sorry.\r\nDennis: Fine, what's up?\r\nEvan: Oh, got the flu, been off college since Tuesday. Should be ok for next Thurs.\r\nDennis: OK, just tell me in good time if you can't make it. Hope you feel better soon.\r\nEvan: Bye, Den! Thanks.", "target": "Evan can't come to his lesson tomorrow, because he's got the flu.", "evaluation_predictions": [0, 22743, 9179, 7, 112, 6114, 5721, 250, 3, 88, 65, 8, 6720, 5, 216, 56, 942, 28, 18563, 416, 26198, 7, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13817550", "text": "Lorena: Hi, can you help me with something?\r\nMartin: Well, I can try.\r\nMartin: Depends what it is?\r\nLorena: I got a new desk and it comes with assembly instructions but I give up, I just can't do it.\r\nLorena: I'm illiterate when it comes to instructions, haha.\r\nLorena: So I could really use some help...\r\nMartin: Hmm, I can't today, but how about tomorrow? Shouldn't take long anyway.\r\nLorena: Yeah, it's fine! I just need it for the weekend, but tomorrow's great! Sorry for troubling you again.\r\nMartin: Don't mention it, we've known each other for so long it's almost like we're siblings, haha.\r\nLorena: Thanks a lot! I should be home by 6, so let me know when you can.", "target": "Martin is going to help Lorena assemble a new desk. He is coming to her house tomorrow.", "evaluation_predictions": [0, 8410, 35, 9, 523, 199, 28, 3, 30221, 3, 9, 126, 4808, 5, 3394, 56, 199, 160, 5721, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"feat_id": "13681441", "text": "Joanna: They are sending emails about Lewandowska.\r\nMerve: What happened?\r\nJoanna: <file_photo> \r\nMerve: Wooow!\r\nJoanna: She is hospitalized because she has measles.\r\nMerve: She had what?\r\nJoanna: Anyone who had contact with her within the last couple of days must get vaccinated.\r\nMerve: Luckily I didn't see her since the last semester...\r\nJoanna: I did, she is my thesis mentor :(\r\nMerve: What will you do?\r\nJoanna: They are organizing vaccinations in the main building from 17th until 19th.\r\nMerve: You have to go!\r\nJoanna: I know... And I just started working so I really don't have a lot of time.\r\nMerve: Come on, this is really important.\r\nJoanna: I will try to do it before work on 18th, hopefully I won't lose the entire day...", "target": "Lewandowska has measles. There are vaccinations in the main building from 17th until 19th for everyone who had contact with her. ", "evaluation_predictions": [0, 312, 3877, 15198, 10717, 19, 2833, 1601, 250, 255, 65, 140, 9, 7, 965, 5, 10476, 113, 141, 574, 28, 160, 441, 8, 336, 1158, 13, 477, 398, 129, 3, 8938, 11075, 1054, 5, 328, 33, 14308, 24639, 7, 16, 8, 711, 740, 45, 1003, 189, 552, 957, 189, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
{"repo_name": "ahmedbodi/AutobahnPython", "path": "examples/asyncio/websocket/echo/client_coroutines.py", "copies": "13", "size": "2044", "content": "###############################################################################\n##\n## Copyright (C) 2013-2014 Tavendo GmbH\n##\n## Licensed under the Apache License, Version 2.0 (the \"License\");\n## you may not use this file except in compliance with the License.\n## You may obtain a copy of the License at\n##\n## http://www.apache.org/licenses/LICENSE-2.0\n##\n## Unless required by applicable law or agreed to in writing, software\n## distributed under the License is distributed on an \"AS IS\" BASIS,\n## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n## See the License for the specific language governing permissions and\n## limitations under the License.\n##\n###############################################################################\n\nfrom autobahn.asyncio.websocket import WebSocketClientProtocol, \\\n WebSocketClientFactory\n\nimport asyncio\n\n\n\nclass MyClientProtocol(WebSocketClientProtocol):\n\n def onConnect(self, response):\n print(\"Server connected: {0}\".format(response.peer))\n\n @asyncio.coroutine\n def onOpen(self):\n print(\"WebSocket connection open.\")\n\n ## start sending messages every second ..\n while True:\n self.sendMessage(u\"Hello, world!\".encode('utf8'))\n self.sendMessage(b\"\\x00\\x01\\x03\\x04\", isBinary = True)\n yield from asyncio.sleep(1)\n\n def onMessage(self, payload, isBinary):\n if isBinary:\n print(\"Binary message received: {0} bytes\".format(len(payload)))\n else:\n print(\"Text message received: {0}\".format(payload.decode('utf8')))\n\n def onClose(self, wasClean, code, reason):\n print(\"WebSocket connection closed: {0}\".format(reason))\n\n\n\nif __name__ == '__main__':\n\n import asyncio\n\n factory = WebSocketClientFactory(\"ws://localhost:9000\", debug = False)\n factory.protocol = MyClientProtocol\n\n loop = asyncio.get_event_loop()\n coro = loop.create_connection(factory, '127.0.0.1', 9000)\n loop.run_until_complete(coro)\n loop.run_forever()\n loop.close()\n", "license": "apache-2.0"}
{"repo_name": "ifduyue/django", "path": "django/core/checks/registry.py", "copies": "13", "size": "3108", "content": "from itertools import chain\n\nfrom django.utils.itercompat import is_iterable\n\n\nclass Tags:\n \"\"\"\n Built-in tags for internal checks.\n \"\"\"\n admin = 'admin'\n caches = 'caches'\n compatibility = 'compatibility'\n database = 'database'\n models = 'models'\n security = 'security'\n signals = 'signals'\n templates = 'templates'\n urls = 'urls'\n\n\nclass CheckRegistry:\n\n def __init__(self):\n self.registered_checks = set()\n self.deployment_checks = set()\n\n def register(self, check=None, *tags, **kwargs):\n \"\"\"\n Can be used as a function or a decorator. Register given function\n `f` labeled with given `tags`. The function should receive **kwargs\n and return list of Errors and Warnings.\n\n Example::\n\n registry = CheckRegistry()\n @registry.register('mytag', 'anothertag')\n def my_check(apps, **kwargs):\n # ... perform checks and collect `errors` ...\n return errors\n # or\n registry.register(my_check, 'mytag', 'anothertag')\n \"\"\"\n kwargs.setdefault('deploy', False)\n\n def inner(check):\n check.tags = tags\n checks = self.deployment_checks if kwargs['deploy'] else self.registered_checks\n checks.add(check)\n return check\n\n if callable(check):\n return inner(check)\n else:\n if check:\n tags += (check, )\n return inner\n\n def run_checks(self, app_configs=None, tags=None, include_deployment_checks=False):\n \"\"\"\n Run all registered checks and return list of Errors and Warnings.\n \"\"\"\n errors = []\n checks = self.get_checks(include_deployment_checks)\n\n if tags is not None:\n checks = [check for check in checks if not set(check.tags).isdisjoint(tags)]\n else:\n # By default, 'database'-tagged checks are not run as they do more\n # than mere static code analysis.\n checks = [check for check in checks if Tags.database not in check.tags]\n\n for check in checks:\n new_errors = check(app_configs=app_configs)\n assert is_iterable(new_errors), (\n \"The function %r did not return a list. All functions registered \"\n \"with the checks registry must return a list.\" % check)\n errors.extend(new_errors)\n return errors\n\n def tag_exists(self, tag, include_deployment_checks=False):\n return tag in self.tags_available(include_deployment_checks)\n\n def tags_available(self, deployment_checks=False):\n return set(chain.from_iterable(\n check.tags for check in self.get_checks(deployment_checks)\n ))\n\n def get_checks(self, include_deployment_checks=False):\n checks = list(self.registered_checks)\n if include_deployment_checks:\n checks.extend(self.deployment_checks)\n return checks\n\n\nregistry = CheckRegistry()\nregister = registry.register\nrun_checks = registry.run_checks\ntag_exists = registry.tag_exists\n", "license": "bsd-3-clause"}
{"repo_name": "kmike/scikit-learn", "path": "sklearn/utils/__init__.py", "copies": "3", "size": "10094", "content": "\"\"\"\nThe :mod:`sklearn.utils` module includes various utilites.\n\"\"\"\n\nfrom collections import Sequence\n\nimport numpy as np\nfrom scipy.sparse import issparse\nimport warnings\n\nfrom .murmurhash import murmurhash3_32\nfrom .validation import (as_float_array, check_arrays, safe_asarray,\n assert_all_finite, array2d, atleast2d_or_csc,\n atleast2d_or_csr, warn_if_not_float,\n check_random_state)\nfrom .class_weight import compute_class_weight\n\n__all__ = [\"murmurhash3_32\", \"as_float_array\", \"check_arrays\", \"safe_asarray\",\n \"assert_all_finite\", \"array2d\", \"atleast2d_or_csc\",\n \"atleast2d_or_csr\", \"warn_if_not_float\", \"check_random_state\",\n \"compute_class_weight\"]\n\n# Make sure that DeprecationWarning get printed\nwarnings.simplefilter(\"always\", DeprecationWarning)\n\n\nclass deprecated(object):\n \"\"\"Decorator to mark a function or class as deprecated.\n\n Issue a warning when the function is called/the class is instantiated and\n adds a warning to the docstring.\n\n The optional extra argument will be appended to the deprecation message\n and the docstring. Note: to use this with the default value for extra, put\n in an empty of parentheses:\n\n >>> from sklearn.utils import deprecated\n >>> deprecated() # doctest: +ELLIPSIS\n <sklearn.utils.deprecated object at ...>\n\n >>> @deprecated()\n ... def some_function(): pass\n \"\"\"\n\n # Adapted from http://wiki.python.org/moin/PythonDecoratorLibrary,\n # but with many changes.\n\n def __init__(self, extra=''):\n \"\"\"\n Parameters\n ----------\n extra: string\n to be added to the deprecation messages\n\n \"\"\"\n self.extra = extra\n\n def __call__(self, obj):\n if isinstance(obj, type):\n return self._decorate_class(obj)\n else:\n return self._decorate_fun(obj)\n\n def _decorate_class(self, cls):\n msg = \"Class %s is deprecated\" % cls.__name__\n if self.extra:\n msg += \"; %s\" % self.extra\n\n # FIXME: we should probably reset __new__ for full generality\n init = cls.__init__\n\n def wrapped(*args, **kwargs):\n warnings.warn(msg, category=DeprecationWarning)\n return init(*args, **kwargs)\n cls.__init__ = wrapped\n\n wrapped.__name__ = '__init__'\n wrapped.__doc__ = self._update_doc(init.__doc__)\n wrapped.deprecated_original = init\n\n return cls\n\n def _decorate_fun(self, fun):\n \"\"\"Decorate function fun\"\"\"\n\n msg = \"Function %s is deprecated\" % fun.__name__\n if self.extra:\n msg += \"; %s\" % self.extra\n\n def wrapped(*args, **kwargs):\n warnings.warn(msg, category=DeprecationWarning)\n return fun(*args, **kwargs)\n\n wrapped.__name__ = fun.__name__\n wrapped.__dict__ = fun.__dict__\n wrapped.__doc__ = self._update_doc(fun.__doc__)\n\n return wrapped\n\n def _update_doc(self, olddoc):\n newdoc = \"DEPRECATED\"\n if self.extra:\n newdoc = \"%s: %s\" % (newdoc, self.extra)\n if olddoc:\n newdoc = \"%s\\n\\n%s\" % (newdoc, olddoc)\n return newdoc\n\n\ndef safe_mask(X, mask):\n \"\"\"Return a mask which is safe to use on X.\n\n Parameters\n ----------\n X : {array-like, sparse matrix}\n Data on which to apply mask.\n\n mask: array\n Mask to be used on X.\n\n Returns\n -------\n mask\n \"\"\"\n mask = np.asanyarray(mask)\n if np.issubdtype(mask.dtype, np.int):\n return mask\n\n if hasattr(X, \"toarray\"):\n ind = np.arange(mask.shape[0])\n mask = ind[mask]\n return mask\n\n\ndef resample(*arrays, **options):\n \"\"\"Resample arrays or sparse matrices in a consistent way\n\n The default strategy implements one step of the bootstrapping\n procedure.\n\n Parameters\n ----------\n `*arrays` : sequence of arrays or scipy.sparse matrices with same shape[0]\n\n replace : boolean, True by default\n Implements resampling with replacement. If False, this will implement\n (sliced) random permutations.\n\n n_samples : int, None by default\n Number of samples to generate. If left to None this is\n automatically set to the first dimension of the arrays.\n\n random_state : int or RandomState instance\n Control the shuffling for reproducible behavior.\n\n Returns\n -------\n Sequence of resampled views of the collections. The original arrays are\n not impacted.\n\n Examples\n --------\n It is possible to mix sparse and dense arrays in the same run::\n\n >>> X = [[1., 0.], [2., 1.], [0., 0.]]\n >>> y = np.array([0, 1, 2])\n\n >>> from scipy.sparse import coo_matrix\n >>> X_sparse = coo_matrix(X)\n\n >>> from sklearn.utils import resample\n >>> X, X_sparse, y = resample(X, X_sparse, y, random_state=0)\n >>> X\n array([[ 1., 0.],\n [ 2., 1.],\n [ 1., 0.]])\n\n >>> X_sparse # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE\n <3x2 sparse matrix of type '<... 'numpy.float64'>'\n with 4 stored elements in Compressed Sparse Row format>\n\n >>> X_sparse.toarray()\n array([[ 1., 0.],\n [ 2., 1.],\n [ 1., 0.]])\n\n >>> y\n array([0, 1, 0])\n\n >>> resample(y, n_samples=2, random_state=0)\n array([0, 1])\n\n\n See also\n --------\n :class:`sklearn.cross_validation.Bootstrap`\n :func:`sklearn.utils.shuffle`\n \"\"\"\n random_state = check_random_state(options.pop('random_state', None))\n replace = options.pop('replace', True)\n max_n_samples = options.pop('n_samples', None)\n if options:\n raise ValueError(\"Unexpected kw arguments: %r\" % options.keys())\n\n if len(arrays) == 0:\n return None\n\n first = arrays[0]\n n_samples = first.shape[0] if hasattr(first, 'shape') else len(first)\n\n if max_n_samples is None:\n max_n_samples = n_samples\n\n if max_n_samples > n_samples:\n raise ValueError(\"Cannot sample %d out of arrays with dim %d\" % (\n max_n_samples, n_samples))\n\n arrays = check_arrays(*arrays, sparse_format='csr')\n\n if replace:\n indices = random_state.randint(0, n_samples, size=(max_n_samples,))\n else:\n indices = np.arange(n_samples)\n random_state.shuffle(indices)\n indices = indices[:max_n_samples]\n\n resampled_arrays = []\n\n for array in arrays:\n array = array[indices]\n resampled_arrays.append(array)\n\n if len(resampled_arrays) == 1:\n # syntactic sugar for the unit argument case\n return resampled_arrays[0]\n else:\n return resampled_arrays\n\n\ndef shuffle(*arrays, **options):\n \"\"\"Shuffle arrays or sparse matrices in a consistent way\n\n This is a convenience alias to ``resample(*arrays, replace=False)`` to do\n random permutations of the collections.\n\n Parameters\n ----------\n `*arrays` : sequence of arrays or scipy.sparse matrices with same shape[0]\n\n random_state : int or RandomState instance\n Control the shuffling for reproducible behavior.\n\n n_samples : int, None by default\n Number of samples to generate. If left to None this is\n automatically set to the first dimension of the arrays.\n\n Returns\n -------\n Sequence of shuffled views of the collections. The original arrays are\n not impacted.\n\n Examples\n --------\n It is possible to mix sparse and dense arrays in the same run::\n\n >>> X = [[1., 0.], [2., 1.], [0., 0.]]\n >>> y = np.array([0, 1, 2])\n\n >>> from scipy.sparse import coo_matrix\n >>> X_sparse = coo_matrix(X)\n\n >>> from sklearn.utils import shuffle\n >>> X, X_sparse, y = shuffle(X, X_sparse, y, random_state=0)\n >>> X\n array([[ 0., 0.],\n [ 2., 1.],\n [ 1., 0.]])\n\n >>> X_sparse # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE\n <3x2 sparse matrix of type '<... 'numpy.float64'>'\n with 3 stored elements in Compressed Sparse Row format>\n\n >>> X_sparse.toarray()\n array([[ 0., 0.],\n [ 2., 1.],\n [ 1., 0.]])\n\n >>> y\n array([2, 1, 0])\n\n >>> shuffle(y, n_samples=2, random_state=0)\n array([0, 1])\n\n See also\n --------\n :func:`sklearn.utils.resample`\n \"\"\"\n options['replace'] = False\n return resample(*arrays, **options)\n\n\ndef safe_sqr(X, copy=True):\n \"\"\"Element wise squaring of array-likes and sparse matrices.\n\n Parameters\n ----------\n X : array like, matrix, sparse matrix\n\n Returns\n -------\n X ** 2 : element wise square\n \"\"\"\n X = safe_asarray(X)\n if issparse(X):\n if copy:\n X = X.copy()\n X.data **= 2\n else:\n if copy:\n X = X ** 2\n else:\n X **= 2\n return X\n\n\ndef gen_even_slices(n, n_packs):\n \"\"\"Generator to create n_packs slices going up to n.\n\n Examples\n --------\n >>> from sklearn.utils import gen_even_slices\n >>> list(gen_even_slices(10, 1))\n [slice(0, 10, None)]\n >>> list(gen_even_slices(10, 10)) #doctest: +ELLIPSIS\n [slice(0, 1, None), slice(1, 2, None), ..., slice(9, 10, None)]\n >>> list(gen_even_slices(10, 5)) #doctest: +ELLIPSIS\n [slice(0, 2, None), slice(2, 4, None), ..., slice(8, 10, None)]\n >>> list(gen_even_slices(10, 3))\n [slice(0, 4, None), slice(4, 7, None), slice(7, 10, None)]\n \"\"\"\n start = 0\n for pack_num in range(n_packs):\n this_n = n // n_packs\n if pack_num < n % n_packs:\n this_n += 1\n if this_n > 0:\n end = start + this_n\n yield slice(start, end, None)\n start = end\n\n\ndef tosequence(x):\n \"\"\"Cast iterable x to a Sequence, avoiding a copy if possible.\"\"\"\n if isinstance(x, np.ndarray):\n return np.asarray(x)\n elif isinstance(x, Sequence):\n return x\n else:\n return list(x)\n\n\nclass ConvergenceWarning(Warning):\n \"Custom warning to capture convergence problems\"\n", "license": "bsd-3-clause"}
{"repo_name": "dataxu/ansible", "path": "lib/ansible/modules/system/kernel_blacklist.py", "copies": "125", "size": "4009", "content": "#!/usr/bin/python\n# encoding: utf-8 -*-\n\n# Copyright: (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nANSIBLE_METADATA = {'metadata_version': '1.1',\n 'status': ['preview'],\n 'supported_by': 'community'}\n\nDOCUMENTATION = '''\n---\nmodule: kernel_blacklist\nauthor:\n- Matthias Vogelgesang (@matze)\nversion_added: '1.4'\nshort_description: Blacklist kernel modules\ndescription:\n - Add or remove kernel modules from blacklist.\noptions:\n name:\n description:\n - Name of kernel module to black- or whitelist.\n required: true\n state:\n description:\n - Whether the module should be present in the blacklist or absent.\n choices: [ absent, present ]\n default: present\n blacklist_file:\n description:\n - If specified, use this blacklist file instead of\n C(/etc/modprobe.d/blacklist-ansible.conf).\n'''\n\nEXAMPLES = '''\n- name: Blacklist the nouveau driver module\n kernel_blacklist:\n name: nouveau\n state: present\n'''\n\nimport os\nimport re\n\nfrom ansible.module_utils.basic import AnsibleModule\n\n\nclass Blacklist(object):\n def __init__(self, module, filename, checkmode):\n self.filename = filename\n self.module = module\n self.checkmode = checkmode\n\n def create_file(self):\n if not self.checkmode and not os.path.exists(self.filename):\n open(self.filename, 'a').close()\n return True\n elif self.checkmode and not os.path.exists(self.filename):\n self.filename = os.devnull\n return True\n else:\n return False\n\n def get_pattern(self):\n return r'^blacklist\\s*' + self.module + '$'\n\n def readlines(self):\n f = open(self.filename, 'r')\n lines = f.readlines()\n f.close()\n return lines\n\n def module_listed(self):\n lines = self.readlines()\n pattern = self.get_pattern()\n\n for line in lines:\n stripped = line.strip()\n if stripped.startswith('#'):\n continue\n\n if re.match(pattern, stripped):\n return True\n\n return False\n\n def remove_module(self):\n lines = self.readlines()\n pattern = self.get_pattern()\n\n if self.checkmode:\n f = open(os.devnull, 'w')\n else:\n f = open(self.filename, 'w')\n\n for line in lines:\n if not re.match(pattern, line.strip()):\n f.write(line)\n\n f.close()\n\n def add_module(self):\n if self.checkmode:\n f = open(os.devnull, 'a')\n else:\n f = open(self.filename, 'a')\n\n f.write('blacklist %s\\n' % self.module)\n\n f.close()\n\n\ndef main():\n module = AnsibleModule(\n argument_spec=dict(\n name=dict(type='str', required=True),\n state=dict(type='str', default='present', choices=['absent', 'present']),\n blacklist_file=dict(type='str')\n ),\n supports_check_mode=True,\n )\n\n args = dict(changed=False, failed=False,\n name=module.params['name'], state=module.params['state'])\n\n filename = '/etc/modprobe.d/blacklist-ansible.conf'\n\n if module.params['blacklist_file']:\n filename = module.params['blacklist_file']\n\n blacklist = Blacklist(args['name'], filename, module.check_mode)\n\n if blacklist.create_file():\n args['changed'] = True\n else:\n args['changed'] = False\n\n if blacklist.module_listed():\n if args['state'] == 'absent':\n blacklist.remove_module()\n args['changed'] = True\n else:\n if args['state'] == 'present':\n blacklist.add_module()\n args['changed'] = True\n\n module.exit_json(**args)\n\n\nif __name__ == '__main__':\n main()\n", "license": "gpl-3.0"}
{"repo_name": "blackbliss/callme", "path": "flask/lib/python2.7/site-packages/werkzeug/contrib/cache.py", "copies": "306", "size": "23519", "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.contrib.cache\n ~~~~~~~~~~~~~~~~~~~~~~\n\n The main problem with dynamic Web sites is, well, they're dynamic. Each\n time a user requests a page, the webserver executes a lot of code, queries\n the database, renders templates until the visitor gets the page he sees.\n\n This is a lot more expensive than just loading a file from the file system\n and sending it to the visitor.\n\n For most Web applications, this overhead isn't a big deal but once it\n becomes, you will be glad to have a cache system in place.\n\n How Caching Works\n =================\n\n Caching is pretty simple. Basically you have a cache object lurking around\n somewhere that is connected to a remote cache or the file system or\n something else. When the request comes in you check if the current page\n is already in the cache and if so, you're returning it from the cache.\n Otherwise you generate the page and put it into the cache. (Or a fragment\n of the page, you don't have to cache the full thing)\n\n Here is a simple example of how to cache a sidebar for a template::\n\n def get_sidebar(user):\n identifier = 'sidebar_for/user%d' % user.id\n value = cache.get(identifier)\n if value is not None:\n return value\n value = generate_sidebar_for(user=user)\n cache.set(identifier, value, timeout=60 * 5)\n return value\n\n Creating a Cache Object\n =======================\n\n To create a cache object you just import the cache system of your choice\n from the cache module and instantiate it. Then you can start working\n with that object:\n\n >>> from werkzeug.contrib.cache import SimpleCache\n >>> c = SimpleCache()\n >>> c.set(\"foo\", \"value\")\n >>> c.get(\"foo\")\n 'value'\n >>> c.get(\"missing\") is None\n True\n\n Please keep in mind that you have to create the cache and put it somewhere\n you have access to it (either as a module global you can import or you just\n put it into your WSGI application).\n\n :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.\n :license: BSD, see LICENSE for more details.\n\"\"\"\nimport os\nimport re\nimport tempfile\nfrom hashlib import md5\nfrom time import time\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle\n\nfrom werkzeug._compat import iteritems, string_types, text_type, \\\n integer_types, to_bytes\nfrom werkzeug.posixemulation import rename\n\n\ndef _items(mappingorseq):\n \"\"\"Wrapper for efficient iteration over mappings represented by dicts\n or sequences::\n\n >>> for k, v in _items((i, i*i) for i in xrange(5)):\n ... assert k*k == v\n\n >>> for k, v in _items(dict((i, i*i) for i in xrange(5))):\n ... assert k*k == v\n\n \"\"\"\n if hasattr(mappingorseq, \"iteritems\"):\n return mappingorseq.iteritems()\n elif hasattr(mappingorseq, \"items\"):\n return mappingorseq.items()\n return mappingorseq\n\n\nclass BaseCache(object):\n \"\"\"Baseclass for the cache systems. All the cache systems implement this\n API or a superset of it.\n\n :param default_timeout: the default timeout that is used if no timeout is\n specified on :meth:`set`.\n \"\"\"\n\n def __init__(self, default_timeout=300):\n self.default_timeout = default_timeout\n\n def get(self, key):\n \"\"\"Looks up key in the cache and returns the value for it.\n If the key does not exist `None` is returned instead.\n\n :param key: the key to be looked up.\n \"\"\"\n return None\n\n def delete(self, key):\n \"\"\"Deletes `key` from the cache. If it does not exist in the cache\n nothing happens.\n\n :param key: the key to delete.\n \"\"\"\n pass\n\n def get_many(self, *keys):\n \"\"\"Returns a list of values for the given keys.\n For each key a item in the list is created. Example::\n\n foo, bar = cache.get_many(\"foo\", \"bar\")\n\n If a key can't be looked up `None` is returned for that key\n instead.\n\n :param keys: The function accepts multiple keys as positional\n arguments.\n \"\"\"\n return map(self.get, keys)\n\n def get_dict(self, *keys):\n \"\"\"Works like :meth:`get_many` but returns a dict::\n\n d = cache.get_dict(\"foo\", \"bar\")\n foo = d[\"foo\"]\n bar = d[\"bar\"]\n\n :param keys: The function accepts multiple keys as positional\n arguments.\n \"\"\"\n return dict(zip(keys, self.get_many(*keys)))\n\n def set(self, key, value, timeout=None):\n \"\"\"Adds a new key/value to the cache (overwrites value, if key already\n exists in the cache).\n\n :param key: the key to set\n :param value: the value for the key\n :param timeout: the cache timeout for the key (if not specified,\n it uses the default timeout).\n \"\"\"\n pass\n\n def add(self, key, value, timeout=None):\n \"\"\"Works like :meth:`set` but does not overwrite the values of already\n existing keys.\n\n :param key: the key to set\n :param value: the value for the key\n :param timeout: the cache timeout for the key or the default\n timeout if not specified.\n \"\"\"\n pass\n\n def set_many(self, mapping, timeout=None):\n \"\"\"Sets multiple keys and values from a mapping.\n\n :param mapping: a mapping with the keys/values to set.\n :param timeout: the cache timeout for the key (if not specified,\n it uses the default timeout).\n \"\"\"\n for key, value in _items(mapping):\n self.set(key, value, timeout)\n\n def delete_many(self, *keys):\n \"\"\"Deletes multiple keys at once.\n\n :param keys: The function accepts multiple keys as positional\n arguments.\n \"\"\"\n for key in keys:\n self.delete(key)\n\n def clear(self):\n \"\"\"Clears the cache. Keep in mind that not all caches support\n completely clearing the cache.\n \"\"\"\n pass\n\n def inc(self, key, delta=1):\n \"\"\"Increments the value of a key by `delta`. If the key does\n not yet exist it is initialized with `delta`.\n\n For supporting caches this is an atomic operation.\n\n :param key: the key to increment.\n :param delta: the delta to add.\n \"\"\"\n self.set(key, (self.get(key) or 0) + delta)\n\n def dec(self, key, delta=1):\n \"\"\"Decrements the value of a key by `delta`. If the key does\n not yet exist it is initialized with `-delta`.\n\n For supporting caches this is an atomic operation.\n\n :param key: the key to increment.\n :param delta: the delta to subtract.\n \"\"\"\n self.set(key, (self.get(key) or 0) - delta)\n\n\nclass NullCache(BaseCache):\n \"\"\"A cache that doesn't cache. This can be useful for unit testing.\n\n :param default_timeout: a dummy parameter that is ignored but exists\n for API compatibility with other caches.\n \"\"\"\n\n\nclass SimpleCache(BaseCache):\n \"\"\"Simple memory cache for single process environments. This class exists\n mainly for the development server and is not 100% thread safe. It tries\n to use as many atomic operations as possible and no locks for simplicity\n but it could happen under heavy load that keys are added multiple times.\n\n :param threshold: the maximum number of items the cache stores before\n it starts deleting some.\n :param default_timeout: the default timeout that is used if no timeout is\n specified on :meth:`~BaseCache.set`.\n \"\"\"\n\n def __init__(self, threshold=500, default_timeout=300):\n BaseCache.__init__(self, default_timeout)\n self._cache = {}\n self.clear = self._cache.clear\n self._threshold = threshold\n\n def _prune(self):\n if len(self._cache) > self._threshold:\n now = time()\n for idx, (key, (expires, _)) in enumerate(self._cache.items()):\n if expires <= now or idx % 3 == 0:\n self._cache.pop(key, None)\n\n def get(self, key):\n expires, value = self._cache.get(key, (0, None))\n if expires > time():\n return pickle.loads(value)\n\n def set(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n self._prune()\n self._cache[key] = (time() + timeout, pickle.dumps(value,\n pickle.HIGHEST_PROTOCOL))\n\n def add(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n if len(self._cache) > self._threshold:\n self._prune()\n item = (time() + timeout, pickle.dumps(value,\n pickle.HIGHEST_PROTOCOL))\n self._cache.setdefault(key, item)\n\n def delete(self, key):\n self._cache.pop(key, None)\n\n\n_test_memcached_key = re.compile(br'[^\\x00-\\x21\\xff]{1,250}$').match\n\nclass MemcachedCache(BaseCache):\n \"\"\"A cache that uses memcached as backend.\n\n The first argument can either be an object that resembles the API of a\n :class:`memcache.Client` or a tuple/list of server addresses. In the\n event that a tuple/list is passed, Werkzeug tries to import the best\n available memcache library.\n\n Implementation notes: This cache backend works around some limitations in\n memcached to simplify the interface. For example unicode keys are encoded\n to utf-8 on the fly. Methods such as :meth:`~BaseCache.get_dict` return\n the keys in the same format as passed. Furthermore all get methods\n silently ignore key errors to not cause problems when untrusted user data\n is passed to the get methods which is often the case in web applications.\n\n :param servers: a list or tuple of server addresses or alternatively\n a :class:`memcache.Client` or a compatible client.\n :param default_timeout: the default timeout that is used if no timeout is\n specified on :meth:`~BaseCache.set`.\n :param key_prefix: a prefix that is added before all keys. This makes it\n possible to use the same memcached server for different\n applications. Keep in mind that\n :meth:`~BaseCache.clear` will also clear keys with a\n different prefix.\n \"\"\"\n\n def __init__(self, servers=None, default_timeout=300, key_prefix=None):\n BaseCache.__init__(self, default_timeout)\n if servers is None or isinstance(servers, (list, tuple)):\n if servers is None:\n servers = ['127.0.0.1:11211']\n self._client = self.import_preferred_memcache_lib(servers)\n if self._client is None:\n raise RuntimeError('no memcache module found')\n else:\n # NOTE: servers is actually an already initialized memcache\n # client.\n self._client = servers\n\n self.key_prefix = to_bytes(key_prefix)\n\n def get(self, key):\n if isinstance(key, text_type):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n # memcached doesn't support keys longer than that. Because often\n # checks for so long keys can occour because it's tested from user\n # submitted data etc we fail silently for getting.\n if _test_memcached_key(key):\n return self._client.get(key)\n\n def get_dict(self, *keys):\n key_mapping = {}\n have_encoded_keys = False\n for key in keys:\n if isinstance(key, unicode):\n encoded_key = key.encode('utf-8')\n have_encoded_keys = True\n else:\n encoded_key = key\n if self.key_prefix:\n encoded_key = self.key_prefix + encoded_key\n if _test_memcached_key(key):\n key_mapping[encoded_key] = key\n d = rv = self._client.get_multi(key_mapping.keys())\n if have_encoded_keys or self.key_prefix:\n rv = {}\n for key, value in iteritems(d):\n rv[key_mapping[key]] = value\n if len(rv) < len(keys):\n for key in keys:\n if key not in rv:\n rv[key] = None\n return rv\n\n def add(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n if isinstance(key, text_type):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n self._client.add(key, value, timeout)\n\n def set(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n if isinstance(key, text_type):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n self._client.set(key, value, timeout)\n\n def get_many(self, *keys):\n d = self.get_dict(*keys)\n return [d[key] for key in keys]\n\n def set_many(self, mapping, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n new_mapping = {}\n for key, value in _items(mapping):\n if isinstance(key, text_type):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n new_mapping[key] = value\n self._client.set_multi(new_mapping, timeout)\n\n def delete(self, key):\n if isinstance(key, unicode):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n if _test_memcached_key(key):\n self._client.delete(key)\n\n def delete_many(self, *keys):\n new_keys = []\n for key in keys:\n if isinstance(key, unicode):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n if _test_memcached_key(key):\n new_keys.append(key)\n self._client.delete_multi(new_keys)\n\n def clear(self):\n self._client.flush_all()\n\n def inc(self, key, delta=1):\n if isinstance(key, unicode):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n self._client.incr(key, delta)\n\n def dec(self, key, delta=1):\n if isinstance(key, unicode):\n key = key.encode('utf-8')\n if self.key_prefix:\n key = self.key_prefix + key\n self._client.decr(key, delta)\n\n def import_preferred_memcache_lib(self, servers):\n \"\"\"Returns an initialized memcache client. Used by the constructor.\"\"\"\n try:\n import pylibmc\n except ImportError:\n pass\n else:\n return pylibmc.Client(servers)\n\n try:\n from google.appengine.api import memcache\n except ImportError:\n pass\n else:\n return memcache.Client()\n\n try:\n import memcache\n except ImportError:\n pass\n else:\n return memcache.Client(servers)\n\n\n# backwards compatibility\nGAEMemcachedCache = MemcachedCache\n\n\nclass RedisCache(BaseCache):\n \"\"\"Uses the Redis key-value store as a cache backend.\n\n The first argument can be either a string denoting address of the Redis\n server or an object resembling an instance of a redis.Redis class.\n\n Note: Python Redis API already takes care of encoding unicode strings on\n the fly.\n\n .. versionadded:: 0.7\n\n .. versionadded:: 0.8\n `key_prefix` was added.\n\n .. versionchanged:: 0.8\n This cache backend now properly serializes objects.\n\n .. versionchanged:: 0.8.3\n This cache backend now supports password authentication.\n\n :param host: address of the Redis server or an object which API is\n compatible with the official Python Redis client (redis-py).\n :param port: port number on which Redis server listens for connections.\n :param password: password authentication for the Redis server.\n :param db: db (zero-based numeric index) on Redis Server to connect.\n :param default_timeout: the default timeout that is used if no timeout is\n specified on :meth:`~BaseCache.set`.\n :param key_prefix: A prefix that should be added to all keys.\n \"\"\"\n\n def __init__(self, host='localhost', port=6379, password=None,\n db=0, default_timeout=300, key_prefix=None):\n BaseCache.__init__(self, default_timeout)\n if isinstance(host, string_types):\n try:\n import redis\n except ImportError:\n raise RuntimeError('no redis module found')\n self._client = redis.Redis(host=host, port=port, password=password, db=db)\n else:\n self._client = host\n self.key_prefix = key_prefix or ''\n\n def dump_object(self, value):\n \"\"\"Dumps an object into a string for redis. By default it serializes\n integers as regular string and pickle dumps everything else.\n \"\"\"\n t = type(value)\n if t in integer_types:\n return str(value).encode('ascii')\n return b'!' + pickle.dumps(value)\n\n def load_object(self, value):\n \"\"\"The reversal of :meth:`dump_object`. This might be callde with\n None.\n \"\"\"\n if value is None:\n return None\n if value.startswith(b'!'):\n return pickle.loads(value[1:])\n try:\n return int(value)\n except ValueError:\n # before 0.8 we did not have serialization. Still support that.\n return value\n\n def get(self, key):\n return self.load_object(self._client.get(self.key_prefix + key))\n\n def get_many(self, *keys):\n if self.key_prefix:\n keys = [self.key_prefix + key for key in keys]\n return [self.load_object(x) for x in self._client.mget(keys)]\n\n def set(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n dump = self.dump_object(value)\n self._client.setex(self.key_prefix + key, dump, timeout)\n\n def add(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n dump = self.dump_object(value)\n added = self._client.setnx(self.key_prefix + key, dump)\n if added:\n self._client.expire(self.key_prefix + key, timeout)\n\n def set_many(self, mapping, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n pipe = self._client.pipeline()\n for key, value in _items(mapping):\n dump = self.dump_object(value)\n pipe.setex(self.key_prefix + key, dump, timeout)\n pipe.execute()\n\n def delete(self, key):\n self._client.delete(self.key_prefix + key)\n\n def delete_many(self, *keys):\n if not keys:\n return\n if self.key_prefix:\n keys = [self.key_prefix + key for key in keys]\n self._client.delete(*keys)\n\n def clear(self):\n if self.key_prefix:\n keys = self._client.keys(self.key_prefix + '*')\n if keys:\n self._client.delete(*keys)\n else:\n self._client.flushdb()\n\n def inc(self, key, delta=1):\n return self._client.incr(self.key_prefix + key, delta)\n\n def dec(self, key, delta=1):\n return self._client.decr(self.key_prefix + key, delta)\n\n\nclass FileSystemCache(BaseCache):\n \"\"\"A cache that stores the items on the file system. This cache depends\n on being the only user of the `cache_dir`. Make absolutely sure that\n nobody but this cache stores files there or otherwise the cache will\n randomly delete files therein.\n\n :param cache_dir: the directory where cache files are stored.\n :param threshold: the maximum number of items the cache stores before\n it starts deleting some.\n :param default_timeout: the default timeout that is used if no timeout is\n specified on :meth:`~BaseCache.set`.\n :param mode: the file mode wanted for the cache files, default 0600\n \"\"\"\n\n #: used for temporary files by the FileSystemCache\n _fs_transaction_suffix = '.__wz_cache'\n\n def __init__(self, cache_dir, threshold=500, default_timeout=300, mode=0o600):\n BaseCache.__init__(self, default_timeout)\n self._path = cache_dir\n self._threshold = threshold\n self._mode = mode\n if not os.path.exists(self._path):\n os.makedirs(self._path)\n\n def _list_dir(self):\n \"\"\"return a list of (fully qualified) cache filenames\n \"\"\"\n return [os.path.join(self._path, fn) for fn in os.listdir(self._path)\n if not fn.endswith(self._fs_transaction_suffix)]\n\n def _prune(self):\n entries = self._list_dir()\n if len(entries) > self._threshold:\n now = time()\n for idx, fname in enumerate(entries):\n remove = False\n f = None\n try:\n try:\n f = open(fname, 'rb')\n expires = pickle.load(f)\n remove = expires <= now or idx % 3 == 0\n finally:\n if f is not None:\n f.close()\n except Exception:\n pass\n if remove:\n try:\n os.remove(fname)\n except (IOError, OSError):\n pass\n\n def clear(self):\n for fname in self._list_dir():\n try:\n os.remove(fname)\n except (IOError, OSError):\n pass\n\n def _get_filename(self, key):\n if isinstance(key, text_type):\n key = key.encode('utf-8') #XXX unicode review\n hash = md5(key).hexdigest()\n return os.path.join(self._path, hash)\n\n def get(self, key):\n filename = self._get_filename(key)\n try:\n f = open(filename, 'rb')\n try:\n if pickle.load(f) >= time():\n return pickle.load(f)\n finally:\n f.close()\n os.remove(filename)\n except Exception:\n return None\n\n def add(self, key, value, timeout=None):\n filename = self._get_filename(key)\n if not os.path.exists(filename):\n self.set(key, value, timeout)\n\n def set(self, key, value, timeout=None):\n if timeout is None:\n timeout = self.default_timeout\n filename = self._get_filename(key)\n self._prune()\n try:\n fd, tmp = tempfile.mkstemp(suffix=self._fs_transaction_suffix,\n dir=self._path)\n f = os.fdopen(fd, 'wb')\n try:\n pickle.dump(int(time() + timeout), f, 1)\n pickle.dump(value, f, pickle.HIGHEST_PROTOCOL)\n finally:\n f.close()\n rename(tmp, filename)\n os.chmod(filename, self._mode)\n except (IOError, OSError):\n pass\n\n def delete(self, key):\n try:\n os.remove(self._get_filename(key))\n except (IOError, OSError):\n pass\n", "license": "mit"}
{"repo_name": "pipet/pipet", "path": "pipet/sources/zendesk/tasks.py", "copies": "2", "size": "1544", "content": "from contextlib import contextmanager\nfrom datetime import datetime\nfrom inspect import isclass\n\nfrom celery import chord, group\nfrom celery_once import QueueOnce\nfrom celery.schedules import crontab\nfrom celery.utils.log import get_task_logger\nfrom sqlalchemy.orm.attributes import flag_modified\n\n# from pipet import celery\nfrom pipet.models import db, Organization\nfrom pipet.sources.zendesk import ZendeskAccount\nfrom pipet.sources.zendesk.models import (\n Base,\n CLASS_REGISTRY,\n)\n\n\nlogger = get_task_logger(__name__)\n\n\n# @celery.task(base=QueueOnce, once={'graceful': True})\ndef sync(account_id):\n with app.app_context():\n account = ZendeskAccount.query.get(account_id)\n session = account.organization.create_session()\n\n for cls in [m for n, m in CLASS_REGISTRY.items() if isclass(m) and issubclass(m, Base)]:\n # TODO: Make these parallel to speed up execution\n while True:\n conn = session.connection()\n statments, cursor, has_more = cls.sync(account)\n account.cursors[cls.__tablename__] = cursor\n flag_modified(account, 'cursors')\n\n for statement in statments:\n conn.execute(statement)\n\n session.commit()\n\n db.session.add(account)\n db.session.commit()\n\n if not has_more:\n break\n\n\n# @celery.task\ndef sync_all():\n job = group([sync.s(account.id) for account in ZendeskAccount.query.all()])\n job.apply_async()\n", "license": "apache-2.0"}
{"repo_name": "tomchristie/django", "path": "django/apps/config.py", "copies": "55", "size": "8047", "content": "import os\nfrom importlib import import_module\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.module_loading import module_has_submodule\n\nMODELS_MODULE_NAME = 'models'\n\n\nclass AppConfig:\n \"\"\"Class representing a Django application and its configuration.\"\"\"\n\n def __init__(self, app_name, app_module):\n # Full Python path to the application e.g. 'django.contrib.admin'.\n self.name = app_name\n\n # Root module for the application e.g. <module 'django.contrib.admin'\n # from 'django/contrib/admin/__init__.py'>.\n self.module = app_module\n\n # Reference to the Apps registry that holds this AppConfig. Set by the\n # registry when it registers the AppConfig instance.\n self.apps = None\n\n # The following attributes could be defined at the class level in a\n # subclass, hence the test-and-set pattern.\n\n # Last component of the Python path to the application e.g. 'admin'.\n # This value must be unique across a Django project.\n if not hasattr(self, 'label'):\n self.label = app_name.rpartition(\".\")[2]\n\n # Human-readable name for the application e.g. \"Admin\".\n if not hasattr(self, 'verbose_name'):\n self.verbose_name = self.label.title()\n\n # Filesystem path to the application directory e.g.\n # '/path/to/django/contrib/admin'.\n if not hasattr(self, 'path'):\n self.path = self._path_from_module(app_module)\n\n # Module containing models e.g. <module 'django.contrib.admin.models'\n # from 'django/contrib/admin/models.py'>. Set by import_models().\n # None if the application doesn't have a models module.\n self.models_module = None\n\n # Mapping of lower case model names to model classes. Initially set to\n # None to prevent accidental access before import_models() runs.\n self.models = None\n\n def __repr__(self):\n return '<%s: %s>' % (self.__class__.__name__, self.label)\n\n def _path_from_module(self, module):\n \"\"\"Attempt to determine app's filesystem path from its module.\"\"\"\n # See #21874 for extended discussion of the behavior of this method in\n # various cases.\n # Convert paths to list because Python's _NamespacePath doesn't support\n # indexing.\n paths = list(getattr(module, '__path__', []))\n if len(paths) != 1:\n filename = getattr(module, '__file__', None)\n if filename is not None:\n paths = [os.path.dirname(filename)]\n else:\n # For unknown reasons, sometimes the list returned by __path__\n # contains duplicates that must be removed (#25246).\n paths = list(set(paths))\n if len(paths) > 1:\n raise ImproperlyConfigured(\n \"The app module %r has multiple filesystem locations (%r); \"\n \"you must configure this app with an AppConfig subclass \"\n \"with a 'path' class attribute.\" % (module, paths))\n elif not paths:\n raise ImproperlyConfigured(\n \"The app module %r has no filesystem location, \"\n \"you must configure this app with an AppConfig subclass \"\n \"with a 'path' class attribute.\" % (module,))\n return paths[0]\n\n @classmethod\n def create(cls, entry):\n \"\"\"\n Factory that creates an app config from an entry in INSTALLED_APPS.\n \"\"\"\n try:\n # If import_module succeeds, entry is a path to an app module,\n # which may specify an app config class with default_app_config.\n # Otherwise, entry is a path to an app config class or an error.\n module = import_module(entry)\n\n except ImportError:\n # Track that importing as an app module failed. If importing as an\n # app config class fails too, we'll trigger the ImportError again.\n module = None\n\n mod_path, _, cls_name = entry.rpartition('.')\n\n # Raise the original exception when entry cannot be a path to an\n # app config class.\n if not mod_path:\n raise\n\n else:\n try:\n # If this works, the app module specifies an app config class.\n entry = module.default_app_config\n except AttributeError:\n # Otherwise, it simply uses the default app config class.\n return cls(entry, module)\n else:\n mod_path, _, cls_name = entry.rpartition('.')\n\n # If we're reaching this point, we must attempt to load the app config\n # class located at <mod_path>.<cls_name>\n mod = import_module(mod_path)\n try:\n cls = getattr(mod, cls_name)\n except AttributeError:\n if module is None:\n # If importing as an app module failed, that error probably\n # contains the most informative traceback. Trigger it again.\n import_module(entry)\n else:\n raise\n\n # Check for obvious errors. (This check prevents duck typing, but\n # it could be removed if it became a problem in practice.)\n if not issubclass(cls, AppConfig):\n raise ImproperlyConfigured(\n \"'%s' isn't a subclass of AppConfig.\" % entry)\n\n # Obtain app name here rather than in AppClass.__init__ to keep\n # all error checking for entries in INSTALLED_APPS in one place.\n try:\n app_name = cls.name\n except AttributeError:\n raise ImproperlyConfigured(\n \"'%s' must supply a name attribute.\" % entry)\n\n # Ensure app_name points to a valid module.\n try:\n app_module = import_module(app_name)\n except ImportError:\n raise ImproperlyConfigured(\n \"Cannot import '%s'. Check that '%s.%s.name' is correct.\" % (\n app_name, mod_path, cls_name,\n )\n )\n\n # Entry is a path to an app config class.\n return cls(app_name, app_module)\n\n def get_model(self, model_name, require_ready=True):\n \"\"\"\n Return the model with the given case-insensitive model_name.\n\n Raise LookupError if no model exists with this name.\n \"\"\"\n if require_ready:\n self.apps.check_models_ready()\n else:\n self.apps.check_apps_ready()\n try:\n return self.models[model_name.lower()]\n except KeyError:\n raise LookupError(\n \"App '%s' doesn't have a '%s' model.\" % (self.label, model_name))\n\n def get_models(self, include_auto_created=False, include_swapped=False):\n \"\"\"\n Return an iterable of models.\n\n By default, the following models aren't included:\n\n - auto-created models for many-to-many relations without\n an explicit intermediate table,\n - models that have been swapped out.\n\n Set the corresponding keyword argument to True to include such models.\n Keyword arguments aren't documented; they're a private API.\n \"\"\"\n self.apps.check_models_ready()\n for model in self.models.values():\n if model._meta.auto_created and not include_auto_created:\n continue\n if model._meta.swapped and not include_swapped:\n continue\n yield model\n\n def import_models(self):\n # Dictionary of models for this app, primarily maintained in the\n # 'all_models' attribute of the Apps this AppConfig is attached to.\n self.models = self.apps.all_models[self.label]\n\n if module_has_submodule(self.module, MODELS_MODULE_NAME):\n models_module_name = '%s.%s' % (self.name, MODELS_MODULE_NAME)\n self.models_module = import_module(models_module_name)\n\n def ready(self):\n \"\"\"\n Override this method in subclasses to run code when Django starts.\n \"\"\"\n", "license": "bsd-3-clause"}
{"repo_name": "prutseltje/ansible", "path": "test/units/modules/network/f5/test_bigip_gtm_datacenter.py", "copies": "23", "size": "6819", "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2017 F5 Networks Inc.\n# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\nimport os\nimport json\nimport sys\n\nfrom nose.plugins.skip import SkipTest\nif sys.version_info < (2, 7):\n raise SkipTest(\"F5 Ansible modules require Python >= 2.7\")\n\nfrom ansible.compat.tests import unittest\nfrom ansible.compat.tests.mock import Mock\nfrom ansible.compat.tests.mock import patch\nfrom ansible.module_utils.basic import AnsibleModule\n\ntry:\n from library.modules.bigip_gtm_datacenter import ApiParameters\n from library.modules.bigip_gtm_datacenter import ModuleParameters\n from library.modules.bigip_gtm_datacenter import ModuleManager\n from library.modules.bigip_gtm_datacenter import ArgumentSpec\n from library.module_utils.network.f5.common import F5ModuleError\n from library.module_utils.network.f5.common import iControlUnexpectedHTTPError\n from test.unit.modules.utils import set_module_args\nexcept ImportError:\n try:\n from ansible.modules.network.f5.bigip_gtm_datacenter import ApiParameters\n from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleParameters\n from ansible.modules.network.f5.bigip_gtm_datacenter import ModuleManager\n from ansible.modules.network.f5.bigip_gtm_datacenter import ArgumentSpec\n from ansible.module_utils.network.f5.common import F5ModuleError\n from ansible.module_utils.network.f5.common import iControlUnexpectedHTTPError\n from units.modules.utils import set_module_args\n except ImportError:\n raise SkipTest(\"F5 Ansible modules require the f5-sdk Python library\")\n\nfixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')\nfixture_data = {}\n\n\ndef load_fixture(name):\n path = os.path.join(fixture_path, name)\n\n if path in fixture_data:\n return fixture_data[path]\n\n with open(path) as f:\n data = f.read()\n\n try:\n data = json.loads(data)\n except Exception:\n pass\n\n fixture_data[path] = data\n return data\n\n\nclass TestParameters(unittest.TestCase):\n def test_module_parameters(self):\n args = dict(\n state='present',\n contact='foo',\n description='bar',\n location='baz',\n name='datacenter'\n )\n p = ModuleParameters(params=args)\n assert p.state == 'present'\n\n def test_api_parameters(self):\n args = load_fixture('load_gtm_datacenter_default.json')\n p = ApiParameters(params=args)\n assert p.name == 'asd'\n\n def test_module_parameters_state_present(self):\n args = dict(\n state='present'\n )\n p = ModuleParameters(params=args)\n assert p.state == 'present'\n assert p.enabled is True\n\n def test_module_parameters_state_absent(self):\n args = dict(\n state='absent'\n )\n p = ModuleParameters(params=args)\n assert p.state == 'absent'\n\n def test_module_parameters_state_enabled(self):\n args = dict(\n state='enabled'\n )\n p = ModuleParameters(params=args)\n assert p.state == 'enabled'\n assert p.enabled is True\n assert p.disabled is None\n\n def test_module_parameters_state_disabled(self):\n args = dict(\n state='disabled'\n )\n p = ModuleParameters(params=args)\n assert p.state == 'disabled'\n assert p.enabled is None\n assert p.disabled is True\n\n\nclass TestManager(unittest.TestCase):\n\n def setUp(self):\n self.spec = ArgumentSpec()\n\n def test_create_datacenter(self, *args):\n set_module_args(dict(\n state='present',\n password='admin',\n server='localhost',\n user='admin',\n name='foo'\n ))\n\n module = AnsibleModule(\n argument_spec=self.spec.argument_spec,\n supports_check_mode=self.spec.supports_check_mode\n )\n mm = ModuleManager(module=module)\n\n # Override methods to force specific logic in the module to happen\n mm.exists = Mock(side_effect=[False, True])\n mm.create_on_device = Mock(return_value=True)\n\n results = mm.exec_module()\n assert results['changed'] is True\n assert results['state'] == 'present'\n\n def test_create_disabled_datacenter(self, *args):\n set_module_args(dict(\n state='disabled',\n password='admin',\n server='localhost',\n user='admin',\n name='foo'\n ))\n\n module = AnsibleModule(\n argument_spec=self.spec.argument_spec,\n supports_check_mode=self.spec.supports_check_mode\n )\n mm = ModuleManager(module=module)\n\n # Override methods to force specific logic in the module to happen\n mm.exists = Mock(side_effect=[False, True])\n mm.create_on_device = Mock(return_value=True)\n\n results = mm.exec_module()\n assert results['changed'] is True\n assert results['enabled'] is False\n assert results['disabled'] is True\n\n def test_create_enabled_datacenter(self, *args):\n set_module_args(dict(\n state='enabled',\n password='admin',\n server='localhost',\n user='admin',\n name='foo'\n ))\n\n module = AnsibleModule(\n argument_spec=self.spec.argument_spec,\n supports_check_mode=self.spec.supports_check_mode\n )\n mm = ModuleManager(module=module)\n\n # Override methods to force specific logic in the module to happen\n mm.exists = Mock(side_effect=[False, True])\n mm.create_on_device = Mock(return_value=True)\n\n results = mm.exec_module()\n assert results['changed'] is True\n assert results['enabled'] is True\n assert results['disabled'] is False\n\n def test_idempotent_disable_datacenter(self, *args):\n set_module_args(dict(\n state='disabled',\n password='admin',\n server='localhost',\n user='admin',\n name='foo'\n ))\n\n module = AnsibleModule(\n argument_spec=self.spec.argument_spec,\n supports_check_mode=self.spec.supports_check_mode\n )\n\n current = ApiParameters(params=load_fixture('load_gtm_datacenter_disabled.json'))\n\n mm = ModuleManager(module=module)\n\n # Override methods to force specific logic in the module to happen\n mm.exists = Mock(return_value=True)\n mm.update_on_device = Mock(return_value=True)\n mm.read_current_from_device = Mock(return_value=current)\n\n results = mm.exec_module()\n assert results['changed'] is False\n", "license": "gpl-3.0"}