Skip to content

Instantly share code, notes, and snippets.

@paigecm
paigecm / debates3.php
Created October 20, 2016 17:01
Script for separating the third presidential debate by speaker
<?php
#Thanks to the VoyantTools Twitter (@VoyantTools) for the original php script!)
$dirname = dirname(__FILE__);
$filename = "debate3.txt"; #assumes you have https://gist.github.com/paigecm/52ce175a98a3f0baa76dc0847c445b5e
$speaker = ""; $speeches = array();
foreach(file("$dirname/$filename") as $line) {
$withoutname = preg_replace("/^(WALLACE|CLINTON|TRUMP):/","", $line);
if ($line!=$withoutname) {
$speaker = substr($line, 0, strpos($line, ":"));
}
@paigecm
paigecm / debate3.txt
Created October 20, 2016 16:59
3rd presidential debate text
WALLACE: Good evening from the Thomas and Mack Center at the University of Nevada, Las Vegas. I’m Chris Wallace of Fox News, and I welcome you to the third and final of the 2016 presidential debates between Secretary of State Hillary Clinton and Donald J. Trump.
WALLACE: This debate is sponsored by the Commission on Presidential Debates. The commission has designed the format: Six roughly 15-minute segments with two-minute answers to the first question, then open discussion for the rest of each segment. Both campaigns have agreed to those rules.
For the record, I decided the topics and the questions in each topic. None of those questions has been shared with the commission or the two candidates. The audience here in the hall has promised to remain silent. No cheers, boos, or other interruptions so we and you can focus on what the candidates have to say.
WALLACE: No noise, except right now, as we welcome the Democratic nominee for president, Secretary Clinton, and the Republican nominee for president, Mr. Trum
@paigecm
paigecm / debates2.php
Last active October 17, 2016 23:08 — forked from anonymous/debates.php
Edited script from @voyanttools Twitter for 2nd presidential debtate
<?php
# Thanks to the VoyantTools Twitter for the original script! https://twitter.com/VoyantTools/status/780760837472526338
$dirname = dirname(__FILE__);
$filename = "2nd-pres-debate.txt"; #assumes you have https://gist.github.com/paigecm/c97f5cf12da37ae43e0895fb767c4d88
$speaker = ""; $speeches = array();
foreach(file("$dirname/$filename") as $line) {
$withoutname = preg_replace("/^(RADDATZ|COOPER|CLINTON|TRUMP):/","", $line);
if ($line!=$withoutname) {
$speaker = substr($line, 0, strpos($line, ":"));
}
RADDATZ: Ladies and gentlemen the Republican nominee for president, Donald J. Trump, and the Democratic nominee for president, Hillary Clinton.
(APPLAUSE)
COOPER: Thank you very much for being here. We’re going to begin with a question from one of the members in our town hall. Each of you will have two minutes to respond to this question. Secretary Clinton, you won the coin toss, so you’ll go first. Our first question comes from Patrice Brock. Patrice?
QUESTION: Thank you, and good evening. The last debate could have been rated as MA, mature audiences, per TV parental guidelines. Knowing that educators assign viewing the presidential debates as students’ homework, do you feel you’re modeling appropriate and positive behavior for today’s youth?
CLINTON: Well, thank you. Are you a teacher? Yes, I think that that’s a very good question, because I’ve heard from lots of teachers and parents about some of their concerns about some of the things that are being said and done in this campaign.
And I think it is very i
HOLT: Good evening from Hofstra University in Hempstead, New York. I’m Lester Holt, anchor of “NBC Nightly News.” I want to welcome you to the first presidential debate.
The participants tonight are Donald Trump and Hillary Clinton. This debate is sponsored by the Commission on Presidential Debates, a nonpartisan, nonprofit organization. The commission drafted tonight’s format, and the rules have been agreed to by the campaigns.
The 90-minute debate is divided into six segments, each 15 minutes long. We’ll explore three topic areas tonight: Achieving prosperity; America’s direction; and securing America. At the start of each segment, I will ask the same lead-off question to both candidates, and they will each have up to two minutes to respond. From that point until the end of the segment, we’ll have an open discussion.
The questions are mine and have not been shared with the commission or the campaigns. The audience here in the room has agreed to remain silent so that we can focus on what the candidates are s