<commit_before>- hosts: all
  tasks:
      # We can't add repositories using the ansible apt_* commands without pycurl
      # But this approach is documented below in case you're curious:

      # Now for the approach I'll recommend
      # We need to use shell (not recommended for "secure and predictable") as
      # we need the pipe to work
      # Note also, tee by default overwrites the file, so it's ok to run this
      # multiple times
      - shell: wget -O- http://neuro.debian.net/lists/precise.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list
      - command: apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
      # Note, we only want to update the cache once (in the first apt command)
      - apt: pkg=postgresql-9.1 state=latest update_cache=yes
      - name: python packages
        apt: pkg={{ item }} state=latest
        with_items:
            - ipython
            - python-pandas
            - python-sqlalchemy
            - python-pycurl

      # CRAN
      - apt_repository: repo='deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/' state=present
      - apt_repository: repo='deb-src http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/' state=present
      #- apt_key: id=E084DAB9 url=http://keyserver.ubuntu.com:80 
      - apt_key: url=http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x51716619E084DAB9 state=present

      - name: R packages
        apt: pkg={{ item }} state=latest
        with_items:
            - r-base
            - r-base-dev
            - r-base-core
      # apt_* command usage for the curious
      # Not sure if we'd need update_cache here
      # - apt: pkg=python-pycurl state=present update_cache=yes
      # - apt_repository: repo='deb http://neurodeb.pirsquared.org data main contrib non-free' state=present
      # - apt_repository: repo='deb http://neurodeb.pirsquared.org precise main contrib non-free' state=present
      # - apt_key: id=2649A5A9 url=??? # http://pgp.mit.edu doesn't work<commit_msg>Refresh the apt cache before installing CRAN packages.<commit_after>- hosts: all
  tasks:
      # We can't add repositories using the ansible apt_* commands without pycurl
      # But this approach is documented below in case you're curious:

      # Now for the approach I'll recommend
      # We need to use shell (not recommended for "secure and predictable") as
      # we need the pipe to work
      # Note also, tee by default overwrites the file, so it's ok to run this
      # multiple times
      - shell: wget -O- http://neuro.debian.net/lists/precise.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list
      - command: apt-key adv --recv-keys --keyserver pgp.mit.edu <KEY>
      # Note, we only want to update the cache once (in the first apt command)
      - apt: pkg=postgresql-9.1 state=latest update_cache=yes
      - name: python packages
        apt: pkg={{ item }} state=latest
        with_items:
            - ipython
            - python-pandas
            - python-sqlalchemy
            - python-pycurl

      # CRAN
      #- apt_key: id=E084DAB9 url=http://keyserver.ubuntu.com:80 
      - apt_key: url=http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x51716619E084DAB9 state=present
      - apt_repository: repo='deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/' state=present
      - apt_repository: repo='deb-src http://cran.cnr.berkeley.edu/bin/linux/ubuntu precise/' state=present

      - name: R packages
        apt: pkg={{ item }} state=latest update_cache=yes
        with_items:
            - r-base
            - r-base-dev
            - r-base-core
      # apt_* command usage for the curious
      # Not sure if we'd need update_cache here
      # - apt: pkg=python-pycurl state=present update_cache=yes
      # - apt_repository: repo='deb http://neurodeb.pirsquared.org data main contrib non-free' state=present
      # - apt_repository: repo='deb http://neurodeb.pirsquared.org precise main contrib non-free' state=present
      # - apt_key: id=2649A5A9 url=??? # http://pgp.mit.edu doesn't work
{'fraction_non_alphanumeric': 0.10716907266943969, 'fraction_numerical': 0.01712747736726205, 'mean_word_length': 2.4880546075085324, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '815719', 'n_tokens_mistral': 1361, 'n_tokens_neox': 1236, 'n_words': 357}