text:
"""Set of utility functions for working with virtual machines."""

import contextlib
import logging
import os
import platform
import posixpath
import random
import re
import string
import subprocess
import tempfile
import threading
import time
from typing import Callable, Dict, Iterable, Optional, Tuple

from absl import flags
import jinja2
from perfkitbenchmarker import background_tasks
from perfkitbenchmarker import data
from perfkitbenchmarker import errors
from perfkitbenchmarker import temp_dir
from six.moves import range

FLAGS = flags.FLAGS

PRIVATE_KEYFILE = 'perfkitbenchmarker_keyfile'
PUBLIC_KEYFILE = 'perfkitbenchmarker_keyfile.pub'

# The temporary directory on VMs. We cannot reuse GetTempDir()
# because run_uri will not be available at time of module load and we need
# to use this directory as a base for other module level constants.
VM_TMP_DIR = '/tmp/pkb'

# Default timeout for issuing a command.
DEFAULT_TIMEOUT = 300

# Defaults for retrying commands.
POLL_INTERVAL = 30
TIMEOUT = 1200
FUZZ = .5
MAX_RETRIES = -1

WINDOWS = 'nt'
DARWIN = 'Darwin'
PASSWORD_LENGTH = 15

OUTPUT_STDOUT = 0
OUTPUT_STDERR = 1
OUTPUT_EXIT_CODE = 2

flags.DEFINE_integer('default_timeout', TIMEOUT, 'The default timeout for '
                     'retryable commands in seconds.')
flags.DEFINE_integer('burn_cpu_seconds', 0,
                     'Amount of time in seconds to burn cpu on vm before '
                     'starting benchmark')
flags.DEFINE_integer('burn_cpu_threads', 1, 'Number of threads to use to '
                     'burn cpu before starting benchmark.')
flags.DEFINE_integer('background_cpu_threads', None,
                     'Number of threads of background vm_util.cpu usage while '
                     'running a benchmark')
flags.DEFINE_integer('background_network_mbits_per_sec', None,
                     'Number of megabits per second of background '
                     'network traffic to generate during the run phase '
                     'of the benchmark')
flags.DEFINE_boolean('ssh_reuse_connections', True,
                     'Whether to reuse SSH connections rather than '
                     'reestablishing a connection for each remote command.')
# We set this to the short value of 5 seconds so that the cluster boot benchmark
# can measure a fast connection when bringing up a VM. This avoids retries that
# may not be as quick as every 5 seconds when specifying a larger value.
flags.DEFINE_integer('ssh_connect_timeout', 5, 'timeout for SSH connection.',
                     lower_bound=0)
flags.DEFINE_string('ssh_control_path', None,
                    'Overrides the default ControlPath setting for ssh '
                    'connections if --ssh_reuse_connections is set. This can '
                    'be helpful on systems whose default temporary directory '
                    'path is too long (sockets have a max path length) or a '
                    'version of ssh that doesn\'t support the %h token. See '
                    'ssh documentation on the ControlPath setting for more '
                    'detailed information.')
flags.DEFINE_string('ssh_control_persist', '30m',
                    'Setting applied to ssh connections if '
                    '--ssh_reuse_connections is set. Sets how long the '
                    'connections persist before they are removed. '
                    'See ssh documentation about the ControlPersist setting '
                    'for more detailed information.')
flags.DEFINE_integer('ssh_server_alive_interval', 30,
                     'Value for ssh -o ServerAliveInterval. Use with '
                     '--ssh_server_alive_count_max to configure how long to '
                     'wait for unresponsive servers.')
flags.DEFINE_integer('ssh_server_alive_count_max', 10,
                     'Value for ssh -o ServerAliveCountMax. Use with '
                     '--ssh_server_alive_interval to configure how long to '
                     'wait for unresponsive servers.')

class IpAddressSubset(object):
  """Enum of options for --ip_addresses."""
  REACHABLE = 'REACHABLE'
  BOTH = 'BOTH'
  INTERNAL = 'INTERNAL'
  EXTERNAL = 'EXTERNAL'

  ALL = (REACHABLE, BOTH, INTERNAL, EXTERNAL)

flags.DEFINE_enum('ip_addresses', IpAddressSubset.REACHABLE,
                  IpAddressSubset.ALL,
                  'For networking tests: use both internal and external '
                  'IP addresses (BOTH), internal and external only if '
                  'the receiving VM is reachable by internal IP (REACHABLE), '
                  'external IP only (EXTERNAL) or internal IP only (INTERNAL)')

flags.DEFINE_enum('background_network_ip_type', IpAddressSubset.EXTERNAL,
                  (IpAddressSubset.INTERNAL, IpAddressSubset.EXTERNAL),
                  'IP address type to use when generating background network '
                  'traffic')

class IpAddressMetadata(object):
  INTERNAL = 'internal'
  EXTERNAL = 'external'

def GetTempDir():
  """Returns the tmp dir of the current run."""
  return temp_dir.GetRunDirPath()

def PrependTempDir(file_name):
  """Returns the file name prepended with the tmp dir of the current run."""
  return os.path.join(GetTempDir(), file_name)

def GenTempDir():
  """Creates the tmp dir for the current run if it does not already exist."""
  temp_dir.CreateTemporaryDirectories()

def SSHKeyGen():
  """Create PerfKitBenchmarker SSH keys in the tmp dir of the current run."""
  if not os.path.isdir(GetTempDir()):
    GenTempDir()

  if not os.path.isfile(GetPrivateKeyPath()):
    create_cmd = ['ssh-keygen',
                  '-t', 'rsa',
                  '-N', '',
                  '-m', 'PEM',
                  '-q',
                  '-f', PrependTempDir(PRIVATE_KEYFILE)]
    IssueCommand(create_cmd)

def GetPrivateKeyPath():
  return PrependTempDir(PRIVATE_KEYFILE)

def GetPublicKeyPath():
  return PrependTempDir(PUBLIC_KEYFILE)

def GetSshOptions(ssh_key_filename, connect_timeout=None):
  """Return common set of SSH and SCP options."""
  options = [
      '-2',
      '-o', 'UserKnownHostsFile=/dev/null',
      '-o', 'StrictHostKeyChecking=no',
      '-o', 'IdentitiesOnly=yes',
      '-o', 'PreferredAuthentications=publickey',
      '-o', 'PasswordAuthentication=no',
      '-o', 'ConnectTimeout=%d' % (
          connect_timeout or FLAGS.ssh_connect_timeout),
      '-o', 'GSSAPIAuthentication=no',
      '-o', 'ServerAliveInterval=%d' % FLAGS.ssh_server_alive_interval,
      '-o', 'ServerAliveCountMax=%d' % FLAGS.ssh_server_alive_count_max,
      '-i', ssh_key_filename
  ]
  if FLAGS.use_ipv6:
    options.append('-6')
  if FLAGS.ssh_reuse_connections:
    control_path = (FLAGS.ssh_control_path or
                    os.path.join(temp_dir.GetSshConnectionsDir(), '%h'))
    options.extend([
        '-o', 'ControlPath="%s"' % control_path,
        '-o', 'ControlMaster=auto',
        '-o', 'ControlPersist=%s' % FLAGS.ssh_control_persist
    ])
  options.extend(FLAGS.ssh_options)

  return options

# TODO(user): Remove at least RunParallelProcesses and RunParallelThreads
# from this file (update references to call directly into background_tasks).
RunParallelProcesses = background_tasks.RunParallelProcesses
RunParallelThreads = background_tasks.RunParallelThreads
RunThreaded = background_tasks.RunThreaded

def Retry(poll_interval=POLL_INTERVAL, max_retries=MAX_RETRIES,
          timeout=None, fuzz=FUZZ, log_errors=True,
          retryable_exceptions=None):
  """A function decorator that will retry when exceptions are thrown.

  Args:
    poll_interval: The time between tries in seconds. This is the maximum poll
        interval when fuzz is specified.
    max_retries: The maximum number of retries before giving up. If -1, this
        means continue until the timeout is reached. The function will stop
        retrying when either max_retries is met or timeout is reached.
    timeout: The timeout for all tries in seconds. If -1, this means continue
        until max_retries is met. The function will stop retrying when either
        max_retries is met or timeout is reached.
    fuzz: The amount of randomness in the sleep time. This is used to
        keep threads from all retrying at the same time. At 0, this
        means sleep exactly poll_interval seconds. At 1, this means
        sleep anywhere from 0 to poll_interval seconds.
    log_errors: A boolean describing whether errors should be logged.
    retryable_exceptions: A tuple of exceptions that should be retried. By
        default, this is None, which indicates that all exceptions should
        be retried.

  Returns:
    A function that wraps functions in retry logic. It can be
        used as a decorator.
  """
  if retryable_exceptions is None:
    retryable_exceptions = Exception

  def Wrap(f):
    """Wraps the supplied function with retry logic."""
    def WrappedFunction(*args, **kwargs):
      """Holds the retry logic."""
      local_timeout = FLAGS.default_timeout if timeout is None else timeout

      if local_timeout >= 0:
        deadline = time.time() + local_timeout
      else:
        deadline = float('inf')

      tries = 0
      while True:
        try:
          tries += 1
          return f(*args, **kwargs)
        except retryable_exceptions as e:
          fuzz_multiplier = 1 - fuzz + random.random() * fuzz
          sleep_time = poll_interval * fuzz_multiplier
          if ((time.time() + sleep_time) >= deadline or
              (max_retries >= 0 and tries > max_retries)):
            raise
          else:
            if log_errors:
              logging.info('Retrying exception running %s: %s', f.__name__, e)
            time.sleep(sleep_time)
    return WrappedFunction
  return Wrap

class _BoxedObject(object):
  """Box a value in a reference so it is modifiable inside an inner function.

  In python3 the nonlocal keyword could be used instead - but for python2
  there is no support for modifying an external scoped variable value.
  """

  def __init__(self, initial_value):
    self.value = initial_value

def _ReadIssueCommandOutput(tf_out, tf_err):
  """Reads IssueCommand Output from stdout and stderr."""
  tf_out.seek(0)
  stdout = tf_out.read().decode('ascii', 'ignore')
  tf_err.seek(0)
  stderr = tf_err.read().decode('ascii', 'ignore')
  return stdout, stderr

def IssueCommand(
    cmd: Iterable[str],
    force_info_log: bool = False,
    suppress_warning: bool = False,
    env: Optional[Dict[str, str]] = None,
    timeout: Optional[int] = DEFAULT_TIMEOUT,
    cwd: Optional[str] = None,
    raise_on_failure: bool = True,
    suppress_failure: Optional[Callable[[str, str, int], bool]] = None,
    raise_on_timeout: bool = True) -> Tuple[str, str, int]:
  """Tries running the provided command once.

  Args:
    cmd: A list of strings such as is given to the subprocess.Popen()
        constructor.
    force_info_log: A boolean indicating whether the command result should
        always be logged at the info level. Command results will always be
        logged at the debug level if they aren't logged at another level.
    suppress_warning: A boolean indicating whether the results should
        not be logged at the info level in the event of a non-zero
        return code. When force_info_log is True, the output is logged
        regardless of suppress_warning's value.
    env: A dict of key/value strings, such as is given to the subprocess.Popen()
        constructor, that contains environment variables to be injected.
    timeout: Timeout for the command in seconds. If the command has not finished
        before the timeout is reached, it will be killed. Set timeout to None to
        let the command run indefinitely. If the subprocess is killed, the
        return code will indicate an error, and stdout and stderr will
        contain what had already been written to them before the process was
        killed.
    cwd: Directory in which to execute the command.
    raise_on_failure: A boolean indicating if non-zero return codes should raise
        IssueCommandError.
    suppress_failure: A function passed (stdout, stderr, ret_code) for non-zero
        return codes to determine if the failure should be suppressed e.g. a
        delete command which fails because the item to be deleted does not
        exist.
    raise_on_timeout: A boolean indicating if killing the process due to the
        timeout being hit should raise a IssueCommandTimeoutError

  Returns:
    A tuple of stdout, stderr, and retcode from running the provided command.

  Raises:
    IssueCommandError: When raise_on_failure=True and retcode is non-zero.
    IssueCommandTimeoutError:  When raise_on_timeout=True and
                               command duration exceeds timeout
  """
  if env:
    logging.debug('Environment variables: %s', env)

  # Force conversion to string so you get a nice log statement before hitting a
  # type error or NPE.
  full_cmd = ' '.join(str(w) for w in cmd)
  logging.info('Running: %s', full_cmd)

  time_file_path = '/usr/bin/time'

  running_on_windows = RunningOnWindows()
  running_on_darwin = RunningOnDarwin()
  should_time = (not (running_on_windows or running_on_darwin) and
                 os.path.isfile(time_file_path) and FLAGS.time_commands)
  shell_value = running_on_windows
  with tempfile.TemporaryFile() as tf_out, \
      tempfile.TemporaryFile() as tf_err, \
      tempfile.NamedTemporaryFile(mode='r') as tf_timing:

    cmd_to_use = cmd
    if should_time:
      cmd_to_use = [
          time_file_path, '-o', tf_timing.name, '--quiet', '-f',
          ',  WallTime:%Es,  CPU:%Us,  MaxMemory:%Mkb '
      ] + list(cmd)

    try:
      process = subprocess.Popen(cmd_to_use, env=env, shell=shell_value,
                                 stdin=subprocess.PIPE, stdout=tf_out,
                                 stderr=tf_err, cwd=cwd)
    except TypeError as e:
      # Only perform this validation after a type error, in case we are being
      # too strict.
      non_strings = [s for s in cmd if not isinstance(s, str)]
      if non_strings:
        raise ValueError(
            f'Command {cmd} contains non-string elements {non_strings}.') from e
      raise

    did_timeout = _BoxedObject(False)
    was_killed = _BoxedObject(False)

    def _KillProcess():
      did_timeout.value = True
      if not raise_on_timeout:
        logging.warning('IssueCommand timed out after %d seconds. '
                        'Killing command "%s".', timeout, full_cmd)
      process.kill()
      was_killed.value = True

    timer = threading.Timer(timeout, _KillProcess)
    timer.start()

    try:
      process.wait()
    finally:
      timer.cancel()

    stdout, stderr = _ReadIssueCommandOutput(tf_out, tf_err)

    timing_output = ''
    if should_time:
      timing_output = tf_timing.read().rstrip('\n')

  debug_text = ('Ran: {%s}\nReturnCode:%s%s\nSTDOUT: %s\nSTDERR: %s' %
                (full_cmd, process.returncode, timing_output, stdout, stderr))
  if force_info_log or (process.returncode and not suppress_warning):
    logging.info(debug_text)
  else:
    logging.debug(debug_text)

  # Raise timeout error regardless of raise_on_failure - as the intended
  # semantics is to ignore expected errors caused by invoking the command
  # not errors from PKB infrastructure.
  if did_timeout.value and raise_on_timeout:
    debug_text = (
        '{0}\nIssueCommand timed out after {1} seconds.  '
        '{2} by perfkitbenchmarker.'.format(
            debug_text, timeout,
            'Process was killed' if was_killed.value else
            'Process may have been killed'))
    raise errors.VmUtil.IssueCommandTimeoutError(debug_text)
  elif process.returncode and (raise_on_failure or suppress_failure):
    if (suppress_failure and
        suppress_failure(stdout, stderr, process.returncode)):
      # failure is suppressible, rewrite the stderr and return code as passing
      # since some callers assume either is a failure e.g.
      # perfkitbenchmarker.providers.aws.util.IssueRetryableCommand()
      return stdout, '', 0
    raise errors.VmUtil.IssueCommandError(debug_text)

  return stdout, stderr, process.returncode

def IssueBackgroundCommand(cmd, stdout_path, stderr_path, env=None):
  """Run the provided command once in the background.

  Args:
    cmd: Command to be run, as expected by subprocess.Popen.
    stdout_path: Redirect stdout here. Overwritten.
    stderr_path: Redirect stderr here. Overwritten.
    env: A dict of key/value strings, such as is given to the subprocess.Popen()
        constructor, that contains environment variables to be injected.
  """
  logging.debug('Environment variables: %s', env)

  full_cmd = ' '.join(cmd)
  logging.info('Spawning: %s', full_cmd)
  outfile = open(stdout_path, 'w')
  errfile = open(stderr_path, 'w')
  shell_value = RunningOnWindows()
  subprocess.Popen(cmd, env=env, shell=shell_value,
                   stdout=outfile, stderr=errfile, close_fds=True)

@Retry()
def IssueRetryableCommand(cmd, env=None):
  """Tries running the provided command until it succeeds or times out.

  Args:
    cmd: A list of strings such as is given to the subprocess.Popen()
        constructor.
    env: An alternate environment to pass to the Popen command.

  Returns:
    A tuple of stdout and stderr from running the provided command.
  """
  stdout, stderr, retcode = IssueCommand(cmd, env=env, raise_on_failure=False)
  if retcode:
    debug_text = ('Ran: {%s}\nReturnCode:%s\nSTDOUT: %s\nSTDERR: %s' %
                  (' '.join(cmd), retcode, stdout, stderr))
    raise errors.VmUtil.CalledProcessException(
        'Command returned a non-zero exit code:\n{}'.format(debug_text))
  return stdout, stderr

def ParseTimeCommandResult(command_result):
  """Parse command result and get time elapsed.

  Note this parses the output of bash's time builtin, not /usr/bin/time or other
  implementations. You may need to run something like bash -c "time ./command"
  to produce parseable output.

  Args:
     command_result: The result after executing a remote time command.

  Returns:
     Time taken for the command.
  """
  time_data = re.findall(r'real\s+(\d+)m(\d+.\d+)', command_result)
  time_in_seconds = 60 * float(time_data[0][0]) + float(time_data[0][1])
  return time_in_seconds

def ShouldRunOnExternalIpAddress(ip_type=None):
  """Returns whether a test should be run on an instance's external IP."""
  ip_type_to_check = ip_type or FLAGS.ip_addresses
  return ip_type_to_check in (IpAddressSubset.EXTERNAL, IpAddressSubset.BOTH,
                              IpAddressSubset.REACHABLE)

def ShouldRunOnInternalIpAddress(sending_vm, receiving_vm, ip_type=None):
  """Returns whether a test should be run on an instance's internal IP.

  Based on the command line flag --ip_addresses. Internal IP addresses are used
  when:

  * --ip_addresses=BOTH or --ip-addresses=INTERNAL
  * --ip_addresses=REACHABLE and 'sending_vm' can ping 'receiving_vm' on its
    internal IP.

  Args:
    sending_vm: VirtualMachine. The client.
    receiving_vm: VirtualMachine. The server.
    ip_type: optional ip_type to use instead of what is set in the FLAGS

  Returns:
    Whether a test should be run on an instance's internal IP.
  """
  ip_type_to_check = ip_type or FLAGS.ip_addresses
  return (ip_type_to_check in (IpAddressSubset.BOTH, IpAddressSubset.INTERNAL)
          or (ip_type_to_check == IpAddressSubset.REACHABLE and
              sending_vm.IsReachable(receiving_vm)))

def GetLastRunUri():
  """Returns the last run_uri used (or None if it can't be determined)."""
  runs_dir_path = temp_dir.GetAllRunsDirPath()
  try:
    dir_names = next(os.walk(runs_dir_path))[1]
  except StopIteration:
    # The runs directory was not found.
    return None

  if not dir_names:
    # No run subdirectories were found in the runs directory.
    return None

  # Return the subdirectory with the most recent modification time.
  return max(dir_names,
             key=lambda d: os.path.getmtime(os.path.join(runs_dir_path, d)))

@contextlib.contextmanager
def NamedTemporaryFile(mode='w+b', prefix='tmp', suffix='', dir=None,
                       delete=True):
  """Behaves like tempfile.NamedTemporaryFile.

  The existing tempfile.NamedTemporaryFile has the annoying property on
  Windows that it cannot be opened a second time while it is already open.
  This makes it impossible to use it with a "with" statement in a cross platform
  compatible way. This serves a similar role, but allows the file to be closed
  within a "with" statement without causing the file to be unlinked until the
  context exits.

  Args:
    mode: see mode in tempfile.NamedTemporaryFile.
    prefix: see prefix in tempfile.NamedTemporaryFile.
    suffix: see suffix in tempfile.NamedTemporaryFile.
    dir: see dir in tempfile.NamedTemporaryFile.
    delete: see delete in NamedTemporaryFile.

  Yields:
    A cross platform file-like object which is "with" compatible.
  """
  f = tempfile.NamedTemporaryFile(mode=mode, prefix=prefix, suffix=suffix,
                                  dir=dir, delete=False)
  try:
    yield f
  finally:
    if not f.closed:
      f.close()
    if delete:
      os.unlink(f.name)

def GenerateSSHConfig(vms, vm_groups):
  """Generates an SSH config file to simplify connecting to the specified VMs.

  Writes a file to GetTempDir()/ssh_config with an SSH configuration for each VM
  provided in the arguments. Users can then SSH with any of the following:

      ssh -F <ssh_config_path> <vm_name>
      ssh -F <ssh_config_path> vm<vm_index>
      ssh -F <ssh_config_path> <group_name>-<index>

  Args:
    vms: list of BaseVirtualMachines.
    vm_groups: dict mapping VM group name string to list of BaseVirtualMachines.
  """
  target_file = os.path.join(GetTempDir(), 'ssh_config')
  template_path = data.ResourcePath('ssh_config.j2')
  environment = jinja2.Environment(undefined=jinja2.StrictUndefined)
  with open(template_path) as fp:
    template = environment.from_string(fp.read())
  with open(target_file, 'w') as ofp:
    ofp.write(template.render({'vms': vms, 'vm_groups': vm_groups}))

  ssh_options = ['  ssh -F {0} {1}'.format(target_file, pattern)
                 for pattern in ('<vm_name>', 'vm<index>',
                                 '<group_name>-<index>')]
  logging.info('ssh to VMs in this benchmark by name with:\n%s',
               '\n'.join(ssh_options))

def RunningOnWindows():
  """Returns True if PKB is running on Windows."""
  return os.name == WINDOWS

def RunningOnDarwin():
  """Returns True if PKB is running on a Darwin OS machine."""
  return os.name != WINDOWS and platform.system() == DARWIN

def ExecutableOnPath(executable_name):
  """Return True if the given executable can be found on the path."""
  cmd = ['where'] if RunningOnWindows() else ['which']
  cmd.append(executable_name)

  shell_value = RunningOnWindows()
  process = subprocess.Popen(cmd,
                             shell=shell_value,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE)
  process.communicate()

  if process.returncode:
    return False
  return True

def GenerateRandomWindowsPassword(password_length=PASSWORD_LENGTH):
  """Generates a password that meets Windows complexity requirements."""
  # The special characters have to be recognized by the Azure CLI as
  # special characters. This greatly limits the set of characters
  # that we can safely use. See
  # https://github.com/Azure/azure-xplat-cli/blob/master/lib/commands/arm/vm/vmOsProfile._js#L145
  special_chars = '*!@#$%+='
  # Ensure that the password contains at least one of each 4 required
  # character types starting with letters to avoid starting with chars which
  # are problematic on the command line e.g. @.
  prefix = [random.choice(string.ascii_lowercase),
            random.choice(string.ascii_uppercase),
            random.choice(string.digits),
            random.choice(special_chars)]
  password = [
      random.choice(string.ascii_letters + string.digits + special_chars)
      for _ in range(password_length - 4)]
  return ''.join(prefix + password)

def CopyFileBetweenVms(filename, src_vm, src_path, dest_vm, dest_path):
  """Copies a file from the src_vm to the dest_vm."""
  with tempfile.NamedTemporaryFile() as tf:
    temp_path = tf.name
    src_vm.RemoteCopy(
        temp_path, os.path.join(src_path, filename), copy_to=False)
    dest_vm.RemoteCopy(
        temp_path, os.path.join(dest_path, filename), copy_to=True)

def ReplaceText(vm, current_value, new_value, file_name, regex_char='/'):
  """Replaces text <current_value> with <new_value> in remote <file_name>."""
  vm.RemoteCommand('sed -i -r "s{regex_char}{current_value}{regex_char}'
                   '{new_value}{regex_char}" {file}'.format(
                       regex_char=regex_char,
                       current_value=current_value,
                       new_value=new_value,
                       file=file_name))

def DictionaryToEnvString(dictionary, joiner=' '):
  """Convert a dictionary to a space sperated 'key=value' string.

  Args:
    dictionary: the key-value dictionary to be convert
    joiner: string to separate the entries in the returned value.

  Returns:
    a string representing the dictionary
  """
  return joiner.join(
      f'{key}={value}' for key, value in sorted(dictionary.items()))

def CreateRemoteFile(vm, file_contents, file_path):
  """Creates a file on the remote server."""
  with NamedTemporaryFile(mode='w') as tf:
    tf.write(file_contents)
    tf.close()
    parent_dir = posixpath.dirname(file_path)
    vm.RemoteCommand(f'[ -d {parent_dir} ] || mkdir -p {parent_dir}')
    vm.PushFile(tf.name, file_path)

redpajama_set_name: RedPajamaGithub


Daniel is investigating the state (e.g. arousal/alertness, attentional load) and trait (e.g. genetics, hemispheric white matter asymmetries) factors that influence visuospatial attention asymmetries in healthy people and in people with disorders of attention (e.g. unilateral spatial neglect, ADHD). Daniel is based at Monash University Australia but is supervised by Dr. Redmond O'Connell from the Trinity College Institute of Neuroscience and by Prof. Mark Bellgrove at the School of Psychological Sciences, Monash University. Daniel's research also involves strong collaborative ties with Ger Loughnane from the Trinity Centre for Bioengineering.


This is a great Louis Vuitton Shoulder Bag called the Sac Flanerie GM. It has a top zipper closure which I think is much safer than an open style. It has a nice width so you can carry a book or notebook/tablet computer easily. The straps are nice and long, great for a tall person. The floor is reinforced with leather straps which makes it more sturdy than many of the bags today. This is a vintage bag but is in great shape. The leather trim is a gorgeous honey color with a few minor scrapes and wear but nothing distracting. The piping trim shows scuffs and stains, without compromising the bag. The inside is clean and spacious. There is an inside slip pocket. This is a great shopping bag or bag to take to the office. They are no longer produced and hard to find. It almost looks like a Neverfull, but so much stronger in its construction. Date Code: NO0917, Measurements: W18" x H13" x D6". Love this bag!


text:
Sean Connery — The Manly Bond
Read my overview of the James Bond franchise
There's a temptation (and I'm a huge fan of giving into temptation) of analyzing the James Bond films based on the lead actor. I'm doing that to the extent that I've made a page for each. But in the case of Sean Connery, it's a foolish way to examine the series. When I hear someone say "I like the Connery films best" or "I like them least," it usually means the person hasn't seen most of them for awhile. The Connery films are too different to judge as a group (at least if your comparison is all the other Bond films). Connery may be consistent over the course of seven films, but little else is. These movies include the very simple (Dr. No) and the needlessly complex (Thunderball). There's the nearly realistic (From Russia With Love) and the completely absurd (Thunderball again). There's the epic action pic (Goldfinger) and the near-comedy (Diamonds Are Forever). Plus there's the series' most sci-fi offering (You Only Live Twice).
There are a few consistent items that I wish weren't. The early Bond films are lacking in fight choreography. There are blatantly pulled punches, sped up camera moments, and those ridiculous judo flips that were so popular in '60s cinema. The often used rear-projection shots aren't any better, with driving and skiing segments likely to inspire giggles. These aspects improved over time, but for most of the Connery era, they are a bit sad.
Connery's Bond is a tough man who is never bothered by a conscious. Daltan's could kill a defenseless person if he were angry, but Connery's wouldn't think twice about gunning someone down. Sometimes killing defenseless people makes him happy.
He is also a little bit of a boy. His Bond is the most likely to give into his desires, particularly the silly ones (it is extremely difficult for him not to start a race with a speeding car in Goldfinger). He's educated and enjoys the finer things, but there's also something a little blue collar about him. He and Moore are the two that best satisfies the requirement that all women want Bond and all men want to be him. Yes, he's handsome and capable (all Bonds are), but more importantly, he's having a great time. It would be fun to be him. The biggest difference between Connery's and Moore's portrayal: Connery's Bond won't die of old age. He's a little suicidal, taking unnecessary risks for kicks, and eventually, that's going to bite him in the ass. Of course, he couldn't care less.
On the subject of all women wanting him, Connery's Bond passed mild fantasy and entered the supernatural. All Bonds are charming with an ability to seduce that goes beyond normal, but in the Connery years, that power was instantaneous and would cause women to betray their countries, their basic beliefs, and even their sexual preferences. This magical enchantment was a key plot point in two of the films (From Russia With Love, Goldfinger) and popped up in most of the others.
Bond fit Connery like a glove, even from the earliest days when Connery had little acting experience (ah, they don't make films like Darby O'Gill and the Little People anymore). He became a better actor over the years, and is at his best in Never Say Never Again, which proves that great acting does not make a great movie. (To be more precise, Connery's best acting is in movies that have nothing to do with Bond, but that's not relevant here.)
Music has always been important in the Bond films. Connery's Bond is a Rat Pack kind of guy. He's absolutely comfortable in a Vegas casino with Dean Martin singing in the background. He's of a time, and could never fit into a rock-n-roll setting. He even insults The Beatles in Goldfinger.
The Connery films are:
The first James Bond movie is a joy, and was even more so in 1962 when your average hero didn't fuck whatever woman he ran into (and then turn her over to the police), or shoot a helpless man. The elements that made Bond an icon are here to be seen (and sadly, are toned down in later films).
Gadgets Low.
Absurdity of evil plot Average
Killer fish Fakes
The story is straightforward—what we get of it. A British agent has disappeared in Jamaica and Bond is sent to find out what happened to him. He meets a CIA agent who is trying to find out who is messing with U.S. rocket launches. Since the missing agent had been taking a boat out to a mysterious island with an even more mysterious owner, Dr. No, Bond heads there, assuming that Dr. No is a criminal mastermind who holds power through fear over an army of henchmen. Of course, Bond's right. As for Dr. No's evil plot, well he...you see he's...with his reactor he's going to... OK, it's a bit hard to tell what the Hell Dr. No is doing, but he's out for revenge so maybe it's no deeper than that.
With only one "exotic" location, no gadgets, and some lackluster fights, it sounds like it might be a lesser film, but it isn't. The first half of Dr. No sings, when it is a small mystery movie with a refreshing protagonist. You get James Bond at his purist, a testosterone soaked cold-blooded killer who knows how to enjoy himself.
Things get a little shaky once Bond lands on No's island. That anyone could believe a flame-throwing tank was a dragon pushes even Bond-film credibility (yup, both the overly submissive black man and the ditzy blond believe in dragons), and the climactic battle is lacking in every category (it's too easy, it is short and dull, there are far too many wide shots, and it includes a simple "blow up the lab" knob). But that weak second half also introduces Ursula Andress's Honey Ryder. Andress is dubbed. Her character is dim, she only exists to be saved, her motivation is non-existent, and I don't care about any of it. James Bond is the man every male wants to be, and when Honey rises out of the sea in her white bikini, she is the woman that every man wants to have.
Pride It's Bond. That says it all. He never doubts himself.
Sloth Nada.
Avarice In his first appearance, 007 makes it clear that he likes to live the good life: high stakes gambling in private clubs, nice suits, and only the finest things.
Gluttony Dining is rare, though he drinks his vodka martinis (and sometimes just straight vodka) any chance he can. He smokes as well—more than in later films.
Wraith Of course. His anger gives him an edge several times, such as when his driver turns out to be an enemy agent. And there is plenty of violence and killing. The best death is Bond's execution of a helpless scientist. He had it coming. I also can't forget Honey's little story of how she was raped by her landlord so she arranged for him to die, slowly over a week, via spider venom. Bond suggests she not make a habit of it.
Beauty Nothing but Andress, rising out of the water.
Thought Enough to set the tone, but less than in later Connery, Moore, and Brosnan films.
Humor The tone is light and there are a few good lines, but Bond's penchant for one-liners would develop over the next few films.
Lust James Bond proves himself to be a man of the Playboy generation. He starts off with purely recreational sex with a stranger from the baccarat tables, moves on to fucking an enemy agent before turning her in, and then ends up with Honey. As for a sight to trigger the viewers' lust, there's the stunning Andress. Females will have to settle for a shirtless Connery.
(If you like your spies less flamboyant)
The second James Bond film pulls the fantastic elements and action way back. It pretends to be a realistic spy picture, and you could almost believe it, well, that is until you realize that an international organization of evil, led by a weirdo with a cat-petting fetish, is using a female Russian spy to lure Bond into stealing a machine for them, and the girl is so overwhelmed by Bond's pheromones that she gives up country, family, and philosophy to cling to his side. She is described as absolutely loyal to the state, but a few moments with Bond and she's a traitor.
Absurdity of evil plot Low
Killer fish Nope
Ah, don't mistake me. I like females changing their pubic hair color at a nod from a powerful male presence, and I'm keen on feline bestiality. However, these items aren't part of real-world espionage (well, there may be some cat-sex going on, but never in front of the hired help). From Russia With Love is the story of a superhuman archetype attempting to thwart the outlandish plan of a comic book villain who leads a goofy gang, and it takes itself so seriously. Hey, if you've got something that's silly, embrace it. That's what happened with the next film, the classic Goldfinger.
This is James Bond, so there's the occasional not-so-random act of violence. The body count is small, but that isn't necessarily bad as the most is made of each killing. But with the action toned down, you'll want to look elsewhere for kick-ass effects. It's all OK, but not nearly as exciting as we've come to expect when the name "James Bond" is mentioned.
There's nothing wrong with From Russia With Love, except its serious demeanor, but there isn't much that rises above the average. It is a little film coming after the apparently larger Dr. No (which had a smaller budget) and before the nearly epic Goldfinger. But it is good for a laugh. After the "real life" scenes, I can't help but chortle at the conversation:
Bond: Is that what you chaps in SMERSH call each other.
Villain: SMERSH?
Bond: Of course, SPECTRE.
I'm sure those are lines heard by real spies every day.
Pride James likes being James.
Sloth Bond actually starts the movie laying down, relaxing. He's got a girl in his arms, but still, he's relaxing. That's a rarity. Anti-Bond SPECTRE agent Grant also spends some time laying down getting a massage.
Avarice The suits are nice, as is the hotel, but this isn't an Avarice film.
Gluttony A little wine. Some world cuisine. And smoking.
Wrath Plenty of family friendly killings and James indulges in domestic violence. Then their is the girl gypsy fight, which combines Wrath and Lust for one of the best moments of the film.
Beauty The scenery isn't bad, but is nothing special.
Thought Bond shows less signs of intelligence than normal.
Humor A few one-liners, but this one is played pretty straight.
Lust James is a fine advocate for the sin, apparently bedding Sylvia, the two gypsy girls, and Tatiana. Both James and Tatiana are doing it for country, so not only sex, but whoring. I couldn't be happier. However, we get to see little of all that flesh. There is some warped, through a glass nudity of Tatiana as she is sneaking into Bond's bed, but blink and you'll miss it. Otherwise, the Bond girl in a nightie, bit of belly dancing, and a cat fight between gypsy girls is as good as the visuals get.
(Now, if you haven't already)
From the first strands of the now famous theme (Goldfinger! He's the man, the man with the Midas touch—A spider's touch.), it's clear that Goldfinger is going to be a remarkable film. It is the defining James Bond picture. If you don't like it, you don't like the series (you may have some fondness for an individual movie, but you're no Bond fan). At most, three of the later films weren't based on it (and those all with short-term Bond actors), and it isn't a wild exaggeration to say they all were. The details were still being worked out in Dr. No and From Russia With Love went off in a different direction, but here the formula is laid out.
Gadgets Average
After an irrelevant but exciting pre-credits sequence, and the theme played over intriguing female images, James Bond is sent to investigate a mad man. This time it's Auric Goldfinger, who obsesses over gold and has a plan that will cause havoc in the world. The villain is surrounded by an army of easily killable henchman and one super sidekick who uses his hat as a weapon. Bond goes through a number of sexy girls and gadgets before discovering what it's all about and finding a hot babe who will live to the end credits.
Except for some shoddy special effects (watch the planes over Fort Knox) and fights containing changes in film speed, there's nothing to complain about in Goldfinger and so much to commend. Every other scene has become a part of Western culture: the gold painted nude corpse; the ejector seat in a sports car; the laser aimed at Bond's genitals ("Do you expect me to talk?" "No, Mr. Bond, I expect you to die!" ). The Villain is the series' best, with multiple later copies never living up to the original, and the mute Korean bodyguard is a marvelously inventive creation.
Goldfinger is most amusing when demonstrating Bond's overwhelming sexual dominance on all who come near him. He's so good, so manly, that he can convert a lesbian, and in doing so, change her allegiance. Pussy Galore (what a wonderful name, and surprisingly, taken from a real person, though she was a madam) is the mistress of team of Sapphic blonde pilots. She's a butch top who dresses the part (well, at least in the eyes of prudish, straight society) and is "immune" to the charms of men. That is until Bond flips her into the hey. One good fuck and she's a new woman. I don't normally support cinematic orientation conversions being a huge fan of lesbian sex, but I'll let it slide in this case. Besides, there needs to be one representation of this prevalent male fantasy outside of porn.
Goldfinger is Bond.
Pride As always, James is a proud man, and it's good to be him.
Avarice It's clear that Bond knows a few things about the good life.
Gluttony Champagne, fine brandy. The man knows how to live.
Wrath Plenty. Bond uses a girl to block a club, and that's in the first three minutes. This is one of the few times Connery's Bond displayed anger for more than a moment, but it passes and has little effect.
Beauty The cinematography is nice, but for a Bond film, this sin is low key.
Thought Bond is both intelligent and well informed.
Humor A light tone and plenty of one-liners.
Lust Again, Bond is a man fully at home with lust. He uses his skills first on Jill Masterson, who falls into his bed with great speed. It doesn't work out well for her; she does look quite sexy naked and gold, though her being a corpse brings it down a touch. He gets Pussy as well. We don't see nearly as much skin with her, which is disappointing since Honor Blackman is lovely.
Skip It
(Choose a different Bond film)
In these sexually timid times, any film that starts with the hero blackmailing a girl into having sex with him makes me smile. And that grin widens in this case, where she isn't even at fault for the event he is holding over her head (a fact he knows, but she doesn't).
Gadgets High
Absurdity of evil plot High
Killer fish Yup
Ah, but Thunderball isn't all coerced sex. It is the silliest James Bond film. Some claim that honor goes to the space-based Moonraker, but it acknowledges its unlikely premise. Thunderball takes its story seriously, which makes it all the more absurd. And what is that plot? SPECTRE, the secret organization of evil, steals nuclear bombs in order to extort money from NATO. James, who happens by accident upon a vital clue, heads out to defeat the bad guys. SPECTRE is once again led by the seldom-seen Number One (Blofeld), who spends his time speaking in ominous tones and petting his cat. The plot and characters are the basis for the parody Austin Powers: International Man of Mystery, but it's a parody already. It even has a pool of sharks to devour red shirts.
Thunderball is bigger and more opulent than its predecessors. With a budget the equal to that of all three earlier Bond films combined, it offers more gadgets, more effects, more drawn out combat scenes (how many times can you have anonymous figures fight underwater?), and more screen (using the Panivision widescreen process). It's money without content. I don't expect a lot of plot in a Bond film, but something aught to compel one scene to follow another. It's pretty much random here. And slow. At 130 minutes, it's easily a half hour too long. Claudine Auger and Luciana Paluzzi are attractive as the good and bad Bond girls, respectively, but are forgettable.
The nonsense is piled high. An enemy spy attends his faked funeral in drag? A jet pack? Bond is almost killed by the high setting of an exercise machine? The villains coincidently carry out their evil deeds at a health club that Bond is attending—for his health? There are many more examples. However, it's unfair to attack a Bond film for ridiculous story points, provided there's plenty of excitement. Thunderball lacks that excitement. It is so dull that you are given time to think about how much sense it all makes, which is a real problem. We should be distracted by the sheer spectacle.
At least we have the Tom Jones song, where he croons, "And he strikes, like thunderball." Huh. How exactly does one "strike like thunderball?"
Pride Same as always; the confident man wins.
Sloth Finally, Bond gets to lay down. He gets a nice massage, though there is more Lust than Sloth to it. While that's as close to promoting this sin as Bond gets, Thunderball does do it's best to get you to sin with its long, slowing, boring underwater scenes. It's a sleeping pill in film form.
Avarice Bond hangs with a moneyed crowd, but as they're all bad, there's not much of a lesson.
Gluttony Somehow it didn't have the same oomph as normal.
Wrath Plenty of family friendly violence. No more than a few seconds of off-screen torture. Bond has been toned down from the previous films—less brutal.
Beauty Nice island settings, diminished by some sad rear-projection work.
Thought Nada. The movie's too dumb for Bond's intellect to matter.
Humor The expected one-liners.
Lust Bond gets some. Quite a bit of girls in swimwear, and Sean goes shirtless.
(If you're already a Bond fan)
Bond: Why do Chinese girls taste different from all other girls?
Ling: You think we better, huh?
Bond: No, just different. Like Peking Duck is different from Russian Caviar. But I love them both.
Ling: Darling, I give you very best duck.
We all like a good duck, but don't let that get in the way of the important question: Why do Chinese girls taste different? Well, maybe not so important, but it does make me want to do taste tests.
The Roger Moore years are often stereotyped as tons-o-gadgets/sci-fi plots, but the Thunderball-You Only Live Twice combo is the high point of over-the-top Bondian fantasy. That isn't a bad thing (OK, it was a bad thing with Thunderball); just an indication of the type of movie you're in for.
An unknown spaceship is gobbling up first American and then Russian space capsules...in space. Both sides blame the other. James, after faking his own death, is sent to Japan to find those really behind the crimes. Constantly running into people who want him dead, he teams up with Japanese agents, particularly two hot babes, to find the secret base of—who else—SPECTRE.
The story is even further removed from reality than Thunderball's, though with far fewer unlikely coincidences. Not a second is to be taken seriously. This is big, broad, spectacular adventure without a brain cell in sight. Luckily, it succeeds in keeping things exciting (most of the time), so the silliness is something to dwell on after the movie is over.
No one is going to put You Only Live Twice on the top of their "Best James Bond films" list. Even where it works best it has its flaws. The story slows too much in the middle, with James at ninja school and going through a fake wedding. Was the marriage really necessary? It has no effect on the plot. Then there's Bond's racial transformation—one of the most embarrassing events in the entire series. He might be able to pass as a Vulcan on Star Trek, but never as anyone with a drop of Asian blood.
Both of the Bond Girls were veterans of Toho's Godzilla films. While Akiko Wakabayashi (the primary babe) isn't bad, I prefer her as an alien-possessed princess in Ghidrah, the Three-Headed Monster. The two were hired when Japan made it a requirement to film there that Japanese actresses get the lead parts. The problem was that the producers chose the girls based on previous movie roles without bothering to find out it they spoke English (that's a big failure of the sin of Thought). Wakabayashi picked up the language well enough, but Mie Hama couldn't pull it off, so the two switched parts. The story is that Hama was going to be fired, but she threatened to kill herself due to the shame. No one could tell if she was bluffing, so they gave her the less-vocal role. Is the story true? Not surprisingly it remains unconfirmed, but it is a good story.
You Only Live Twice will be enjoyed the most by males who need a fantasy of not only being a super-spy, but of a whole country of submissive women who understand that, as the head of the Japanese spies states, "men cum first, women second." Fantasy is a wonderful thing.
Pride Bond loves being Bond.
Sloth Never do anything for yourself that someone can do for you. Massage is a theme.
Avarice It's costly to have a Japanese bathhouse in your home, complete with Japanese girls.
Gluttony It's important to know the proper way to serve and enjoy sake. Bond smokes a lot, and is called on it being bad for his health.
Wrath We've got some lovely moments here. There's all the regular shootings and stabbings and death by explosions. The evil bitch being eaten by piranha is particularly satisfying.
Beauty The volcanic island is sensational, and it's filmed well. The best looking of the Connery Bond films.
Thought We're reminded that Bond was an impressive student. He took a 1st in Oriental languages at Cambridge.
Humor A few gags and lots of one-liners. This is high tide for Bond sex jokes.
Lust Naturally Bond gets to sleep with his co-stars, but primarily off screen. More amusing is his group bath. I love being bathed by cute Oriental girls (even if some look remarkably Occidental).
I like, in theory, that the evil assistant is so overwhelmed by Bond's masculinity that she just has to have a taste, but it comes off as more silly than lustful.
(For the gags, not the espionage)
Connery is back as James Bond after a one-film absence. He's a bit long-in-the-tooth, but he's got a lot more life than the somnambulant George Lazenby, so why complain about a few lines under the eyes? After the melodramatic On Her Majesty's Secret Service, Diamonds are Forever is a welcome return to fun. It's the lightest of the pre-Moore films, and is in the running for most comedy-laden Bond outing. It's sci-fi silliness with gratuitous bathing beauty shots and impossible car stunts. I couldn't be happier.
Gadgets Low
Killer fish Nope?
On Her Majesty's Secret Service was a disaster in every way, but the way that mattered to the producers was financial. They needed to win back the fans lost in the Lazenby experiment and not surprisingly, they decided the way to do that was to bring back everything old. Not just Connery, but Blofeld, a SPECTRE blackmail scheme, a secret lair with tons of armed guards, Goldfinger director Guy Hamilton, Shirley Bassey singing a theme that sounds like a first cousin to Goldfinger, and so on. If there was something in the past they could echo, be assured it was going to be echoed. But did you really expect something original?
After killing long time enemy Ernst Blofeld in the pre-title sequence, Bond is assigned to a diamond smuggling case that leads him to Vegas and a couple of Bond babes. It also leads him to a pair of homosexual assassins, a kidnapped billionaire, a space-based laser, world blackmail, and an old friend. It is all terribly unlikely, which doesn't' matter a bit.
The babes are all shoehorned into the story, which is just fine. The very lovely Plenty O'Toole (a fine Bond girl name) just shows up when the movie needs cleavage. Played by a dubbed Lana Wood, she looks spectacular, and exposes more skin then normal when her pink panties turned out to be transparent. Tiffany Case exists mainly to model her swimwear. There's also a tag team of female wrestlers, Bambi and Thumper, who try an pin Bond because... Well... Why not? Both the main Bond girls are whores, which is over-doing it even for Bond. Plenty switches from guy to guy to find the one with money and then immediately heads with him to the bedroom in exchange for some of that cash. Tiffany makes it clear she's there for the diamonds and her body is part of the deal. That sounds reasonable to me, or would if the girls were treated better. There's some uncomfortable social commentary intertwined with Plenty's far too brief story, and with a film this light, I wish they'd found a better direction for her.
Diamonds are Forever's finest moments don't come courtesy of the breasty fems or the returning Connery, but from the perpetually happy and high team of Mr. Kidd and Mr. Wint. Earning a top spot on the Bond Henchman List, they are always funny yet have that note of danger that only psychosis can supply.
Wint and Kidd, along with the unusually clever dialog, may distract you from the lack of tension. The movie has an air of the inconsequential about it. This is James Bond as fluff, which is saying something since Bond is never Hamlet'). The plot doesn't hold together (why are all the diamond smugglers being murdered?) and changes in midstream; hardly the way to make the viewer care about what comes next. The action scenes aren't much to talk about either. Never mind. Diamonds are Forever is a nice little comedy. Enjoy it for what it is.
Pride Hey, it's Bond and Connery's version is incapable of self doubt. He loves himself and all he does.
Avarice James enjoys the good life, but as it turns out, diamonds aren't really forever.
Gluttony Drinking, eating, and smoking. What happens in Vegas, stays in Vegas.
Beauty A little low this time. Connery's exceptionally high salary (Avarice in action) ate into the production budget, leaving little for effects, travel, or lavish sets. The flesh is fine.
Wrath Bond is out for vengeance in the pre-credits sequence, but this is Connery's Bond, who's never angry for more than a second and it doesn't affect him anyway.
The normal body count, plus Bond is none to gentle with the girls, strangling one (not to death) and nearly drowning two others. Yeah, it made me smile.
Thought James is still a smart cookie, and you'd like to be that smart.
Humor Yup. Bond is funny, Tiffany is funnier, and Mr. Kidd and Mr. Wint are classic.
Lust We're in good shape. Lots of shapely dames, and Bond gets a bite or two. This is also one of the few Bond films with any nudity. It's only a flashed nipple, but it is the longest displayed in the entire 24 film series. And that nipple appears while Bond is strangling its owner with her own bikini top, so a bit of Wrath thrown in. To a lesser degree there is also Ms Wood's bum which is clearly visible through the thin cloth of her panties.
(But don't go out of your way)
What's with the music? I don't use anything that bad to torture damned souls. The filmmakers didn't have the rights to the famous Bond theme, but is this really the best they could come up with?
Legal wrangling over the Thunderball story, the concept of SPECTRE, and the character of Blofeld gave Kevin McClory the rights to make his own Bond film, a fact that didn't thrill Albert R. Broccoli, the producer of the "official" Eon movies. The trick was that it had to be essentially Thunderball again, hardly the finest plot to work with, but at least there was no worry of this film suffering by comparison to the original. McClory's coup was luring back an aging Sean Connery to the role he said he'd never do again. This resulted in a Bond vs. Bond competition with the official Roger Moore Octopussy released in the same year. Moore won, but no one cares now, nor should they have then.
For those of you who find scrolling up to read the synopses of Thunderball too taxing, I'll repeat the basics. SPECTRE, led by cat-petting Ernest Stavro Blofeld, swipes two nuclear bombs and uses them to extort money from the West. Bond happens upon a key member of the plot while at a spa, which leads him to bad guy Largo and his hot girlfriend, Domino
Never Say Never Again is a middling, semi-franchise entry. Connery is too old to portray the sexy super-spy, but he's also a far better actor in his '50s than he was in his '30s. The action is none-too-exciting, with a tame motorcycle chase and a non-suspenseful shark duel leading up to a so-so group shoot-out that has been done better in eight or nine other Bond films.
While the fight scenes are nothing special, Never Say Never Again does excel in silliness. Fatima Blush is straight out of a comic-book. Sure, past Bond villainesses have put off killing James in order to sleep with him, but she's the first one to postpone his murder so that he could write a glowing report on her sexual prowess. Think of her as Cruella De Vil. Other characters exist purely for comedy. M is a dweebish joke-boss who's concerned about too many free radicals in the body. Rowan Atkinson (The Black Adder, Mister Bean) even shows up as a slapstick civil servant. There are loads of enema jokes and the like, with Bond defeating an opponent by throwing a beaker of urine at him. The gadget factor is turned way up. There's a pen that shoots an incendiary bullet that leaves nothing but a shoe, a laser watch, and portable rocket stands. All this isn't bad. The movie just knows what it is. It never takes itself seriously, and is always winking at the audience (literally in the last scene when Connery breaks the forth wall).
Following the fads: Video games.
Pride Bond's pretty sure of himself, and wouldn't you like to be like Bond?
Avarice Bond mingles with the upper classes, but it doesn't mean much.
Gluttony Bond points out that gourmet foods beat "healthy" ones any day, and gets laid for his effort.
Beauty Nada besides Bassinger's bod.
Wrath It's James Bond, so the body count is high. The oddest murder is committed by tossing a snake into a moving car. Not the best method in the world.
Thought At least the dumb characters are made fun of.
Humor Everything is light and done with a sense of humor. You won't laugh, but there are plenty of "smile" moments.
Lust Bond manages his normal G-rated sexual conquests: hot spa employee, barely introduced spy, evil chick. There's also a brief Connery/Bassinger shower and Basinger rides horseback in her underwear.
My Other Bond Reviews
The Lazenby Film
The Moore Films
The Dalton Films
The Brosnan Films
The Craig Films
Ursula Andress: Honey Ryder
Eunice Gayson: Sylvia Trench
Daniela Bianchi:Tatiana Romanova
Honor Blackman: Pussy Galore
Shirley Eaton: Jill Masterson
Tania Mallet: Tilly Masterson
Claudine Auger: Domino
Luciana Paluzzi- Fiona Volpe
Akiko Wakabayashi: Aki
Mie Hama: Kissy Suzuki
Karin Dor: Helga Brandt
Jill St. John: Tiffany Case
Lana Wood: Plenty O'Toole
Kim Basinger: Domino Petacchi
Barbara Carrera: Fatima Blush
A differnt View of a Bond Girl
Bond Villains
Dr. Julius No (Joseph Wiseman)
Ernst Blofeld (Anthony Dawson)
Rosa Klebb (Lotte Lenya)
Auric Goldfinger (Gert Fröbe)
Emilio Largo (Adolfo Celi)
Ernst Blofeld (Donald Pleasence)
Ernst Blofeld (Charles Gray)
Ernst Blofeld (as Max Von Sydow)
Maximilian Largo (Klaus Brandauer)
A Different View of a Bond Girl
Honor Blackman (Pussy Galore) in a far better outfit than she wears in Goldfinger
Mie Hama
Two Views of a Bond Girl
Lana Wood as Plenty O'Toole,
and then just as plenty.
Kim Bassinger
Click here to buy posters!

redpajama_set_name: RedPajamaCommonCrawl


OpenAire retractable roofs offer community pools attractive designs, year-round reliability and significant savings on operating costs.
For many years, building a customized community pool with a variety of features was only possible for large developers and owners, leaving smaller municipalities and parks to create only simpler facilities.
Fortunately, it is now feasible and cost-effective for local communities to build and design their own indoor swimming pools that offer the same inviting atmosphere and community recreation as larger venues. One major design feature has transformed dozens of municipal aquatic centers: an aluminum framed retractable roof enclosure from OpenAire.
OpenAire enclosures offer pools, waterparks and other aquatic centers of all sizes the best of both worlds: the shelter and year-round reliability of an indoor facility, combined with the sunlight and fresh air of an outdoor park, as well as significant savings on operating costs compared to traditional structures. This is why many community pools and waterparks have discovered that with OpenAire, a little sky makes a world of difference.
OpenAire has helped many local aquatic centers like these create unique, inviting and versatile facilities that go above and beyond the typical public pool. These community destinations can operate at reduced cost and attract patrons from many demographics throughout the year.
Popular Arkansas community pools have experienced increased visitors, energy cost savings, and returns on investments (ROI) after opening customized OpenAire enclosures for their attractions.
These venues include: Pocahontas Aquatic Center in Randolph County (population 17,469), an indoor/outdoor facility that includes pools and a waterpark; Clarksville Aquatic Center in Clarksville, AR (pop. 9,524), whose indoor pool is now able to offer competitive swim and SCUBA training in natural light without glare, while the family splash area offers a zero-depth entry for children and people of all abilities; Bryant Aquatic Center in Bryant, AR (pop. 20,000), whose heated therapy pool and competitive lap pool have encouraged better fitness and healthy living in the town; Batesville Community Center and Aquatic Center in Batesville, AR (pop. 10,740), which offers the community both outdoor facilities and indoor water facilities located in an expansive 95 by 224-foot (28.95 by 68.27 meter) enclosure designed and installed by OpenAire; Heber Springs Community Center in Damascus, AR (pop. 379), which, despite its small size, has created a successful community pool that is a feature for visitors to the town; and the Paragould Aquatic Center in Paragould, AR.
Equally popular community pools in California have benefitted from OpenAire's solutions, such as: Allan Witt Aquatics Complex in Fairfield, CA (pop. 114,756), whose OpenAire enclosure not only allowed the previously disused structure to reopen, but has let the city create a greatly expanded aquatic program with everything from competitive swimming to a children's splash pool; Central Park Aquatic Center (Mike Shellito Indoor Pool) in Roseville, CA (pop. 132,671), offering a variety of water fitness programs, swimming lessons, and lap swimming with an 8 lane, 25-yard-long pool; Lompoc Aquatic Center in Lompoc, CA (pop. 43,712), whose attractions include water slides, a lap pool, competitive pool, therapy pool and an AquaPlay structure; Mill Valley Aquatic Center in Mill Valley, CA; Richmond Swim in Richmond, CA, whose retractable roof was a vital part of restoring the aging indoor aquatic center after corrosion and pool chemicals caused the building to be closed; in Walnut Creek, CA, a vibrant fitness center with a lap pool, exercise pool and spa located in the heart of an inviting senior living community; and Salinas Aquatic Center in Salinas, CA, whose double-slope enclosure is not only cost-effective but also LEED Gold Certified.
OpenAire retractable roofs and enclosures have also been thriving in these communities: AquaVale in Aylesbury, UK; Bahia Bocholt in Bocholt, Germany; Blattner Recreation Centre in Burgrienden, Germany; Blenheim Recreation Centre in Ontario, Canada; Brahn Spring Park in Huntsville, AL; Donetsk Aquapark in Donetsk, Ukraine; Epic Waters in Grand Prairie, TX (pop. 190,682), whose 62,000-square-foot indoor waterpark section will be a key feature of Grand Prairie's Epic Grand Central, which will also include more than 172 acres of trails, fitness centers, a fully accessible children's playground, and much more; Madison Recreation Facility in Madison, AL; Peterson Air Force Base in Colorado Springs, CO; Roger Carter Ellicott City, MD; and Rosemary Beach in Panama City, FL.
With such a variety of communities opening their own unique and highly successful pool facilities with OpenAire retractable enclosures, almost any community can find new opportunities with a year-round retractable pool enclosure design.
Paragould, AR (with a population of 27,465 and covering 81.2km2) is a terrific example of how OpenAire's retractable roofs can bring great success to a small town's community pool. The aquatic center was conceived as a redevelopment of the town's aging community center.
OpenAire's retractable enclosure design was key to making the project possible. The town could not afford the cost of air conditioning, ventilating and maintaining a typical indoor aquatic facility.
OpenAire's retractable roof technology offers natural cooling, ventilation and lighting through much of the year, reducing expenses significantly and allowing Paragould to operate within budget. Independent studies have found that OpenAire's waterpark and pool clients save up to 27% on energy and lighting costs compared to conventional structures.
Effective financial planning was also essential in making Paragould's development possible; an ongoing one-cent sales tax in the town played a major role in raising funds and avoiding excessive debt during development, and has since allowed Paragould to keep the center well-maintained and up-to-date.
This innovative style of aquatic facility is not unique to Paragould; in fact, it represents a wider trend. According to a study in Recreation Management magazine by Deborah L. Vence, modern aquatic centers have "increased in popularity and use," offering guests "innovative, first-to-market attractions" and multi-purpose facilities that can serve a variety of demographics.
The center frequently exceeds revenue projections and has been highly beneficial to people of all walks of life; the local high school has been able to add swimming to its athletic program, while families and individuals of every income can enjoy the facilities thanks to Paragould's very low admissions.
Paragould has also partnered with Arkansas Methodist Hospital to use the center's therapy pool for hospital patients as part of their recovery program, including a young cancer patient whose exercises in the pool eventually helped him walk on dry land without crutches. OpenAire is deeply honored to play a part in these success stories.
These are only some of the advantages that community pools find when they choose OpenAire enclosures. OpenAire is always ready to bring this customized design solution to community aquatic parks in areas such as yours.


New York Fashion Week kicked off early on Wednesday, thanks in part to Anna Sui and INC International Concepts who celebrated the launch of their new collection with a party at The Heath at the McKittrick Hotel. Karen Elson is the face of the campaign and was on hand to deliver a performance from her album Double Roses. A number of chic invitees, including Maggie Gyllenhaal, Coco Rocha, Nina Agdal, Giovanna Battaglia Engelbert, Genevieve Jones, Natalie Joos, and Ian Mellencamp, took in the scene while toasting the capsule which draws inspiration from Western romances and prairie accents with plenty of fringe, embroidery, and lace. While the line is available at select Macy's stores and online, guests were given a front row experience of sorts by browsing the limited-edition clothing and accessories alongside Sui herself. Because when you're in the door, you might as well shop.


So here I am 8 days and 4 books later, just finished packing for our first foray to C2 and feeling up to a long overdue "chat".
So far the weather has been much colder. No running around in T-shirts yet. That said I'm typing this in a T-shirt but inside my sauna of a tent but so much as stick your nose out the door and you're scrambling for the fleece.
Altitude Junkies' (Phil Crampton) set up is awesome.
The food is awesome. Greens and lots of them. On the pizza, in the salad, on the sandwiches, with the delicious meat dishes. No two meals the same yet. Fresh baked bread and pies. Fruit, fruit and more fruit!! Malia, Chaturman, Lal Singh and Jangbu, what a team.
The mess/comms tent is soooo comfy!
A sink with hot water and soap to wash our hands in.
Hot towels before dinner (just like Business class).
Even flowers on the table. Well alright they may be plastic but they are yellow!
We ladies (Margaret and I) have a sit down flushing toilet.
Still use the Pee Tent (or bottle!) for the less bothersome business.
There's a hot shower but as previously mentioned way to cold to even contemplate such things. Maybe after we come back from C2. We all smell the same so it's no biggy.
The Birds! Last year there were just what I called the "Garbos". Crow like birds that came in and cleaned up the crumbs along with a few "Sparrows".
This year Himalayan pheasants (very auspicious) and the prettiest grey birds about the size of a rosella parrot (a bit finer) with bright red highlights on their head and wings.
The cooks still lay the vegie scraps out on the blue tarp for the Garbos.
The rest of the team has made their first foray into the icefall but I was confined to quarters. They were trying out new equipment boots crampons etc (mine's all old so no checks required).
So no sitting miserable in the tent trying to boil water only to have it blow over.
We'll head to C2 the next day in the morning or afternoon depending on the weather.
C2 is cold (surprise, surprise) so most of our time in spent in our tents, with 3 downsuit clad dashes to the mess tent each day to sample Kami Neru's delights.
Then well be ready for the summit run. Fingers crossed 8th May. But there's a lot to happen between then and now. And there's a Great Mother Goddess who gets a large say!
PS Everyone tonight go outside and have a look at the ¾ moon. I'll step out of the mess tent at 7pm. It will be almost dark here but still light over the tops of the peaks and the moon is hanging over Everest.
I think Phil has posted a photo on the Altitude Junkies website. Magnificent.


People and Places | PHOTOS KATHERINE PRIZE: Dr Wendy Garden and Suzanne Fermanis with Pennyrose Wiggens winning art piece "Road trip".
Di Watkins and Jenny Kennedy.
Maxine, Bernadette and Victoria McCormick standing in from of one of their mothers paintings.
Harvery Karpany and one of his untitled paintings.
Jayne Nankivell and Ian White.
Jayne Newman, Teresa Cummings, Annalisa Bowden, Kym Davis and Kelly Berg.
Oil painting on found bonnet, "Road trip" by Pennyrose Wiggins – winner of the Brian and Jeanette Lambert Art Award.
Winner of the craft prize "Ngukurr crocodile" by Alan Joshua.
Primary school prize winner "Stormy day" by Rhiannon Brown.
CHARITY GOLF DAY: Sunday Punters, Emma and Rob Perkins, Kevin Riley and Graham Mackenzie.
Great Northern Tradies, Lindsay Turner, Chris Horton, Aggro Blair and Ducks Ross.


text:
KPS facility improving with new construction
By Editor | January 13, 2021 | 0
By Everett Brazil, III
KILDARE — Kildare Public School (KPS) is looking to the future to continue educating area students, and with a $2 million bond, they are now upgrading the facility to improve the school with much-needed changes, which should increase educational opportunities at the school for many years to come.
On a cold winter afternoon, Superintendent-Principal Bruce Shelley offered a short tour of the construction, and is positive about the future of the school following the project.
"I'm excited to get it all completed, and our hope is to have it all finished by the time school starts next year," he said.
Although the bond was worth $2 million, additional funds will be provided by KPS an estimated total cost of $2.4 million.
"The extra funds are out of the school building fund, and we're going to do some things to enhance the project," Shelley said.
The project is under construction by Hembree & Hodges Const., Ponca City. Construction initially began in August 2020, near the start of the current school year, primarily concerning preliminary work.
"They've started work, and have done a lot of ground preparation, cement work and planning," Shelley said.
Heavier work was recently started around Christmas Break, as equipment and materials have been brought on to the property situated on the north side of the school.
The project addresses many upgrades to the school, with many focusing on the school's gym, which is used for both physical education and basketball games, as well as school assemblies.
"The main things are expanding our gym, to have more capacity for more people to attend events," Shelley said.
As part of that expansion, the north side will be extended outward for more bleachers, thus increasing space for parents and fans. There will also be a new gym floor and roof, as well as new changing rooms for teams and ADA-compliant restrooms.
The school cafeteria is also receiving a new roof.
While the gym is expanding to the north, there is additional construction on the same lot, with a new school bus barn to house the buses. In between the gym and bus barn will be a new water tank that will be used for a new fire suppression sprinkler system for the gym.
There are plenty of other improvements slated for the project. A secondary classroom building is situated adjacent to the main facility, and current work is the construction of a covered sidewalk to protect students in inclement weather. The main entrance will also be secured.
"It has a camera and voice box at the front entrance," Shelley said.
Several rooms are also being expanded to make room for a growing student body, he said.
The projects are slated to be finished this summer, in time for the new school year, and administrators are excited about the prospect for a better facility going forward.
Children's Christmas Shop viewed as success
Newkirk Main Street Christmas
Kildare School Construction
Kildare School increasing public safety with new COVID-19 protocols
The American Legion Auxiliary nationally is now 100 years old and so is the Newkirk unit.


The U.S. economy is experiencing one of the longest expansions on record, but the scars left by the Great Recession, as well as challenges posed by globalization and automation shocks, remain visible across the country.
Read how the United States and the OECD work together to implement better policies for better lives.
There has been ongoing progress in narrowing the overall gender wage gap in the United States (17.5%) but it remains higher than the average across OECD countries (15.3%) and large variations prevail across U.S. states. This brochure presents data and recommendations on how to improve women's economic opportunities in the United states.


Worldview, written by Stephen Jones, SMAT team leader, is a ready-to-go resource for your youth group. This 4-part series offers youth leaders a practical and accessible way to engage with their students on the things that drive their worldview. Using the Wesleyan Quadrilateral as the framework, this material provides a foundation where you can discuss core aspects of the Christian faith and how those aspects provide stability to their faith. The four aspects are Faith in Christ, Scripture Engagement, Corporate Worship, and Experiences with God.
The Church is facing a significant crisis today. More and more of our students are leaving the church when they enter college and their young adult years. While the reasons for this are nuanced and varied, a significant component is their inability to answer life's difficult questions with their faith. Worldview gives a structure to leaders that will begin the process of equipping students with a reasoned faith that is prepared to handle challenges and is built on firm ground.
These four ready-to-go lessons give a structured process for each week and include illustrations, activities, and discussion.
Download below to use with your students today.