<commit_before>from cuisine import *
from fabric.api import *
from fabric.contrib.console import confirm
from fabric.context_managers import *
import string

prequisites = ['build-essential', 'python-dev', 'libpng-dev',  
  'libbz2-dev', 'zlib1g-dev', 'libfreetype6-dev', 'libjpeg8-dev']

def ensure():
  if not is_installed():
   puts("Installing python support...")
   install()
  else:
    puts("Python and tools already installed")

def is_installed():
  return file_exists("/usr/local/bin/virtualenv")

def install():
  package_update()
  install_prerequisites()
  install_pip()
  install_virtualenv()

def install_prerequisites(): # we need to get PIL prequisites...
  package_ensure("python-dev")

def install_pip():
  package_ensure("python-pip")

def install_virtualenv():
  sudo("pip install virtualenv")<commit_msg>making symlinks with the python fabfile to accomodate pil<commit_after>from cuisine import *
from fabric.api import *
from fabric.contrib.console import confirm
from fabric.context_managers import *
import string

prequisites = ['build-essential', 'python-dev', 'libpng-dev',  
  'libbz2-dev', 'zlib1g-dev', 'libfreetype6-dev', 'libjpeg8-dev']

def ensure():
  if not is_installed():
   puts("Installing python support...")
   install()
  else:
    puts("Python and tools already installed")

def is_installed():
  return file_exists("/usr/local/bin/virtualenv")

def install():
  package_update()
  install_prerequisites()
  install_pip()
  install_virtualenv()

def install_prerequisites(): # we need to get PIL prequisites...
  package_ensure(prequisites)

  # this is annoying -- PIL is hardcoded to search in /usr/lib for prequisites...
  from os.path import join
  src = '/usr/lib/i386-linux-gnu'
  dst = '/usr/lib'
  for f in ['libfreetype.so', 'libjpeg.so', 'libz.so']:
    file_link(join(src,f), join(dst,f))

def install_pip():
  package_ensure("python-pip")

def install_virtualenv():
  sudo("pip install virtualenv")
{'fraction_non_alphanumeric': 0.1330603889457523, 'fraction_numerical': 0.005629477993858751, 'mean_word_length': 4.766961651917404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2176989', 'n_tokens_mistral': 664, 'n_tokens_neox': 632, 'n_words': 165}