<commit_before>import com.sun.jna.Platform

val compileNative = taskKey[Unit]("Compile tensorflow into shared library.")

name := "tensorflow-java"

version := "0.0.1"

scalaVersion := "2.11.8"

crossScalaVersions := Seq("2.10.6")

libraryDependencies ++= Seq(
  "net.java.dev.jna" % "jna" % "4.2.2"
)

organization := "com.github.mskimm"

licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")

compileNative := {
  import scala.sys.process._
  val libDir = file(s"src/main/resources/${Platform.RESOURCE_PREFIX}")
  if (!libDir.exists) {
    libDir.mkdirs()
  }
  val lib = if (Platform.RESOURCE_PREFIX == "darwin") {
    libDir / "libtensorflow.dylib"
  } else {
    libDir / "libtensorflow.so"
  }
  Process("git checkout v0.10.0", new File("tensorflow")).!
  "mkdir -p tensorflow/tensorflow/jna".!
  "cp src/main/cpp/BUILD tensorflow/tensorflow/jna/".!
  "cp src/main/cpp/jna.cc tensorflow/tensorflow/jna/".!
  Process("bazel build -c opt //tensorflow/jna:libtensorflow.so", new File("tensorflow")).!
  s"rm -f $lib".!
  s"mv tensorflow/bazel-bin/tensorflow/jna/libtensorflow.so $lib".!
}


<commit_msg>rename<commit_after>import com.sun.jna.Platform

val compileNative = taskKey[Unit]("Compile tensorflow into shared library.")

name := "tensorflow-scala"

version := "0.0.1"

scalaVersion := "2.11.8"

crossScalaVersions := Seq("2.10.6")

libraryDependencies ++= Seq(
  "net.java.dev.jna" % "jna" % "4.2.2"
)

organization := "com.github.mskimm"

licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")

compileNative := {
  import scala.sys.process._
  val libDir = file(s"src/main/resources/${Platform.RESOURCE_PREFIX}")
  if (!libDir.exists) {
    libDir.mkdirs()
  }
  val lib = if (Platform.RESOURCE_PREFIX == "darwin") {
    libDir / "libtensorflow.dylib"
  } else {
    libDir / "libtensorflow.so"
  }
  Process("git checkout v0.10.0", new File("tensorflow")).!
  "mkdir -p tensorflow/tensorflow/jna".!
  "cp src/main/cpp/BUILD tensorflow/tensorflow/jna/".!
  "cp src/main/cpp/jna.cc tensorflow/tensorflow/jna/".!
  Process("bazel build -c opt //tensorflow/jna:libtensorflow.so", new File("tensorflow")).!
  s"rm -f $lib".!
  s"mv tensorflow/bazel-bin/tensorflow/jna/libtensorflow.so $lib".!
}



{'fraction_non_alphanumeric': 0.18358340688437777, 'fraction_numerical': 0.019417475728155338, 'mean_word_length': 3.854389721627409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1906694', 'n_tokens_mistral': 906, 'n_tokens_neox': 882, 'n_words': 146}