Veterinary pathology is a discipline-oriented specialisation which focuses on the morphological recognition and functional interpretation of pathological conditions in animals, through analysis of the pathomorphological substrate in attempting to define specific pathological processes including aetiology and pathogenesis.
Membership includes veterinary pathologists with a wide variety of career pathways and employments such as in private pathology practice, general and specific diagnostic laboratories, academic and research institutes, and industry. A veterinarian who has satisfied the requirements as to character, training and experience and competence in veterinary pathology, including satisfactory completion of the certifying examination, is eligible for membership. Election of such candidates is accomplished by majority vote of the Council.
Any member who has retired from the practice or teaching of veterinary pathology may be designated an Emeritus Diplomate by the Council, at the member's request. Emeritus members shall be exempt from the payment of dues but shall have all the privileges of members, except the right to hold office.
A person who has contributed in an extraordinary manner to the advancement of veterinary pathology may be elected as an Honorary Member of the College. Election is by a majority vote of the Council, confirmed by a majority vote of the membership of the College. Honorary members shall have all the privileges of membership except the right to vote or hold office and shall not be required to pay dues.
Further details of Membership are included in the Constitution of the European College of Veterinary Pathologists.
Payment of dues is possible by bank transfer, or by credit card.
Please ensure that all bank transfers include the name of the ECVP member.
All bank costs must be prepaid.
3) by paying all outstanding dues.


text:
President Trump is right on NATO, wrong on Putin: Sam Kumar
Russia is a much bigger existential threat to Europe than it is to our country and it is time our allies stepped it up and showed some initiative.
President Trump is right on NATO, wrong on Putin: Sam Kumar Russia is a much bigger existential threat to Europe than it is to our country and it is time our allies stepped it up and showed some initiative. Check out this story on rgj.com: http://www.rgj.com/story/opinion/columnists/2018/07/18/president-trump-right-nato-wrong-putin-sam-kumar/798597002/
Reno Gazette Journal Published 5:15 p.m. PT July 18, 2018
U.S. President Donald Trump speaks during a press conference after a summit of heads of state and government at NATO headquarters in Brussels, Belgium, Thursday, July 12, 2018. NATO leaders gather in Brussels for a two-day summit. (AP Photo/Geert Vanden Wijngaert) ORG XMIT: FOS250(Photo: Geert Vanden Wijngaert, AP)
Last week the president came under harsh criticism from the media for asking our NATO allies to increase their defense spending.
"Trump is gonna fly into NATO like a seagull and defecate all over everything" boomed Fox News' Chris Stirewalt.
"Trump alienates allies at NATO summit," claimed an NBC headline.
ABC's Terry Moran was concerned that the president would "blow (NATO) up."
Let us start with the basics. NATO was signed into effect in 1949 between U.S., Canada and Western European countries with the primary goal to counter any aggression from the then Soviet Union. It allows all military personnel and equipment to be used if an enemy were to attack any one of the now 29 member countries.
More: President Trump and Melania at NATO welcoming ceremony in Belgium
More: Primary election sets up GOP for a good November: Sam Kumar
More: How to submit an opinion column or letter to the editor
In 2006, all members of NATO agreed to spend at least 2 percent of their GDP on military. However, while the United States is currently spending 3.7 percent of the GDP, only four other countries have met the 2 percent target. In dollar terms, for 2016, the U.S. spent $664 billion, and the rest of NATO combined spent $238 billion. Germany, which is so offended by the president's remarks, spent a paltry $45 billion while Canada spent $18 billion.
To be sure, America is the most generous country in the history of this planet. Our generosity extends far beyond military spending. We spend more money in foreign aid than anyone else. We are the country that rebuilt Europe twice in the 20th century. The Office of U.S. Foreign Disaster Assistance responds to an average of 65 disasters in more than 50 countries every year, providing lifesaving assistance to tens of millions of people. Our private charitable contributions far exceed our foreign aid. Bill Gates is singlehandedly trying to abolish malaria in Africa.
Our generosity, government and private, has limits. While we will continue to spend more than any other nation on defense, we cannot do this alone. Russia's proximity makes it a much bigger existential threat to Europe than it is to our country and it is time our allies stepped it up and showed some initiative. Other NATO countries should spend at least 2 percent of their GDP. That is not an unreasonable request.
One final point: While I agree with the president on NATO, I strongly disagree with him on Putin. Putin may be a cheap thug, but he is no dummy. Putin has proven himself adept at leveraging guerilla tactics to sow political discord throughout the western world.
American administrations have been fooled by Putin several times over the past 20 years. President Bush was wrong when he claimed, "I looked the man (Putin) in the eye ... (and) was able to get a sense of his soul." It was not until Putin attempted to invade Georgia that President Bush saw the error in his views.
President Obama was wrong when he told Mitt Romney during the presidential debate that Russia is not a threat and "the 1980s are now calling to ask for their foreign policy back" Secretary Clinton was wrong when she walked around with the reset button.
President Trump needs to be clear-eyed about Putin. Not only should we put in place strong defense mechanisms to ensure that Putin never meddles with our election, we should have electronic countermeasures ready to go at a moment's notice to remind Putin not to mess with us.
Sam Kumar is the former chairman of the Washoe County Republican Party.
Read or Share this story: http://www.rgj.com/story/opinion/columnists/2018/07/18/president-trump-right-nato-wrong-putin-sam-kumar/798597002/

redpajama_set_name: RedPajamaCommonCrawl


text:
package org.locationtech.geowave.analytic.spark.spatial;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.apache.commons.lang.ArrayUtils;
import org.apache.spark.HashPartitioner;
import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaFutureAction;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.function.FlatMapFunction;
import org.apache.spark.api.java.function.Function;
import org.apache.spark.api.java.function.PairFlatMapFunction;
import org.apache.spark.broadcast.Broadcast;
import org.apache.spark.sql.SparkSession;
import org.apache.spark.storage.StorageLevel;
import org.locationtech.geowave.analytic.spark.GeoWaveIndexedRDD;
import org.locationtech.geowave.analytic.spark.GeoWaveRDD;
import org.locationtech.geowave.analytic.spark.RDDUtils;
import org.locationtech.geowave.analytic.spark.sparksql.udf.GeomFunction;
import org.locationtech.geowave.analytic.spark.spatial.JoinOptions.BuildSide;
import org.locationtech.geowave.core.geotime.index.SpatialDimensionalityTypeProvider;
import org.locationtech.geowave.core.geotime.index.SpatialTemporalDimensionalityTypeProvider;
import org.locationtech.geowave.core.geotime.index.SpatialTemporalOptions;
import org.locationtech.geowave.core.geotime.util.GeometryUtils;
import org.locationtech.geowave.core.index.ByteArray;
import org.locationtech.geowave.core.index.HierarchicalNumericIndexStrategy.SubStrategy;
import org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData;
import org.locationtech.geowave.core.index.InsertionIds;
import org.locationtech.geowave.core.index.NumericIndexStrategy;
import org.locationtech.geowave.core.index.sfc.SFCFactory.SFCType;
import org.locationtech.geowave.core.index.sfc.tiered.SingleTierSubStrategy;
import org.locationtech.geowave.core.index.sfc.tiered.TieredSFCIndexFactory;
import org.locationtech.geowave.core.index.sfc.tiered.TieredSFCIndexStrategy;
import org.locationtech.geowave.mapreduce.input.GeoWaveInputKey;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
import org.opengis.feature.simple.SimpleFeature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import jersey.repackaged.com.google.common.collect.Maps;
import scala.Tuple2;

public class TieredSpatialJoin extends JoinStrategy {

  /**
   *
   */
  private static final long serialVersionUID = 1L;

  private static final Logger LOGGER = LoggerFactory.getLogger(TieredSpatialJoin.class);

  // Combined matching pairs
  private JavaPairRDD<GeoWaveInputKey, ByteArray> combinedResults = null;
  private final List<JavaPairRDD<GeoWaveInputKey, ByteArray>> tierMatches = Lists.newArrayList();

  private double bufferDistance = 0.0;

  public TieredSpatialJoin() {}

  @Override
  public void join(
      final SparkSession spark,
      final GeoWaveIndexedRDD leftRDD,
      final GeoWaveIndexedRDD rightRDD,
      final GeomFunction predicate) throws InterruptedException, ExecutionException {
    // Get SparkContext from session
    final SparkContext sc = spark.sparkContext();
    final JavaSparkContext javaSC = JavaSparkContext.fromSparkContext(sc);

    final NumericIndexStrategy leftStrategy = leftRDD.getIndexStrategy().getValue();
    final NumericIndexStrategy rightStrategy = rightRDD.getIndexStrategy().getValue();

    // Check if either dataset supports the join
    TieredSFCIndexStrategy tieredStrategy = null;
    // Determine if either strategy needs to be reindexed to support join algorithm
    boolean reindexLeft = false;
    boolean reindexRight = false;
    final boolean leftSupport = supportsJoin(leftStrategy);
    final boolean rightSupport = supportsJoin(rightStrategy);
    if (leftSupport && rightSupport) {
      if (leftStrategy.equals(rightStrategy)) {
        // Both strategies match we don't have to reindex
        tieredStrategy = (TieredSFCIndexStrategy) leftStrategy;
      } else {
        // Join build side determines what side we will build strategy off of when strategies
        // support but don't match
        if (getJoinOptions().getJoinBuildSide() == JoinOptions.BuildSide.LEFT) {
          reindexRight = true;
          tieredStrategy = (TieredSFCIndexStrategy) leftStrategy;
        } else {
          reindexLeft = true;
          tieredStrategy = (TieredSFCIndexStrategy) rightStrategy;
        }
      }
    } else if (leftSupport) {
      reindexRight = true;
      tieredStrategy = (TieredSFCIndexStrategy) leftStrategy;

    } else if (rightSupport) {
      reindexLeft = true;
      tieredStrategy = (TieredSFCIndexStrategy) rightStrategy;

    } else {
      tieredStrategy = (TieredSFCIndexStrategy) createDefaultStrategy(leftStrategy);
      if (tieredStrategy == null) {
        tieredStrategy = (TieredSFCIndexStrategy) createDefaultStrategy(rightStrategy);
      }
      if (tieredStrategy == null) {
        LOGGER.error(
            "Cannot create default strategy from either provided strategy. Datasets cannot be joined.");
        return;
      }
      reindexLeft = true;
      reindexRight = true;
    }

    // Pull information and broadcast strategy used for join
    final SubStrategy[] tierStrategies = tieredStrategy.getSubStrategies();
    final int tierCount = tierStrategies.length;
    // Create broadcast variable for indexing strategy
    // Cast is safe because we must be instance of TieredSFCIndexStrategy to support join.
    final Broadcast<TieredSFCIndexStrategy> broadcastStrategy =
        (Broadcast<TieredSFCIndexStrategy>) RDDUtils.broadcastIndexStrategy(sc, tieredStrategy);

    final Broadcast<GeomFunction> geomPredicate = javaSC.broadcast(predicate);

    // If needed reindex one of the strategies we will wrap the buffer operation into the reindex
    // operation
    // Otherwise we buffer based off the buildside of the join.
    setBufferAmount(predicate.getBufferAmount());

    // Reindex if necessary and get RDD of indexed Geometry
    JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> leftIndex = null;
    JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> rightIndex = null;
    if (reindexLeft && reindexRight) {
      leftRDD.reindex(broadcastStrategy);
      rightRDD.reindex(broadcastStrategy);
    } else if (reindexLeft) {
      leftRDD.reindex(broadcastStrategy);
    } else if (reindexRight) {
      rightRDD.reindex(broadcastStrategy);
    }

    if (joinOpts.getJoinBuildSide() == BuildSide.LEFT) {
      rightIndex = rightRDD.getIndexedGeometryRDD(bufferDistance, true);
      leftIndex = leftRDD.getIndexedGeometryRDD();
    } else {
      leftIndex = leftRDD.getIndexedGeometryRDD(bufferDistance, true);
      rightIndex = rightRDD.getIndexedGeometryRDD();
    }

    final int leftPartCount = leftIndex.getNumPartitions();
    final int rightPartCount = rightIndex.getNumPartitions();
    final int highestPartCount = (leftPartCount > rightPartCount) ? leftPartCount : rightPartCount;
    final int largePartitionerCount = (int) (1.5 * highestPartCount);
    final HashPartitioner partitioner = new HashPartitioner(largePartitionerCount);

    final JavaFutureAction<List<Byte>> leftFuture =
        leftIndex.setName("LeftIndex").keys().map(t -> t.getBytes()[0]).distinct(4).collectAsync();
    final JavaFutureAction<List<Byte>> rightFuture =
        rightIndex.setName("RightIndex").keys().map(t -> t.getBytes()[0]).distinct(
            4).collectAsync();

    // Get the result of future
    final List<Byte> rightDataTiers = Lists.newArrayList(rightFuture.get());

    // Sort tiers highest to lowest and collect information.
    final Byte[] rightTierArr = rightDataTiers.toArray(new Byte[0]);
    Arrays.sort(rightTierArr);
    final int rightTierCount = rightTierArr.length;

    final List<Byte> leftDataTiers = Lists.newArrayList(leftFuture.get());
    final Byte[] leftTierArr = leftDataTiers.toArray(new Byte[0]);
    Arrays.sort(leftTierArr);
    final int leftTierCount = leftTierArr.length;

    // Determine if there are common higher tiers for whole dataset on either side.
    final byte highestLeftTier = leftTierArr[leftTierArr.length - 1];
    final byte highestRightTier = rightTierArr[rightTierArr.length - 1];
    // Find a common run of higher tiers
    Byte[] commonLeftTiers = ArrayUtils.EMPTY_BYTE_OBJECT_ARRAY;
    Byte[] commonRightTiers = ArrayUtils.EMPTY_BYTE_OBJECT_ARRAY;
    boolean skipMapCreate = false;
    if (leftTierArr[0] > highestRightTier) {
      // Whole left dataset is higher tiers than right
      commonLeftTiers = leftTierArr;
      skipMapCreate = true;
    } else if (rightTierArr[0] > highestLeftTier) {
      // Whole right dataset is higher tiers than left
      commonRightTiers = rightTierArr;
      skipMapCreate = true;
    }

    LOGGER.debug("Tier Count: " + tierCount);
    LOGGER.debug("Left Tier Count: " + leftTierCount + " Right Tier Count: " + rightTierCount);
    LOGGER.debug("Left Tiers: " + leftDataTiers);
    LOGGER.debug("Right Tiers: " + rightDataTiers);

    Map<Byte, HashSet<Byte>> rightReprojectMap = new HashMap<>();
    Map<Byte, HashSet<Byte>> leftReprojectMap = new HashMap<>();
    final HashSet<Byte> sharedTiers = Sets.newHashSetWithExpectedSize(tierCount / 2);
    if (!skipMapCreate) {
      leftReprojectMap = createReprojectMap(leftTierArr, rightTierArr, sharedTiers);
      rightReprojectMap = createReprojectMap(rightTierArr, leftTierArr, sharedTiers);
    }

    JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> commonRightRDD = null;
    final boolean commonRightExist = commonRightTiers != ArrayUtils.EMPTY_BYTE_OBJECT_ARRAY;
    if (commonRightExist) {
      commonRightRDD =
          rightRDD.getGeoWaveRDD().getRawRDD().filter(
              t -> t._2.getDefaultGeometry() != null).mapValues(
                  (Function<SimpleFeature, Geometry>) t -> {
                    return (Geometry) t.getDefaultGeometry();
                  }).distinct(largePartitionerCount).rdd().toJavaRDD();
    }

    JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> commonLeftRDD = null;

    final boolean commonLeftExist = commonLeftTiers != ArrayUtils.EMPTY_BYTE_OBJECT_ARRAY;
    if (commonLeftExist) {
      commonLeftRDD =
          leftRDD.getGeoWaveRDD().getRawRDD().filter(
              t -> t._2.getDefaultGeometry() != null).mapValues(
                  (Function<SimpleFeature, Geometry>) t -> {
                    return (Geometry) t.getDefaultGeometry();
                  }).distinct(largePartitionerCount).rdd().toJavaRDD();
    }

    // Iterate through left tiers. Joining higher right and same level tiers
    for (final Byte leftTierId : leftDataTiers) {
      final HashSet<Byte> higherRightTiers = leftReprojectMap.get(leftTierId);

      JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> leftTier = null;
      final boolean higherTiersExist = ((higherRightTiers != null) && !higherRightTiers.isEmpty());
      final boolean sameTierExist = sharedTiers.contains(leftTierId);

      if (commonRightExist || higherTiersExist || sameTierExist) {
        leftTier = filterTier(leftIndex, leftTierId);

      } else {
        // No tiers to compare against this tier
        continue;
      }

      // Check for same tier existence on both sides and join without reprojection.
      if (sameTierExist) {
        final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> rightTier =
            rightIndex.filter(t -> t._1().getBytes()[0] == leftTierId);

        final JavaPairRDD<GeoWaveInputKey, ByteArray> finalMatches =
            joinAndCompareTiers(leftTier, rightTier, geomPredicate, highestPartCount, partitioner);
        addMatches(finalMatches);
      }

      // Join against higher common tiers for this dataset
      JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> rightTiers = null;
      if (commonRightExist) {
        rightTiers = commonRightRDD;
      } else if (higherTiersExist) {
        final Broadcast<HashSet<Byte>> higherBroadcast = javaSC.broadcast(higherRightTiers);
        rightTiers =
            prepareForReproject(
                rightIndex.filter(t -> higherBroadcast.value().contains(t._1().getBytes()[0])),
                largePartitionerCount);
      }

      if (rightTiers != null) {
        final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> reprojected =
            reprojectToTier(
                rightTiers,
                leftTierId,
                broadcastStrategy,
                getBufferAmount(BuildSide.RIGHT),
                partitioner);

        final JavaPairRDD<GeoWaveInputKey, ByteArray> finalMatches =
            joinAndCompareTiers(
                leftTier,
                reprojected,
                geomPredicate,
                highestPartCount,
                partitioner);

        addMatches(finalMatches);
      }
    }

    for (final Byte rightTierId : rightDataTiers) {

      final HashSet<Byte> higherLeftTiers = rightReprojectMap.get(rightTierId);
      JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> rightTier = null;
      final boolean higherLeftExist = ((higherLeftTiers != null) && !higherLeftTiers.isEmpty());
      if (commonLeftExist || higherLeftExist) {
        rightTier = rightIndex.filter(t -> t._1().getBytes()[0] == rightTierId);
      } else {
        // No tiers to compare against this tier
        continue;
      }

      JavaPairRDD<GeoWaveInputKey, ByteArray> finalMatches = null;
      JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> leftTiers = null;
      if (commonLeftExist) {
        leftTiers = commonLeftRDD;
      } else {
        final Broadcast<HashSet<Byte>> higherBroadcast = javaSC.broadcast(higherLeftTiers);
        leftTiers =
            prepareForReproject(
                leftIndex.filter(t -> higherBroadcast.value().contains(t._1.getBytes()[0])),
                largePartitionerCount);
      }

      final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> reprojected =
          reprojectToTier(
              leftTiers,
              rightTierId,
              broadcastStrategy,
              getBufferAmount(BuildSide.LEFT),
              partitioner);

      finalMatches =
          joinAndCompareTiers(reprojected, rightTier, geomPredicate, highestPartCount, partitioner);

      addMatches(finalMatches);
    }

    // Remove duplicates between tiers
    combinedResults =
        javaSC.union(
            (JavaPairRDD[]) (ArrayUtils.add(
                tierMatches.toArray(new JavaPairRDD[tierMatches.size()]),
                combinedResults)));
    combinedResults = combinedResults.reduceByKey((id1, id2) -> id1);

    combinedResults =
        combinedResults.setName("CombinedJoinResults").persist(StorageLevel.MEMORY_ONLY_SER());
    // Force evaluation of RDD at the join function call.
    // Otherwise it doesn't actually perform work until something is called
    // on left/right joined.
    // Wish there was a better way to force evaluation of rdd safely.
    // isEmpty() triggers take(1) which shouldn't involve a shuffle.
    combinedResults.isEmpty();

    // Join against original dataset to give final joined rdds on each side, and cache results so we
    // don't recalculate
    if (getJoinOptions().isNegativePredicate()) {
      setLeftResults(
          new GeoWaveRDD(
              leftRDD.getGeoWaveRDD().getRawRDD().subtractByKey(combinedResults).cache()));
      setRightResults(
          new GeoWaveRDD(
              rightRDD.getGeoWaveRDD().getRawRDD().subtractByKey(combinedResults).cache()));
    } else {
      setLeftResults(
          new GeoWaveRDD(
              leftRDD.getGeoWaveRDD().getRawRDD().join(combinedResults).mapToPair(
                  t -> new Tuple2<>(t._1(), t._2._1())).cache()));
      setRightResults(
          new GeoWaveRDD(
              rightRDD.getGeoWaveRDD().getRawRDD().join(combinedResults).mapToPair(
                  t -> new Tuple2<>(t._1(), t._2._1())).cache()));
    }

    leftIndex.unpersist();
    rightIndex.unpersist();
  }

  private Map<Byte, HashSet<Byte>> createReprojectMap(
      final Byte[] buildSide,
      final Byte[] testSide,
      final HashSet<Byte> sharedTiers) {
    final Map<Byte, HashSet<Byte>> resultMap = Maps.newHashMap();
    final int testLastIndex = testSide.length;
    for (final Byte tierLeft : buildSide) {
      final int firstGreater = Arrays.binarySearch(testSide, tierLeft);

      if (firstGreater >= 0) {
        // Found in array
        sharedTiers.add(tierLeft);
      }

      final int insertionPoint = Math.abs(firstGreater);
      if (insertionPoint >= testLastIndex) {
        // Not present in array, and none greater than this value
        continue;
      }

      // There is at least one value greater than the current copy it and
      // add to map
      final HashSet<Byte> higherTiers =
          Sets.newHashSet(Arrays.copyOfRange(testSide, insertionPoint, testLastIndex));
      resultMap.put(tierLeft, higherTiers);
    }
    return resultMap;
  }

  private void setBufferAmount(final double bufferAmount) {
    bufferDistance = bufferAmount;
  }

  private double getBufferAmount(final BuildSide testSide) {
    return (joinOpts.getJoinBuildSide() != testSide) ? bufferDistance : 0.0;
  }

  @Override
  public boolean supportsJoin(final NumericIndexStrategy indexStrategy) {
    return (indexStrategy != null)
        && indexStrategy.getClass().isInstance(TieredSFCIndexStrategy.class);
  }

  @Override
  public NumericIndexStrategy createDefaultStrategy(final NumericIndexStrategy indexStrategy) {
    if (SpatialTemporalDimensionalityTypeProvider.isSpatialTemporal(indexStrategy)) {
      final SpatialTemporalOptions options = new SpatialTemporalOptions();
      return TieredSFCIndexFactory.createFullIncrementalTieredStrategy(
          SpatialTemporalDimensionalityTypeProvider.SPATIAL_TEMPORAL_DIMENSIONS,
          new int[] {
              options.getBias().getSpatialPrecision(),
              options.getBias().getSpatialPrecision(),
              options.getBias().getTemporalPrecision()},
          SFCType.HILBERT,
          options.getMaxDuplicates());
    } else if (SpatialDimensionalityTypeProvider.isSpatial(indexStrategy)) {
      return TieredSFCIndexFactory.createFullIncrementalTieredStrategy(
          SpatialDimensionalityTypeProvider.SPATIAL_DIMENSIONS,
          new int[] {
              SpatialDimensionalityTypeProvider.LONGITUDE_BITS,
              SpatialDimensionalityTypeProvider.LATITUDE_BITS},
          SFCType.HILBERT);
    }

    return null;
  }

  private void addMatches(final JavaPairRDD<GeoWaveInputKey, ByteArray> finalMatches) {
    if (combinedResults == null) {
      combinedResults = finalMatches;
    } else {
      tierMatches.add(finalMatches);
    }
  }

  private JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> filterTier(
      final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> indexedRDD,
      final byte tierId) {
    return indexedRDD.filter(v1 -> v1._1().getBytes()[0] == tierId);
  }

  private JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> prepareForReproject(
      final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> indexedRDD,
      final int numPartitions) {
    return indexedRDD.values().distinct(numPartitions);
  }

  private JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> reprojectToTier(
      final JavaRDD<Tuple2<GeoWaveInputKey, Geometry>> higherTiers,
      final byte targetTierId,
      final Broadcast<TieredSFCIndexStrategy> broadcastStrategy,
      final double bufferDistance,
      final HashPartitioner partitioner) {
    return higherTiers.flatMapToPair(
        (PairFlatMapFunction<Tuple2<GeoWaveInputKey, Geometry>, ByteArray, Tuple2<GeoWaveInputKey, Geometry>>) t -> {
          final TieredSFCIndexStrategy index = broadcastStrategy.value();
          final SubStrategy[] strategies = index.getSubStrategies();
          SingleTierSubStrategy useStrat = null;
          for (final SubStrategy strat : strategies) {
            final SingleTierSubStrategy tierStrat =
                (SingleTierSubStrategy) strat.getIndexStrategy();
            if (targetTierId == tierStrat.tier) {
              useStrat = tierStrat;
              break;
            }
          }
          final Geometry geom = t._2;
          final Envelope internalEnvelope = geom.getEnvelopeInternal();
          internalEnvelope.expandBy(bufferDistance);
          final MultiDimensionalNumericData boundsRange =
              GeometryUtils.getBoundsFromEnvelope(internalEnvelope);

          InsertionIds insertIds = useStrat.getInsertionIds(boundsRange, 80);

          if (bufferDistance == 0.0) {
            insertIds = RDDUtils.trimIndexIds(insertIds, geom, index);
          }

          final List<Tuple2<ByteArray, Tuple2<GeoWaveInputKey, Geometry>>> reprojected =
              Lists.newArrayListWithCapacity(insertIds.getSize());
          for (final byte[] id : insertIds.getCompositeInsertionIds()) {
            final Tuple2<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> indexPair =
                new Tuple2<>(new ByteArray(id), t);
            reprojected.add(indexPair);
          }
          return reprojected.iterator();
        }).partitionBy(partitioner).persist(StorageLevel.MEMORY_AND_DISK_SER());
  }

  private JavaPairRDD<GeoWaveInputKey, ByteArray> joinAndCompareTiers(
      final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> leftTier,
      final JavaPairRDD<ByteArray, Tuple2<GeoWaveInputKey, Geometry>> rightTier,
      final Broadcast<GeomFunction> geomPredicate,
      final int highestPartitionCount,
      final HashPartitioner partitioner) {
    // Cogroup groups on same tier ByteArrayId and pairs them into Iterable
    // sets.
    JavaPairRDD<ByteArray, Tuple2<Iterable<Tuple2<GeoWaveInputKey, Geometry>>, Iterable<Tuple2<GeoWaveInputKey, Geometry>>>> joinedTiers =
        leftTier.cogroup(rightTier, partitioner);

    // Filter only the pairs that have data on both sides, bucket strategy
    // should have been accounted for by this point.
    // We need to go through the pairs and test each feature against each
    // other
    // End with a combined RDD for that tier.
    joinedTiers =
        joinedTiers.filter(t -> t._2._1.iterator().hasNext() && t._2._2.iterator().hasNext());

    final JavaPairRDD<GeoWaveInputKey, ByteArray> finalMatches =
        joinedTiers.flatMapValues(
            (FlatMapFunction<Tuple2<Iterable<Tuple2<GeoWaveInputKey, Geometry>>, Iterable<Tuple2<GeoWaveInputKey, Geometry>>>, GeoWaveInputKey>) t -> {
              final GeomFunction predicate = geomPredicate.value();

              final HashSet<GeoWaveInputKey> results = Sets.newHashSet();
              for (final Tuple2<GeoWaveInputKey, Geometry> leftTuple : t._1) {
                for (final Tuple2<GeoWaveInputKey, Geometry> rightTuple : t._2) {
                  if (predicate.call(leftTuple._2, rightTuple._2)) {
                    results.add(leftTuple._1);
                    results.add(rightTuple._1);
                  }
                }
              }
              return results.iterator();
            }).mapToPair(Tuple2::swap).reduceByKey(partitioner, (id1, id2) -> id1).persist(
                StorageLevel.MEMORY_ONLY_SER());

    return finalMatches;
  }
}

redpajama_set_name: RedPajamaGithub


The Food Law and Policy Association (FLAP) is dedicated to providing students with an opportunity to learn about and actively participate in food law and policy issues, such as poverty and food access, food waste, sustainable and ethical farming initiatives, urban agriculture, obesity and diabetes, FDA/USDA regulation, and food-related legislation.
FLAP organizes a number of educational, professional, and social events throughout the year. FLAP also sponsors many community service events so students can get involved with the local food community, including trips to the farmers market, farm work with We The People Growers Association, and volunteering at Food Gatherers.
Members of FLAP have had the opportunity to work on substantive legal food issues. For example, students conduct legal research for the Socially Responsible Agriculture Project and work on 501(c)(3) applications for food-related nonprofit organizations. For more information, contact flapboard@umich.edu.


Meyer Optica Balmain Optometrist has been looking after our patients and their eyes for more than 30 years. We are a well-established optometry practice in Balmain. We pride ourselves on providing the best eye care, professional patient service and quality optical products.
We have a wide selection of optical and sunglass frames ranging from the latest styles in our no gap budget category to our high-end designer fashion frames. All backed with our exceptional and professional customer service and quality.
We use the latest technology both in our equipment and in the products we prescribe.
We take great care in prescribing the best lens design for your individual visual needs. For example you may benefit from a pair of spectacles specifically for computer screen use, or a pair of multifocal lenses if you have more dynamic visual demands, allowing for distance, mid-range and reading all in one lens.
Call 02 9810 4605 for an appointment or come in to speak to our professional staff about the best lens for your individual requirements.


text:
Celebratory car parade for breast cancer survivors held at Hagerstown Community College
#somethinggood
by: Katie Rhee
HAGERSTOWN, Md. (WDVM) — With the COVID-19 pandemic canceling in-person events and celebrations, Breast Cancer Awareness of Cumberland Valley still wanted to honor breast cancer survivors while keeping everyone safe.
BCACV hosted a car parade at Hagerstown Community College to honor breast cancer survivors on the day that would have been their annual Step N' Stride walk.
Vickie Horst is a seven-year breast cancer survivor. Her daughter, Stacy Horst, is the Executive Director of Breast Cancer Awareness of Cumberland Valley.
"I think it's wonderful because even though we are going through this time, this pandemic and we are separated, it's nice to know that you have the support that's vital to, to people that are going through this and that have been through it, to show unity amongst us, and to bring comfort and support."
Sally C. is a four-year breast cancer survivor who was joined by her family at the car parade.
"Cancer is life-changing… Doesn't matter what form of cancer you have, it's life-changing. Having the support of my family, my loved ones, having the support of this organization has been just absolutely amazing. My pink sisters, the bond that I have with the pink sisters is just none like you'll ever… You'll ever experience."
The car parade was an emotional but exciting experience for survivors and supporters alike. Kristen Pickelsimer drove nearly two hours to celebrate with other survivors after being diagnosed in March. She was deemed cancer-free in August and was unsure if she would be able to celebrate the milestone due to the coronavirus pandemic.
"I wasn't sure if I was going to get to celebrate this year and I'm just really, really, really, really excited that they put this together. I'm from glen burnie, so I made the drive here just to be here for this. It's happy tears. It's really emotional to me. This is like, this just makes, makes us feel so much better, like we have that support."
The parade was a bittersweet experience for Vaun Miles-Swain who will be celebrating two years of being cancer-free in November.
"It's sad to ride down here and see all of the 'in memory's' and 'in memory of.' you know, I have two aunts who have passed away from cancer and it's just, it's very sad to know that right now everything that we have that they didn't have back then, that they could have had a chance to be able to be like all the other survivors."
Organizers stated that they still wanted to be able to provide an event where survivors could connect with each other because that support is so important when they're battling breast cancer.
For more information on Breast Cancer Awareness of Cumberland Valley, head to their website.
Pedestrian killed in Montgomery County hit-and-run crash
Maryland / 5 hours ago
Rockville Art Gallery exhibits Wheaton "Path of Pyramids" sculptures
Montgomery County to introduce bill restricting untraceable "ghost guns"
Maryland / 13 hours ago
Gov. Hogan announces $30 million in economic relief for arts-related businesses
Almost 300 open cases related to Capitol riot, the investigation has just begun
Longtime business owner finds alternative to boarding up windows
Metro rail closures effective through Jan. 21
Arlington parent files lawsuit against school board and superintendent
Virginia / 13 hours ago
Ashburn man charged for money laundering over dating site
Winchester Area Temporary Thermal Shelter starts daytime warming center
Study: Northern Va. families face most severe housing burden in the nation
House Speaker Nancy Pelosi endorses Terry McAuliffe for Virginia governor
Virginia / 1 day ago
Upcoming financial assistance for West Virginia renters and landlords
West Virginia / 13 hours ago
Funeral held for West Virginia hero, Chuck Yeager
WV honors Brig. Gen. Chuck Yeager with memorial service
WV State Fire Marshal's Office seeking two potential witnesses in the death of Logan Young
More #somethinggood Stories
by Lex Juarez / Jan 15, 2021
WASHINGTON (WDVM) -- As the District of Columbia continues to prepare for Inauguration Day, local businesses are doing their part in getting ready for any potential dangers, by boarding up windows with plywood.
The boarding up has become a common sight in the past few months in the District, with demonstrations over the summer and protests over the election. As many downtown businesses have been closed due to the pandemic, one longtime business owner took a different approach.
WDVM on Facebook
WDVM on Twitter
LocalDVM iPhone App
LocalDVM Android App
Alderman Roger Wilson announces candidacy for Frederick Mayor
FCPS hosts virtual celebration honoring Dr. Martin Luther King Jr.
Three demonstrations permitted by National Park Service for week of January 4