text:
Q: How does using conda to install a package change my python version and remove conda? I had been using Anaconda with python 2.7
$ python
Python 2.7.14 |Anaconda custom (64-bit)| (default, Dec  7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

When I decided to install tensorflow (since for some reason I had the non-gpu version)
The command I used was:
$ conda install -c anaconda tensorflow-gpu

However, after it was done (detail on output of this cmd to follow), I no longer had conda:
$ conda install -c conda-forge keras
Traceback (most recent call last):
  File "/home/me/anaconda2/bin/conda", line 12, in <module>
    from conda.cli import main
ModuleNotFoundError: No module named 'conda'

(Note: I also no longer had Keras) and was now running Python 3.7(!?):
$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

What happened? How do I stop it from happening again? This happened once before and I ended up deleting all my anaconda files, then reinstalling. I don't want to make that a habit.
The output of my conda install was:
$ conda install -c anaconda tensorflow-gpu
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /home/me/anaconda2

  added / updated specs:
    - tensorflow-gpu

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _tflow_190_select-0.0.1    |              gpu           2 KB  anaconda
    absl-py-0.7.0              |           py36_0         156 KB  anaconda
    astor-0.7.1                |           py36_0          43 KB  anaconda
    c-ares-1.15.0              |       h7b6447c_1          98 KB  anaconda
    ca-certificates-2018.12.5  |                0         123 KB  anaconda
    certifi-2018.11.29         |           py36_0         146 KB  anaconda
    cudatoolkit-9.0            |       h13b8566_0       340.4 MB  anaconda
    cudnn-7.1.2                |        cuda9.0_0       367.8 MB  anaconda
    cupti-9.0.176              |                0         1.6 MB  anaconda
    curl-7.63.0                |    hbc83047_1000         145 KB  anaconda
    gast-0.2.2                 |           py36_0         138 KB  anaconda
    git-2.11.1                 |                0         9.5 MB  anaconda
    grpcio-1.16.1              |   py36hf8bcb03_1         1.1 MB  anaconda
    krb5-1.16.1                |       h173b8e3_7         1.4 MB  anaconda
    libcurl-7.63.0             |    h20c2e04_1000         550 KB  anaconda
    libedit-3.1.20181209       |       hc058e9b_0         188 KB  anaconda
    libssh2-1.8.0              |       h1ba5d50_4         233 KB  anaconda
    markdown-3.0.1             |           py36_0         107 KB  anaconda
    mkl_fft-1.0.10             |   py36ha843d7b_0         170 KB  anaconda
    mkl_random-1.0.2           |   py36hd81dba3_0         407 KB  anaconda
    ncurses-6.1                |       he6710b0_1         958 KB  anaconda
    numpy-1.15.4               |   py36h7e9f1db_0          47 KB  anaconda
    numpy-base-1.15.4          |   py36hde5b4d6_0         4.3 MB  anaconda
    openssl-1.1.1              |       h7b6447c_0         5.0 MB  anaconda
    pip-18.1                   |           py36_0         1.8 MB  anaconda
    protobuf-3.5.2             |   py36hf484d3e_1         610 KB  anaconda
    python-3.6.8               |       h0371630_0        34.4 MB  anaconda
    qt-4.8.7                   |                2        34.1 MB  anaconda
    setuptools-40.6.3          |           py36_0         625 KB  anaconda
    six-1.12.0                 |           py36_0          22 KB  anaconda
    sqlite-3.26.0              |       h7b6447c_0         1.9 MB  anaconda
    tensorboard-1.9.0          |   py36hf484d3e_0         3.3 MB  anaconda
    tensorflow-1.9.0           |gpu_py36h02c5d5e_1           3 KB  anaconda
    tensorflow-base-1.9.0      |gpu_py36h6ecc378_0       170.8 MB  anaconda
    tensorflow-gpu-1.9.0       |       hf154084_0           2 KB  anaconda
    termcolor-1.1.0            |           py36_1           7 KB  anaconda
    tk-8.6.8                   |       hbc83047_0         3.1 MB  anaconda
    werkzeug-0.14.1            |           py36_0         423 KB  anaconda
    wheel-0.32.3               |           py36_0          35 KB  anaconda
    ------------------------------------------------------------
                                           Total:       985.7 MB

The following NEW packages will be INSTALLED:

  _tflow_190_select  anaconda/linux-64::_tflow_190_select-0.0.1-gpu
  c-ares             anaconda/linux-64::c-ares-1.15.0-h7b6447c_1
  cudatoolkit        anaconda/linux-64::cudatoolkit-9.0-h13b8566_0
  cudnn              anaconda/linux-64::cudnn-7.1.2-cuda9.0_0
  cupti              anaconda/linux-64::cupti-9.0.176-0
  krb5               anaconda/linux-64::krb5-1.16.1-h173b8e3_7
  pip                anaconda/linux-64::pip-18.1-py36_0
  tensorflow-gpu     anaconda/linux-64::tensorflow-gpu-1.9.0-hf154084_0

The following packages will be UPDATED:

  absl-py            conda-forge/noarch::absl-py-0.1.10-py~ --> anaconda/linux-64::absl-py-0.7.0-py36_0
  ca-certificates    conda-forge::ca-certificates-2018.11.~ --> anaconda::ca-certificates-2018.12.5-0
  curl                    pkgs/main::curl-7.60.0-h84994c4_0 --> anaconda::curl-7.63.0-hbc83047_1000
  gast                                         0.2.0-py27_0 --> 0.2.2-py36_0
  grpcio             pkgs/main::grpcio-1.12.1-py27hdbcaa40~ --> anaconda::grpcio-1.16.1-py36hf8bcb03_1
  libcurl              pkgs/main::libcurl-7.60.0-h1ad7b7a_0 --> anaconda::libcurl-7.63.0-h20c2e04_1000
  libedit                 pkgs/main::libedit-3.1-heed3624_0 --> anaconda::libedit-3.1.20181209-hc058e9b_0
  markdown           conda-forge/noarch::markdown-2.6.11-p~ --> anaconda/linux-64::markdown-3.0.1-py36_0
  mkl_fft            pkgs/main::mkl_fft-1.0.6-py27hd81dba3~ --> anaconda::mkl_fft-1.0.10-py36ha843d7b_0
  ncurses                 pkgs/main::ncurses-6.0-h9df7e31_2 --> anaconda::ncurses-6.1-he6710b0_1
  openssl            conda-forge::openssl-1.0.2p-h14c3975_~ --> anaconda::openssl-1.1.1-h7b6447c_0
  protobuf           conda-forge::protobuf-3.5.2-py27hd28b~ --> anaconda::protobuf-3.5.2-py36hf484d3e_1
  python               pkgs/main::python-2.7.14-h1571d57_29 --> anaconda::python-3.6.8-h0371630_0
  setuptools            pkgs/main::setuptools-38.4.0-py27_0 --> anaconda::setuptools-40.6.3-py36_0
  six                  pkgs/main::six-1.11.0-py27h5f960f1_1 --> anaconda::six-1.12.0-py36_0
  sqlite                pkgs/main::sqlite-3.23.1-he433501_0 --> anaconda::sqlite-3.26.0-h7b6447c_0
  tensorflow           conda-forge::tensorflow-1.3.0-py27_0 --> anaconda::tensorflow-1.9.0-gpu_py36h02c5d5e_1
  tk                         pkgs/main::tk-8.6.7-hc745277_3 --> anaconda::tk-8.6.8-hbc83047_0
  wheel              pkgs/main::wheel-0.30.0-py27h2bc6bb2_1 --> anaconda::wheel-0.32.3-py36_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            conda-forge::certifi-2018.11.29-py27_~ --> anaconda::certifi-2018.11.29-py36_0
  git                 pkgs/main::git-2.17.0-pl526hb75a9fb_0 --> anaconda::git-2.11.1-0
  libssh2               pkgs/main::libssh2-1.8.0-h9cfc8f7_4 --> anaconda::libssh2-1.8.0-h1ba5d50_4
  mkl_random         pkgs/main::mkl_random-1.0.2-py27hd81d~ --> anaconda::mkl_random-1.0.2-py36hd81dba3_0
  numpy              pkgs/main::numpy-1.15.4-py27h7e9f1db_0 --> anaconda::numpy-1.15.4-py36h7e9f1db_0
  numpy-base         pkgs/main::numpy-base-1.15.4-py27hde5~ --> anaconda::numpy-base-1.15.4-py36hde5b4d6_0
  qt                         pkgs/main::qt-5.9.4-h4e5bff0_0 --> anaconda::qt-4.8.7-2
  tensorflow-base    pkgs/main::tensorflow-base-1.9.0-eige~ --> anaconda::tensorflow-base-1.9.0-gpu_py36h6ecc378_0
  werkzeug                pkgs/main::werkzeug-0.14.1-py27_0 --> anaconda::werkzeug-0.14.1-py36_0

The following packages will be DOWNGRADED:

  astor                                        0.7.1-py27_0 --> 0.7.1-py36_0
  tensorboard                         1.10.0-py27hf484d3e_0 --> 1.9.0-py36hf484d3e_0
  termcolor                                    1.1.0-py27_1 --> 1.1.0-py36_1

Proceed ([y]/n)? y

Downloading and Extracting Packages
tensorflow-gpu-1.9.0 | 2 KB      | ########################################################################################################################################## | 100%
absl-py-0.7.0        | 156 KB    | ########################################################################################################################################## | 100%
six-1.12.0           | 22 KB     | ########################################################################################################################################## | 100%
git-2.11.1           | 9.5 MB    | ########################################################################################################################################## | 100%
_tflow_190_select-0. | 2 KB      | ########################################################################################################################################## | 100%
setuptools-40.6.3    | 625 KB    | ########################################################################################################################################## | 100%
c-ares-1.15.0        | 98 KB     | ########################################################################################################################################## | 100%
cupti-9.0.176        | 1.6 MB    | ########################################################################################################################################## | 100%
libssh2-1.8.0        | 233 KB    | ########################################################################################################################################## | 100%
gast-0.2.2           | 138 KB    | ########################################################################################################################################## | 100%
ncurses-6.1          | 958 KB    | ########################################################################################################################################## | 100%
protobuf-3.5.2       | 610 KB    | ########################################################################################################################################## | 100%
tensorflow-base-1.9. | 170.8 MB  | ########################################################################################################################################## | 100%
ca-certificates-2018 | 123 KB    | ########################################################################################################################################## | 100%
python-3.6.8         | 34.4 MB   | ########################################################################################################################################## | 100%
cudatoolkit-9.0      | 340.4 MB  | ########################################################################################################################################## | 100%
qt-4.8.7             | 34.1 MB   | ########################################################################################################################################## | 100%
sqlite-3.26.0        | 1.9 MB    | ########################################################################################################################################## | 100%
astor-0.7.1          | 43 KB     | ########################################################################################################################################## | 100%
tensorboard-1.9.0    | 3.3 MB    | ########################################################################################################################################## | 100%
mkl_fft-1.0.10       | 170 KB    | ########################################################################################################################################## | 100%
mkl_random-1.0.2     | 407 KB    | ########################################################################################################################################## | 100%
certifi-2018.11.29   | 146 KB    | ########################################################################################################################################## | 100%
wheel-0.32.3         | 35 KB     | ########################################################################################################################################## | 100%
numpy-base-1.15.4    | 4.3 MB    | ########################################################################################################################################## | 100%
numpy-1.15.4         | 47 KB     | ########################################################################################################################################## | 100%
curl-7.63.0          | 145 KB    | ########################################################################################################################################## | 100%
openssl-1.1.1        | 5.0 MB    | ########################################################################################################################################## | 100%
tk-8.6.8             | 3.1 MB    | ########################################################################################################################################## | 100%
libedit-3.1.20181209 | 188 KB    | ########################################################################################################################################## | 100%
markdown-3.0.1       | 107 KB    | ########################################################################################################################################## | 100%
werkzeug-0.14.1      | 423 KB    | ########################################################################################################################################## | 100%
krb5-1.16.1          | 1.4 MB    | ########################################################################################################################################## | 100%
termcolor-1.1.0      | 7 KB      | ########################################################################################################################################## | 100%
pip-18.1             | 1.8 MB    | ########################################################################################################################################## | 100%
libcurl-7.63.0       | 550 KB    | ########################################################################################################################################## | 100%
tensorflow-1.9.0     | 3 KB      | ########################################################################################################################################## | 100%
grpcio-1.16.1        | 1.1 MB    | ########################################################################################################################################## | 100%
cudnn-7.1.2          | 367.8 MB  | ########################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(OK - I see the change to Python 3.7 now, but that's still a nasty thing to have to be careful about. Is there some way to force it to leave my Python version alone?)

A: Cause
Changing Python versions without updating the conda package breaks Conda. . The Python version change (2.7.14 -> 3.6.8) created a situation where the new python has a new site-packages which no longer contains a conda package, whereas if you only update within 2.7.x, this wouldn't be an issue.
Conda includes both a set of binaries (e.g., what you're invoking when you type conda in a shell) and a Python package by the same name. The Python package is necessary for Conda as a whole to function and it get's loaded whenever you try to use conda.
It is problematic that many packages on Anaconda seem to be triggering Python version changes, but not subsequently triggering a conda package update.  This sounds like something the dependency resolver is overlooking - i.e., default behavior should be to protect integrity of base environment where conda lives.
Trying to Recover
One possible route to recovery is to temporarily use micromamba (a standalone build of mamba) to repair the base environment. You can do all the following from any directory, so maybe use a temporary one or wherever you put downloads. Please report in the comments if this works or needs adjusting!
Installing Micromamba

*

*Download the appropriate micromamba for your platform (here we'll use the latest linux-64 build). The actual binary will be at bin/micromamba:
# download and unpack
wget -qO- https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba

*Temporarily set MAMBA_ROOT_PREFIX to the base of your install. Typically this is the anaconda3 or miniconda3 folder; in this case, we'll use the path given by OP:
export MAMBA_ROOT_PREFIX=/home/me/anaconda2

*Temporarily configured the shell to add the micromamba command:
eval "$(./bin/micromamba shell hook -s posix)"

*Test that is works by checking the configuration information:
micromamba info

The key thing to check for is that base environment:  correctly identifies to where your base env is and shows it as (writable). You should also see the pkgs folder in your base env in the package cache: .
Reinstall conda for the Current Python

*(Re-)Install the conda package in the base env:
micromamba install -n base conda

Make sure that the build of Conda that is suggested corresponds to the version of Python currently installed. The --force-reinstall flag might be useful if it claims the requirement is already satisfied. Alternatively, try
micromamba upgrade -n base conda

Try a new shell and see if conda is working. You don't need to keep the micromamba around. However, I do enthusiastically encourage users to permanently install mamba (see next step).
(Optional) Install Mamba in base

*Consider also installing Mamba directly in the base environment. It is a compiled (fast!) alternative frontend to Conda environment management.
micromamba install -n base mamba

One can then use mamba in most places where conda would be used.
Last Recourse
If all else fails you may just have to reinstall. Others have reported installing in other directories and being able to still use and access their environmentss.
Preventions
Avoiding Breakage through Better Practice
First, just a general (opinionated) recommendation: leverage virtual environments more. This isn't directly solving the problem, but it will help you have a workflow that is significantly less prone to encountering such pitfalls. You shouldn't have accepted such a huge change in the first place, not to base. Personally, I rarely install things in base outside of infrastructure (emacs, jupyter-related things, conda, etc.).1  Software packages go into project-specific or at least development-type environments.
For example, were I doing the install shown, I would have made a new environment for it
mamba create -n tf36 anaconda::tensorflow-gpu python=3.6

or whatever Python version you actually wish to work in.
Direct Solution: Pinning
Conda does support package pinning, and this is the more direct way to ensure you never ruin your base install again by transitioning Python 2 to 3.  Namely, in the environment's conda-meta folder create a file, pinned and add the line
python 2.7.*

Note that some users have reported similar issues for 3.6 -> 3.7 transitions, so I believe including the minor version here is necessary.  See the documentation on pinning.

[1] Note that I use a Miniforge variant (Mambaforge), not the Anaconda installer, so I have more control over base from the start.

A: I have solved this issue by removing any PYTHONHOME sys PATH(s).

redpajama_set_name: RedPajamaStackExchange


text:
Phil Lynott Lyrics Follow
Philip Parris Lynott (; 20 August 1949 – 4 January 1986) was an Irish musician and songwriter. His most commercially successful group was Thin Lizzy, of which he was a founding member, the principal songwriter, lead vocalist and bassist. He was known for his distinctive plectrum-based style on the bass, and for his imaginative lyrical contributions including working class tales and numerous characters drawn from personal influences and Celtic culture.
Lynott was born in the West Midlands but grew up in Dublin with his grandparents. He remained close to his mother, Philomena throughout his life. He fronted several bands as a lead vocalist, including Skid Row alongside Gary Moore, before learning the bass guitar and forming Thin Lizzy in 1969. After initial success with "Whiskey in the Jar", the band had several hits in the mid-1970s with hits such as "The Boys Are Back in Town", "Jailbreak" and "Waiting for an Alibi", and became a popular live attraction combining Lynott's vocal and songwriting skills with dual lead guitars. Towards the end of the 1970s, Lynott also embarked upon a solo career, published two books of poetry, and after Thin Lizzy disbanded, he assembled and fronted the band Grand Slam, of which he was the leader until it folded in 1985.
Following Thin Lizzy, Lynott increasingly suffered drug-related problems, particularly an addiction to heroin. He had a final hit with Moore, "Out in the Fields", followed by the minor hit "Nineteen", before his death on 4 January 1986 from sepsis secondary to pneumonia. He remains a popular figure in the rock world, and in 2005, a statue in his memory was erected in Dublin.
Grand Slam Collection
Live in Sweden 1983
The Philip Lynott Album
Solo In Soho
The Man And His Music Update
Catholic Charm
Fatalistic Attitide
Ode to Liberty
Don't Talk About Me Baby
Little Bit of Water
The Man's a Fool
Fatalistic Attitude
Talk in '79
A Child's Lullaby
Ode to a Black Man
What's The Matter Baby
She cries
Look in these eyes
I don't need this
A night in the life of a blues singer
Military man
The boys are back in town

redpajama_set_name: RedPajamaCommonCrawl


text:
package org.apache.geode.internal.cache;

import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.cache.AttributesFactory;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.PartitionAttributes;
import org.apache.geode.cache.PartitionAttributesFactory;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.control.RebalanceOperation;
import org.apache.geode.cache.partition.PartitionListenerAdapter;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.test.dunit.Host;
import org.apache.geode.test.dunit.SerializableCallable;
import org.apache.geode.test.dunit.SerializableRunnable;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;

@SuppressWarnings({"serial", "rawtypes", "deprecation", "unchecked"})
@Category(DistributedTest.class)
public class PartitionListenerDUnitTest extends JUnit4CacheTestCase {

  public PartitionListenerDUnitTest() {
    super();
  }

  @Test
  public void testAfterBucketRemovedCreated() throws Throwable {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);
    VM vm3 = host.getVM(3);

    // Create the PR in 2 JVMs
    String regionName = getName() + "_region";
    createPR(vm1, regionName, false);
    createPR(vm2, regionName, false);

    // Create the data using an accessor
    createPR(vm0, regionName, true);
    createData(vm0, 0, 1000, "A", regionName);

    // Assert that afterPrimary is invoked for every primary created on the vm
    List<Integer> vm1PrimariesCreated = getPrimariesCreated(vm1, regionName);
    List<Integer> vm2PrimariesCreated = getPrimariesCreated(vm2, regionName);
    List<Integer> vm1ActualPrimaries = getPrimariesOn(vm1, regionName);
    List<Integer> vm2ActualPrimaries = getPrimariesOn(vm2, regionName);

    vm1PrimariesCreated.removeAll(vm1ActualPrimaries);
    vm2PrimariesCreated.removeAll(vm2ActualPrimaries);

    assertThat(vm1PrimariesCreated).isEmpty();
    assertThat(vm2PrimariesCreated).isEmpty();

    // Create the PR in a third JVM and rebalance
    createPR(vm3, regionName, false);
    rebalance(vm3);

    // Verify listener invocations
    // Assert afterRegionCreate is invoked on every VM.
    assertEquals(regionName, getRegionNameFromListener(vm0, regionName));
    assertEquals(regionName, getRegionNameFromListener(vm1, regionName));
    assertEquals(regionName, getRegionNameFromListener(vm2, regionName));
    assertEquals(regionName, getRegionNameFromListener(vm3, regionName));

    // Get all buckets and keys removed from VM1 and VM2
    Map<Integer, List<Integer>> allBucketsAndKeysRemoved = new HashMap<Integer, List<Integer>>();
    allBucketsAndKeysRemoved.putAll(getBucketsAndKeysRemoved(vm1, regionName));
    allBucketsAndKeysRemoved.putAll(getBucketsAndKeysRemoved(vm2, regionName));

    // Get all buckets and keys added to VM3
    Map<Integer, List<Integer>> vm3BucketsAndKeysAdded = getBucketsAndKeysAdded(vm3, regionName);

    // Verify that they are equal
    assertEquals(allBucketsAndKeysRemoved, vm3BucketsAndKeysAdded);

    // Verify afterPrimary is invoked after rebalance.
    List<Integer> vm3PrimariesCreated = getPrimariesCreated(vm3, regionName);
    List<Integer> vm3ActualPrimaries = getPrimariesOn(vm3, regionName);

    vm3ActualPrimaries.removeAll(vm3PrimariesCreated);
    assertThat(vm3ActualPrimaries).isEmpty();
  }

  @Test
  public void testAfterSecondaryIsCalledAfterLosingPrimary() throws Throwable {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);
    VM vm3 = host.getVM(3);

    // Create the PR in 2 JVMs
    String regionName = getName() + "_region";
    createPR(vm1, regionName, false);
    createPR(vm2, regionName, false);

    // Create the data using an accessor
    createPR(vm0, regionName, true);
    createData(vm0, 0, 1000, "A", regionName);

    // record the bucket ids for each vm
    List<Integer> vm1ActualPrimaries = getPrimariesOn(vm1, regionName);
    List<Integer> vm2ActualPrimaries = getPrimariesOn(vm2, regionName);

    // Create the PR in a third JVM and rebalance
    createPR(vm3, regionName, false);
    rebalance(vm3);

    // Verify listener invocations
    List<Integer> afterSecondaryCalledForVM1 = getAfterSecondaryCallbackBucketIds(vm1, regionName);
    List<Integer> afterSecondaryCalledForVM2 = getAfterSecondaryCallbackBucketIds(vm2, regionName);

    // Eliminate the duplicate, prevent afterSecondary being called multiple times on the same
    // bucket
    Set<Integer> afterSecondaryCalledForVM1Set = new HashSet<Integer>(afterSecondaryCalledForVM1);
    afterSecondaryCalledForVM1.removeAll(afterSecondaryCalledForVM1Set);
    assertTrue(
        "afterSecondary invoked more than once for bucket "
            + (afterSecondaryCalledForVM1.isEmpty() ? " " : afterSecondaryCalledForVM1.get(0)),
        afterSecondaryCalledForVM1.isEmpty());

    Set<Integer> afterSecondaryCalledForVM2Set = new HashSet<Integer>(afterSecondaryCalledForVM2);
    afterSecondaryCalledForVM2.removeAll(afterSecondaryCalledForVM2Set);
    assertTrue(
        "afterSecondary invoked more than once for bucket "
            + (afterSecondaryCalledForVM2.isEmpty() ? " " : afterSecondaryCalledForVM2.get(0)),
        afterSecondaryCalledForVM2.isEmpty());

    List<Integer> newVm1ActualPrimaries = getPrimariesOn(vm1, regionName);
    List<Integer> newVM2ActualPrimaries = getPrimariesOn(vm2, regionName);

    // calculate and verify expected afterSecondary calls
    List<Integer> bucketsNoLongerPrimaryInVM1 = new ArrayList(vm1ActualPrimaries);
    bucketsNoLongerPrimaryInVM1.removeAll(newVm1ActualPrimaries);
    // GEODE-2785: it is possible a secondary bucket becomes primary during moving bucket stage,
    // and it then become secondary during primary selection stage. This may cause additional
    // afterSecondary callback being invoked.
    assertTrue(afterSecondaryCalledForVM1Set.containsAll(bucketsNoLongerPrimaryInVM1));

    List<Integer> bucketsNoLongerPrimaryInVM2 = new ArrayList(vm2ActualPrimaries);
    bucketsNoLongerPrimaryInVM2.removeAll(newVM2ActualPrimaries);
    assertTrue(afterSecondaryCalledForVM2Set.containsAll(bucketsNoLongerPrimaryInVM2));
  }

  protected DistributedMember createPR(VM vm, final String regionName, final boolean isAccessor)
      throws Throwable {
    SerializableCallable createPrRegion = new SerializableCallable("createRegion") {

      public Object call() {
        Cache cache = getCache();
        AttributesFactory attr = new AttributesFactory();
        PartitionAttributesFactory paf = new PartitionAttributesFactory();
        paf.setRedundantCopies(1);
        if (isAccessor) {
          paf.setLocalMaxMemory(0);
        }
        paf.addPartitionListener(new TestPartitionListener());
        PartitionAttributes prAttr = paf.create();
        attr.setPartitionAttributes(prAttr);
        cache.createRegion(regionName, attr.create());
        return cache.getDistributedSystem().getDistributedMember();
      }
    };
    return (DistributedMember) vm.invoke(createPrRegion);
  }

  protected void createData(VM vm, final int startKey, final int endKey, final String value,
      final String regionName) {
    SerializableRunnable createData = new SerializableRunnable("createData") {

      public void run() {
        Cache cache = getCache();
        Region region = cache.getRegion(regionName);

        for (int i = startKey; i < endKey; i++) {
          region.put(i, value);
        }
      }
    };
    vm.invoke(createData);
  }

  protected List<Integer> getPrimariesOn(VM vm, final String regionName) {
    SerializableCallable getPrimariesOn = new SerializableCallable("getPrimariesOn") {

      public Object call() {
        Cache cache = getCache();
        Region region = cache.getRegion(regionName);
        return new ArrayList<>(
            ((PartitionedRegion) region).getDataStore().getAllLocalPrimaryBucketIds());
      }
    };
    return (List<Integer>) vm.invoke(getPrimariesOn);
  }

  protected List<Integer> getPrimariesCreated(VM vm, final String regionName) {
    SerializableCallable getPrimariesCreated = new SerializableCallable("getPrimariesCreated") {

      public Object call() {
        Cache cache = getCache();
        Region region = cache.getRegion(regionName);
        TestPartitionListener listener = (TestPartitionListener) region.getAttributes()
            .getPartitionAttributes().getPartitionListeners()[0];
        return listener.getPrimariesCreated();
      }
    };
    return (List<Integer>) vm.invoke(getPrimariesCreated);
  }

  protected String getRegionNameFromListener(VM vm, final String regionName) {
    SerializableCallable getRegionName = new SerializableCallable("getRegionName") {

      public Object call() {
        Cache cache = getCache();
        Region region = cache.getRegion(regionName);
        TestPartitionListener listener = (TestPartitionListener) region.getAttributes()
            .getPartitionAttributes().getPartitionListeners()[0];
        return listener.getRegionName();
      }
    };
    return (String) vm.invoke(getRegionName);
  }

  protected Map<Integer, List<Integer>> getBucketsAndKeysRemoved(VM vm, final String regionName) {
    SerializableCallable getBucketsAndKeysRemoved =
        new SerializableCallable("getBucketsAndKeysRemoved") {

          public Object call() {
            Cache cache = getCache();
            Region region = cache.getRegion(regionName);
            TestPartitionListener listener = (TestPartitionListener) region.getAttributes()
                .getPartitionAttributes().getPartitionListeners()[0];
            return listener.getBucketsAndKeysRemoved();
          }
        };
    return (Map<Integer, List<Integer>>) vm.invoke(getBucketsAndKeysRemoved);
  }

  protected Map<Integer, List<Integer>> getBucketsAndKeysAdded(VM vm, final String regionName) {
    SerializableCallable getBucketsAndKeysAdded =
        new SerializableCallable("getBucketsAndKeysAdded") {

          public Object call() {
            Cache cache = getCache();
            Region region = cache.getRegion(regionName);
            TestPartitionListener listener = (TestPartitionListener) region.getAttributes()
                .getPartitionAttributes().getPartitionListeners()[0];
            return listener.getBucketsAndKeysAdded();
          }
        };
    return (Map<Integer, List<Integer>>) vm.invoke(getBucketsAndKeysAdded);
  }

  protected List<Integer> getAfterSecondaryCallbackBucketIds(VM vm, final String regionName) {
    SerializableCallable getAfterSecondaryCallbackBucketIds =
        new SerializableCallable("getAfterSecondaryCallbackBucketIds") {

          public Object call() {
            Cache cache = getCache();
            Region region = cache.getRegion(regionName);
            TestPartitionListener listener = (TestPartitionListener) region.getAttributes()
                .getPartitionAttributes().getPartitionListeners()[0];
            return listener.getAfterSecondaryCallbackBucketIds();
          }
        };
    return (List<Integer>) vm.invoke(getAfterSecondaryCallbackBucketIds);
  }

  protected void rebalance(VM vm) {
    vm.invoke(new SerializableCallable() {

      public Object call() throws Exception {
        RebalanceOperation rebalance =
            getCache().getResourceManager().createRebalanceFactory().start();
        rebalance.getResults();
        return null;
      }
    });
  }

  protected static class TestPartitionListener extends PartitionListenerAdapter {

    private String regionName;

    private final List<Integer> primariesCreated;

    private final List<Integer> afterSecondaryCalled;

    private final Map<Integer, List<Integer>> bucketsAndKeysRemoved;

    private final Map<Integer, List<Integer>> bucketsAndKeysAdded;

    public TestPartitionListener() {
      this.primariesCreated = new ArrayList<>();
      afterSecondaryCalled = new ArrayList<>();
      this.bucketsAndKeysRemoved = new HashMap<Integer, List<Integer>>();
      this.bucketsAndKeysAdded = new HashMap<Integer, List<Integer>>();
    }

    public Map<Integer, List<Integer>> getBucketsAndKeysRemoved() {
      return this.bucketsAndKeysRemoved;
    }

    public Map<Integer, List<Integer>> getBucketsAndKeysAdded() {
      return this.bucketsAndKeysAdded;
    }

    public List<Integer> getPrimariesCreated() {
      return this.primariesCreated;
    }

    public String getRegionName() {
      return this.regionName;
    }

    public void afterRegionCreate(Region<?, ?> region) {
      this.regionName = region.getName();
    }

    public void afterPrimary(int bucketId) {
      this.primariesCreated.add(bucketId);
    }

    public void afterSecondary(int bucketId) {
      this.afterSecondaryCalled.add(bucketId);
    }

    public List<Integer> getAfterSecondaryCallbackBucketIds() {
      return afterSecondaryCalled;
    }

    public void afterBucketRemoved(int bucketId, Iterable<?> keys) {
      Collection<Integer> keysCol = (Collection) keys;
      // If the keys collection is not empty, create a serializable list to hold
      // them and add them to the keys removed.
      if (!keysCol.isEmpty()) {
        List<Integer> keysList = new ArrayList<Integer>();
        for (Integer key : keysCol) {
          keysList.add(key);
        }
        Collections.sort(keysList);
        this.bucketsAndKeysRemoved.put(bucketId, keysList);
      }
    }

    public void afterBucketCreated(int bucketId, Iterable<?> keys) {
      Collection<Integer> keysCol = (Collection) keys;
      // If the keys collection is not empty, create a serializable list to hold
      // them and add them to the keys added.
      if (!keysCol.isEmpty()) {
        List<Integer> keysList = new ArrayList<Integer>();
        for (Integer key : keysCol) {
          keysList.add(key);
        }
        Collections.sort(keysList);
        this.bucketsAndKeysAdded.put(bucketId, keysList);
      }
    }
  }
}

redpajama_set_name: RedPajamaGithub


SharpSpring is looking for a Content Marketing Manager to join our Marketing Team as the companys specialist on our target customers (how they buy and their buying criteria) and our competitors (key differentiators and unique value propositions). You will work with a team of content developers who are laser-focused on creating emails, landing pages, and other content designed to convert prospects to leads and leads to sales.Our marketing team includes fun, progressive people with a strong team spirit. We are looking for another creative, collaborative team member who takes their job, but not themselves, too seriously!ResponsibilitiesContent Creation: Develop compelling lead-generation content (emails, landing pages, web content, white papers, case studies, videos, social media content, and other materials) that converts prospects to leads.Ensure consistency in tone, style, and messaging across all the content created.Messaging: Turn features and functionality specs into product positioning and content that convey the business benefits to prospective customers.Sales Enablement: Support the Sales Team by creating materials that shorten the sales cycle and convert leads to wins (slide decks, product sheets, competitor kill sheets).Event Launches: Work with the Marketing Team to develop and execute plans and materials as we launch new events for prospects and current customers, as well as virtual events and webinars.The Person3+ years of marketing experience, preferably with a software companyBachelors degree in business or marketingExcellent writing and eagle-eye editing skills, with a focus on tone and style consistencyKnowledge of marketing automation or email marketing platformsDemonstrable experience in transforming a feature list into value propositions and benefits that matter to prospective customersProven creative thinker who generates and executes on innovative marketing ideas with limited guidanceA fun personality, motivation to beat the competition, and a desire to see your colleagues succeedWillingness to travel 10% of the time for conferences or other company events*Special Instructions for Applicants*In the cover letter section of the application, please provide links or attach copies of writing samples landing page, marketing email, stand-out social posts, direct mail, and news release copy are suggested.
Get Gainesville Executive jobs via email.


Our gorgeous mahogany sweetheart farm table is a perfect place to enjoy your first meal as a married couple. This custom made table is 3′ x 5′ and 30″ high. It matches our farm tables and mahogany benches perfectly!


The distance between Winnipeg, Manitoba, Canada and Mindat, Myanmar is approximately 12,011 km or 7,463 mi.
To reach Winnipeg, Manitoba in this distance one would set out from Mindat bearing 7.5° or N and follow the great circles arc to approach Winnipeg, Manitoba bearing 169.1° or S .
Winnipeg, Manitoba has a warm summer continental/ hemiboreal climate with no dry season (Dfb) whereas Mindat has a humid subtropical climate with dry winters (Cwa).
Winnipeg, Manitoba is in or near the cool temperate steppe biome whereas Mindat is in or near the subtropical wet forest biome.
The average temperature is 17.3 °C (31.1°F) cooler.
Total annual precipitation averages 897.4 mm (35.3 in) less which is equivalent to 897.4 l/m² (22.02 US gal/ft²) or 8,974,000 l/ha (959,380 US gal/ac) less. About 1/3 as much.
The altitude of the sun at midday is overall 28° lower in Winnipeg, Manitoba than in Mindat.
The table shows values for Winnipeg, Manitoba relative to Mindat. You can also view this comparison the other way around from the perspective of Mindat vs Winnipeg, Manitoba.


traininc.me 9 out of 10 based on 488 ratings. 3,740 user reviews.
View and Download Sony Xplod CDX GT170 operating instructions manual online. FM MW SW pact Disc Player. Xplod CDX GT170 Car Receiver pdf manual download. Also for: Cdx gt170s, Cdx gt270, Cdx gt270s, Cdx gt370s, Cdx gt370.
SONY CDX GT35U OPERATING INSTRUCTIONS MANUAL Pdf Download.
View and Download Sony CDX GT35U operating instructions manual online. FM AM pact Disc Player. CDX GT35U Car Receiver pdf manual download. Also for: Cdx gt35uw.
2019 jayco eagle 355mbqs, this is the bunkhouse you have been looking for! featuring an incredible 4 slideouts, outside kitchen and a bunk area, this fifth wheel fits all your needs.


Imagine a small paradise in the middle of the Atlantic, a sustainable luxury project carefully integrated in the spectacular surroundings of the south of the island of Tenerife. An ideal place to lose yourself and recover your vital energy, thanks to the respect for the natural environment that surrounds it and the tranquillity of the setting.
Designed by the prestigious Foster & Partners architectural studio, Maguenes Golf & Spa Hotel will feature a spectacular luxury boutique hotel, an area of private villas and a golf course designed by Gary Player, a renowned designer who has created more than 300 courses around the world.
The project Maguenes Golf & Spa Hotel, located south of the island of Tenerife in the municipality of Guía de Isora, is characterized by its innovative concept in sustainable design and its integration into the environment.
Maguenes, designed by the London-based Foster & Partners architectural studio and reflecting the avant-garde and luxury spirit of the project, is managed by Compañía de las Islas Occidentales (CIO), company that owns the renowned Hotel Bahía del Duque, and who have more than 20 years' experience in the luxury tourism sector of the Canary Islands. CIO wanted to create yet another innovative product that perfectly combines the endemic nature of the area with luxury stays and excellent service.
With a surface area of more than 850,000 m2, Maguenes Golf & Spa Hotel will offer three exclusive products: a luxury boutique hotel, a Private Residence Club (PRC) and the Maguenes Residences private villas. Thanks to experience of The Tais in wellness and health, the resort will also feature a complete and elegant wellness & spa area, as well as a 500,000 m2 golf course designed by the professional golfer Gary Player.
Sustainable development is one of the project's priorities. Therefore, it will be integrated into the existing landscape, organic terraces will be used and the slopes of the land will be used to maximize the views and to differentiate the areas of the Resort.
Let us show you a place that belongs to the extraordinary world of The Tais, where culture and tradition are combined with innovative design and warm Canarian hospitality. All this is integrated into an idyllic landscape, where small details make a great difference.
The spectacular volcano Teide, declared World Heritage site by Unesco, rises majestically in the centre of the island of Tenerife. In this unique enclave, situated in the Atlantic Ocean, you will be able to enjoy infinite sunsets on stunning beaches or unforgettable walks through winding laurel forests. Known as the island of the eternal spring, there is no place better than Tenerife, to disconnect and feel alive.
The Maguenes Golf & Spa Hotel project is located on the south east corner of the island, in the municipality of Guía de Isora, a privileged place that shows its beauty from the coast to the mountains in a territory of great natural richness.
© 2019 Maguenes. All Rights Reserved.