Skip to content
This repository
Browse code

Start work towards making the happy pandas less manual and run on mul…

…tiple machines
  • Loading branch information...
commit 48de3b90b575a914ab0e33b29fa2a3539c5df12c 1 parent f038fdc
Holden Karau authored November 05, 2012
7  Unicorn/Cpp.pm
@@ -3,7 +3,7 @@ use strict;
3 3
 use File::Basename;
4 4
 use File::Slurp qw (slurp);
5 5
 
6  
-my $spatchexec = "/usr/bin/spatch";
  6
+my $spatchexec = "spatch";
7 7
 my $spatchdir = "cpp_semantic";
8 8
 
9 9
 sub check_cpp {
@@ -19,8 +19,9 @@ sub fix_cpp {
19 19
     while (my $spatch_file = readdir($spatch_files)) {
20 20
 	chomp ($spatch_file);
21 21
 	if (-f $spatchdir."/".$spatch_file && $spatch_file =~ /\.cocci$/) {
22  
-	    print "running spatch $spatchdir/$spatch_file";
23  
-	    `$spatchexec --in-place --sp-file $spatchdir/$spatch_file $file`;
  22
+	    print "running spatch $spatchdir/$spatch_file $file\n";
  23
+	    print "got:\n";
  24
+	    print `$spatchexec --in-place --sp-file $spatchdir/$spatch_file $file`;
24 25
 	}
25 26
     }
26 27
     closedir($spatch_files);
3  bigquerytargets.pl
... ...
@@ -0,0 +1,3 @@
  1
+# Gets top repos from  gitarchive.org
  2
+# Please run a bigtable query beforehand to make sure you have bq credentials setup
  3
+`bq --project_id holdensmagicalunicorn query
8  bigtablequery.bq
... ...
@@ -0,0 +1,8 @@
  1
+/* top 15000 repos for C++ by number of pushes */
  2
+SELECT repository_name, count(repository_name) as pushes, repository_description, repository_url
  3
+FROM [githubarchive:github.timeline]
  4
+WHERE type="PushEvent"
  5
+AND (repository_language="C++")
  6
+GROUP BY repository_name, repository_description, repository_url
  7
+ORDER BY pushes DESC
  8
+LIMIT 15000;
3  cpp_semantic/deprecated_getwd.cocci
@@ -5,5 +5,4 @@ int y;
5 5
 @@
6 6
 char x[y];
7 7
 - getwd(x);
8  
-+ getcwd(x,y);
9  
-@@
  8
++ getcwd(x,y);
4  cpp_semantic/memcpy_null.cocci
@@ -6,5 +6,5 @@
6 6
 function memcpy;
7 7
 identifier x;
8 8
 @@
9  
--memcpy(x, NULL, 0)
10  
-+
  9
+-memcpy(x, 0, 0);
  10
++x;
7  main.pl
... ...
@@ -0,0 +1,7 @@
  1
+#!/usr/bin/perl
  2
+# The purpose of this is to turn the entire pipeline, possibly on multiple machines
  3
+# First step is to get the list of projects to consider which runs on a single host
  4
+# but we don't have to block on it
  5
+open (BINGTARGETS , "perl targets.pl| tee bingtargets |");
  6
+open (GHTARGETS, "perl targets2.pl| tee ghtargets |");
  7
+open (BQTARGETS, "perl bigquerytargets.pl| tee bqtargets|");
7  t/cpp_expected/deprecated_min_max_with_alg.cpp
... ...
@@ -0,0 +1,7 @@
  1
+#include <algorithm>
  2
+#include <iostream>
  3
+
  4
+int main() {
  5
+  std::cout << (std::min(1, 2)) << endl;
  6
+  return 0;
  7
+}
2  targets.pl
@@ -35,7 +35,7 @@
35 35
 	my $response = $search->search();
36 36
 	
37 37
 	foreach my $result ( @{$response->results} ) {
38  
-	    print $result->Title, " -> ", $result->Url, "\n";
  38
+	    print $result->Url, "\n";
39 39
 	}
40 40
 	$offset += $inc;
41 41
     }

0 notes on commit 48de3b9

Please sign in to comment.
Something went wrong with that request. Please try again.