The above statement was issued earlier this week in response to the removal of artist Alisha Wormsley's text in East Liberty. Its removal and the subsequent outcry from the community are yet another in a series of never ending heartbreaks in the story of East Liberty, the neighborhood that we love and yet breaks our heart on a nearly daily basis. You can read more details of it here in the Post-Gazette, or in the CityPaper, or here via WESA. Tony Norman wrote about it in his column in the Post-Gazette as well.
The landlord has since released a statement saying that, given the community support of the artwork, they are willing to have the artwork reinstalled. But frankly, the offer of reinstatement is completely beside the point.
The artwork's removal, the manner in which it was done, and the outcry are symptoms of the big, deep, and painful issues at play in the community and the inability of the powers that be to accept responsibility for and engage in the dialogue that challenges them and makes them uncomfortable.
East Liberty has undergone tremendous change in the past ten years. Even if one views some of these changes as positives, it cannot be denied that the speed and the scope of this transformation has shaken the community to its core. Displacement is happening on many levels - physical, cultural, and economic. And with this displacement comes the threat, both real and perceived, of erasure of members of our community most impacted by the development and displacement - people of color, seniors on fixed incomes, persons with disabilities, low-income working families, and all the ways these groups intersect.
When community members raise concerns about the role of institutionalized racism and white supremacy in the transformation of the community, they, we, are told "no, no, everyone is welcome in the new East Liberty..." What goes unsaid is the subtext of "...if you can afford it and if you are willing to behave as expected..."
Up until now, no one has been leading the way in facilitating the difficult and challenging conversations that need to happen for this neighborhood, for this city, to move forward in a truly inclusive way that benefits ALL of Pittsburgh. None of the powers that be - those with the powers imbued by money, access, privilege, and yes, race - are willing to put themselves out there to create forums for these conversations that will make them uncomfortable about their roles in the trauma inflicted by these changes. Instead, the burden is continuously placed on the shoulders of those with the least power and access to resources.
The removal of this artist's statement from the public sphere and the subsequent outcry from the community is a call from all of us to have these conversations, no matter how uncomfortable they may make each of us about our roles and our position and our responsibility in this. We ask, no we demand, that time, energy, and resources be contributed, from those with such in hand, to the community so that this conversation can be had.
The Kelly Strayhorn Theater is hosting an open conversation about art, public space, and how we talk about art as a community on Wednesday, April 18, 2018 at 4:00 pm. This conversation will be an opportunity for East Liberty to examine the different aesthetic and cultural values in our uniquely diverse neighborhood. We encourage you to attend this event, but this meeting should not and cannot be the only opportunity for this critical conversation. This is a dialogue that must continue. And the resources to have these conversations must be freely given to allow the people to truly lead.
Diverse rental auto affiliations may claim to be the best relationship by significance of their unassuming rates and dumbfounding refunds yet they slump pitiably on giving quality rental auto affiliations. Rent a Car Islamabad Thusly it is basic while analyzing for the broad rental auto associations one needs to look past the attracting lines of refunds and unassuming auto rental rates.
May Day Celebration at Enright Park!


text:
from __future__ import unicode_literals
# Ensure 'assert_raises' context manager support for Python 2.6
from botocore.exceptions import ClientError

import tests.backport_assert_raises
from nose.tools import assert_raises

import base64
import datetime
import ipaddress

import six
import boto
import boto3
from boto.ec2.instance import Reservation, InstanceAttribute
from boto.exception import EC2ResponseError, EC2ResponseError
from freezegun import freeze_time
import sure  # noqa

from moto import mock_ec2_deprecated, mock_ec2
from tests.helpers import requires_boto_gte

################ Test Readme ###############
def add_servers(ami_id, count):
    conn = boto.connect_ec2()
    for index in range(count):
        conn.run_instances(ami_id)

@mock_ec2_deprecated
def test_add_servers():
    add_servers('ami-1234abcd', 2)

    conn = boto.connect_ec2()
    reservations = conn.get_all_instances()
    assert len(reservations) == 2
    instance1 = reservations[0].instances[0]
    assert instance1.image_id == 'ami-1234abcd'

############################################

@freeze_time("2014-01-01 05:00:00")
@mock_ec2_deprecated
def test_instance_launch_and_terminate():
    conn = boto.ec2.connect_to_region("us-east-1")

    with assert_raises(EC2ResponseError) as ex:
        reservation = conn.run_instances('ami-1234abcd', dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the RunInstance operation: Request would have succeeded, but DryRun flag is set')

    reservation = conn.run_instances('ami-1234abcd')
    reservation.should.be.a(Reservation)
    reservation.instances.should.have.length_of(1)
    instance = reservation.instances[0]
    instance.state.should.equal('pending')

    reservations = conn.get_all_instances()
    reservations.should.have.length_of(1)
    reservations[0].id.should.equal(reservation.id)
    instances = reservations[0].instances
    instances.should.have.length_of(1)
    instance = instances[0]
    instance.id.should.equal(instance.id)
    instance.state.should.equal('running')
    instance.launch_time.should.equal("2014-01-01T05:00:00.000Z")
    instance.vpc_id.should.equal(None)
    instance.placement.should.equal('us-east-1a')

    root_device_name = instance.root_device_name
    instance.block_device_mapping[
        root_device_name].status.should.equal('in-use')
    volume_id = instance.block_device_mapping[root_device_name].volume_id
    volume_id.should.match(r'vol-\w+')

    volume = conn.get_all_volumes(volume_ids=[volume_id])[0]
    volume.attach_data.instance_id.should.equal(instance.id)
    volume.status.should.equal('in-use')

    with assert_raises(EC2ResponseError) as ex:
        conn.terminate_instances([instance.id], dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the TerminateInstance operation: Request would have succeeded, but DryRun flag is set')

    conn.terminate_instances([instance.id])

    reservations = conn.get_all_instances()
    instance = reservations[0].instances[0]
    instance.state.should.equal('terminated')

@mock_ec2_deprecated
def test_terminate_empty_instances():
    conn = boto.connect_ec2('the_key', 'the_secret')
    conn.terminate_instances.when.called_with(
        []).should.throw(EC2ResponseError)

@freeze_time("2014-01-01 05:00:00")
@mock_ec2_deprecated
def test_instance_attach_volume():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    vol1 = conn.create_volume(size=36, zone=conn.region.name)
    vol1.attach(instance.id, "/dev/sda1")
    vol1.update()
    vol2 = conn.create_volume(size=65, zone=conn.region.name)
    vol2.attach(instance.id, "/dev/sdb1")
    vol2.update()
    vol3 = conn.create_volume(size=130, zone=conn.region.name)
    vol3.attach(instance.id, "/dev/sdc1")
    vol3.update()

    reservations = conn.get_all_instances()
    instance = reservations[0].instances[0]

    instance.block_device_mapping.should.have.length_of(3)

    for v in conn.get_all_volumes(volume_ids=[instance.block_device_mapping['/dev/sdc1'].volume_id]):
        v.attach_data.instance_id.should.equal(instance.id)
        # can do due to freeze_time decorator.
        v.attach_data.attach_time.should.equal(instance.launch_time)
        # can do due to freeze_time decorator.
        v.create_time.should.equal(instance.launch_time)
        v.region.name.should.equal(instance.region.name)
        v.status.should.equal('in-use')

@mock_ec2_deprecated
def test_get_instances_by_id():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=2)
    instance1, instance2 = reservation.instances

    reservations = conn.get_all_instances(instance_ids=[instance1.id])
    reservations.should.have.length_of(1)
    reservation = reservations[0]
    reservation.instances.should.have.length_of(1)
    reservation.instances[0].id.should.equal(instance1.id)

    reservations = conn.get_all_instances(
        instance_ids=[instance1.id, instance2.id])
    reservations.should.have.length_of(1)
    reservation = reservations[0]
    reservation.instances.should.have.length_of(2)
    instance_ids = [instance.id for instance in reservation.instances]
    instance_ids.should.equal([instance1.id, instance2.id])

    # Call get_all_instances with a bad id should raise an error
    with assert_raises(EC2ResponseError) as cm:
        conn.get_all_instances(instance_ids=[instance1.id, "i-1234abcd"])
    cm.exception.code.should.equal('InvalidInstanceID.NotFound')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none

@mock_ec2
def test_get_paginated_instances():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-east-1')
    conn = boto3.resource('ec2', 'us-east-1')
    for i in range(100):
        conn.create_instances(ImageId=image_id,
                              MinCount=1,
                              MaxCount=1)
    resp = client.describe_instances(MaxResults=50)
    reservations = resp['Reservations']
    reservations.should.have.length_of(50)
    next_token = resp['NextToken']
    next_token.should_not.be.none
    resp2 = client.describe_instances(NextToken=next_token)
    reservations.extend(resp2['Reservations'])
    reservations.should.have.length_of(100)
    assert 'NextToken' not in resp2.keys()

@mock_ec2
def test_create_with_tags():
    ec2 = boto3.client('ec2', region_name='us-west-2')
    instances = ec2.run_instances(
        ImageId='ami-123',
        MinCount=1,
        MaxCount=1,
        InstanceType='t2.micro',
        TagSpecifications=[
            {
                'ResourceType': 'instance',
                'Tags': [
                    {
                        'Key': 'MY_TAG1',
                        'Value': 'MY_VALUE1',
                    },
                    {
                        'Key': 'MY_TAG2',
                        'Value': 'MY_VALUE2',
                    },
                ],
            },
            {
                'ResourceType': 'instance',
                'Tags': [
                    {
                        'Key': 'MY_TAG3',
                        'Value': 'MY_VALUE3',
                    },
                ]
            },
        ],
    )
    assert 'Tags' in instances['Instances'][0]
    len(instances['Instances'][0]['Tags']).should.equal(3)

@mock_ec2_deprecated
def test_get_instances_filtering_by_state():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances

    conn.terminate_instances([instance1.id])

    reservations = conn.get_all_instances(
        filters={'instance-state-name': 'running'})
    reservations.should.have.length_of(1)
    # Since we terminated instance1, only instance2 and instance3 should be
    # returned
    instance_ids = [instance.id for instance in reservations[0].instances]
    set(instance_ids).should.equal(set([instance2.id, instance3.id]))

    reservations = conn.get_all_instances(
        [instance2.id], filters={'instance-state-name': 'running'})
    reservations.should.have.length_of(1)
    instance_ids = [instance.id for instance in reservations[0].instances]
    instance_ids.should.equal([instance2.id])

    reservations = conn.get_all_instances(
        [instance2.id], filters={'instance-state-name': 'terminated'})
    list(reservations).should.equal([])

    # get_all_instances should still return all 3
    reservations = conn.get_all_instances()
    reservations[0].instances.should.have.length_of(3)

    conn.get_all_instances.when.called_with(
        filters={'not-implemented-filter': 'foobar'}).should.throw(NotImplementedError)

@mock_ec2_deprecated
def test_get_instances_filtering_by_instance_id():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances

    reservations = conn.get_all_instances(
        filters={'instance-id': instance1.id})
    # get_all_instances should return just instance1
    reservations[0].instances.should.have.length_of(1)
    reservations[0].instances[0].id.should.equal(instance1.id)

    reservations = conn.get_all_instances(
        filters={'instance-id': [instance1.id, instance2.id]})
    # get_all_instances should return two
    reservations[0].instances.should.have.length_of(2)

    reservations = conn.get_all_instances(
        filters={'instance-id': 'non-existing-id'})
    reservations.should.have.length_of(0)

@mock_ec2_deprecated
def test_get_instances_filtering_by_instance_type():
    conn = boto.connect_ec2()
    reservation1 = conn.run_instances('ami-1234abcd', instance_type='m1.small')
    instance1 = reservation1.instances[0]
    reservation2 = conn.run_instances('ami-1234abcd', instance_type='m1.small')
    instance2 = reservation2.instances[0]
    reservation3 = conn.run_instances('ami-1234abcd', instance_type='t1.micro')
    instance3 = reservation3.instances[0]

    reservations = conn.get_all_instances(
        filters={'instance-type': 'm1.small'})
    # get_all_instances should return instance1,2
    reservations.should.have.length_of(2)
    reservations[0].instances.should.have.length_of(1)
    reservations[1].instances.should.have.length_of(1)
    instance_ids = [reservations[0].instances[0].id,
                    reservations[1].instances[0].id]
    set(instance_ids).should.equal(set([instance1.id, instance2.id]))

    reservations = conn.get_all_instances(
        filters={'instance-type': 't1.micro'})
    # get_all_instances should return one
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(1)
    reservations[0].instances[0].id.should.equal(instance3.id)

    reservations = conn.get_all_instances(
        filters={'instance-type': ['t1.micro', 'm1.small']})
    reservations.should.have.length_of(3)
    reservations[0].instances.should.have.length_of(1)
    reservations[1].instances.should.have.length_of(1)
    reservations[2].instances.should.have.length_of(1)
    instance_ids = [
        reservations[0].instances[0].id,
        reservations[1].instances[0].id,
        reservations[2].instances[0].id,
    ]
    set(instance_ids).should.equal(
        set([instance1.id, instance2.id, instance3.id]))

    reservations = conn.get_all_instances(filters={'instance-type': 'bogus'})
    # bogus instance-type should return none
    reservations.should.have.length_of(0)

@mock_ec2_deprecated
def test_get_instances_filtering_by_reason_code():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances
    instance1.stop()
    instance2.terminate()

    reservations = conn.get_all_instances(
        filters={'state-reason-code': 'Client.UserInitiatedShutdown'})
    # get_all_instances should return instance1 and instance2
    reservations[0].instances.should.have.length_of(2)
    set([instance1.id, instance2.id]).should.equal(
        set([i.id for i in reservations[0].instances]))

    reservations = conn.get_all_instances(filters={'state-reason-code': ''})
    # get_all_instances should return instance 3
    reservations[0].instances.should.have.length_of(1)
    reservations[0].instances[0].id.should.equal(instance3.id)

@mock_ec2_deprecated
def test_get_instances_filtering_by_source_dest_check():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=2)
    instance1, instance2 = reservation.instances
    conn.modify_instance_attribute(
        instance1.id, attribute='sourceDestCheck', value=False)

    source_dest_check_false = conn.get_all_instances(
        filters={'source-dest-check': 'false'})
    source_dest_check_true = conn.get_all_instances(
        filters={'source-dest-check': 'true'})

    source_dest_check_false[0].instances.should.have.length_of(1)
    source_dest_check_false[0].instances[0].id.should.equal(instance1.id)

    source_dest_check_true[0].instances.should.have.length_of(1)
    source_dest_check_true[0].instances[0].id.should.equal(instance2.id)

@mock_ec2_deprecated
def test_get_instances_filtering_by_vpc_id():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc1 = conn.create_vpc("10.0.0.0/16")
    subnet1 = conn.create_subnet(vpc1.id, "10.0.0.0/27")
    reservation1 = conn.run_instances(
        'ami-1234abcd', min_count=1, subnet_id=subnet1.id)
    instance1 = reservation1.instances[0]

    vpc2 = conn.create_vpc("10.1.0.0/16")
    subnet2 = conn.create_subnet(vpc2.id, "10.1.0.0/27")
    reservation2 = conn.run_instances(
        'ami-1234abcd', min_count=1, subnet_id=subnet2.id)
    instance2 = reservation2.instances[0]

    reservations1 = conn.get_all_instances(filters={'vpc-id': vpc1.id})
    reservations1.should.have.length_of(1)
    reservations1[0].instances.should.have.length_of(1)
    reservations1[0].instances[0].id.should.equal(instance1.id)
    reservations1[0].instances[0].vpc_id.should.equal(vpc1.id)
    reservations1[0].instances[0].subnet_id.should.equal(subnet1.id)

    reservations2 = conn.get_all_instances(filters={'vpc-id': vpc2.id})
    reservations2.should.have.length_of(1)
    reservations2[0].instances.should.have.length_of(1)
    reservations2[0].instances[0].id.should.equal(instance2.id)
    reservations2[0].instances[0].vpc_id.should.equal(vpc2.id)
    reservations2[0].instances[0].subnet_id.should.equal(subnet2.id)

@mock_ec2_deprecated
def test_get_instances_filtering_by_architecture():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=1)
    instance = reservation.instances

    reservations = conn.get_all_instances(filters={'architecture': 'x86_64'})
    # get_all_instances should return the instance
    reservations[0].instances.should.have.length_of(1)

@mock_ec2
def test_get_instances_filtering_by_image_id():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-east-1')
    conn = boto3.resource('ec2', 'us-east-1')
    conn.create_instances(ImageId=image_id,
                          MinCount=1,
                          MaxCount=1)

    reservations = client.describe_instances(Filters=[{'Name': 'image-id',
                                                       'Values': [image_id]}])['Reservations']
    reservations[0]['Instances'].should.have.length_of(1)

@mock_ec2
def test_get_instances_filtering_by_private_dns():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-east-1')
    conn = boto3.resource('ec2', 'us-east-1')
    conn.create_instances(ImageId=image_id,
                          MinCount=1,
                          MaxCount=1,
                          PrivateIpAddress='10.0.0.1')
    reservations = client.describe_instances(Filters=[
        {'Name': 'private-dns-name', 'Values': ['ip-10-0-0-1.ec2.internal']}
    ])['Reservations']
    reservations[0]['Instances'].should.have.length_of(1)

@mock_ec2
def test_get_instances_filtering_by_ni_private_dns():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-west-2')
    conn = boto3.resource('ec2', 'us-west-2')
    conn.create_instances(ImageId=image_id,
                          MinCount=1,
                          MaxCount=1,
                          PrivateIpAddress='10.0.0.1')
    reservations = client.describe_instances(Filters=[
        {'Name': 'network-interface.private-dns-name', 'Values': ['ip-10-0-0-1.us-west-2.compute.internal']}
    ])['Reservations']
    reservations[0]['Instances'].should.have.length_of(1)

@mock_ec2
def test_get_instances_filtering_by_instance_group_name():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-east-1')
    client.create_security_group(
        Description='test',
        GroupName='test_sg'
    )
    client.run_instances(ImageId=image_id,
                          MinCount=1,
                          MaxCount=1,
                          SecurityGroups=['test_sg'])
    reservations = client.describe_instances(Filters=[
        {'Name': 'instance.group-name', 'Values': ['test_sg']}
    ])['Reservations']
    reservations[0]['Instances'].should.have.length_of(1)

@mock_ec2
def test_get_instances_filtering_by_instance_group_id():
    image_id = 'ami-1234abcd'
    client = boto3.client('ec2', region_name='us-east-1')
    create_sg = client.create_security_group(
        Description='test',
        GroupName='test_sg'
    )
    group_id = create_sg['GroupId']
    client.run_instances(ImageId=image_id,
                          MinCount=1,
                          MaxCount=1,
                          SecurityGroups=['test_sg'])
    reservations = client.describe_instances(Filters=[
        {'Name': 'instance.group-id', 'Values': [group_id]}
    ])['Reservations']
    reservations[0]['Instances'].should.have.length_of(1)

@mock_ec2_deprecated
def test_get_instances_filtering_by_tag():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances
    instance1.add_tag('tag1', 'value1')
    instance1.add_tag('tag2', 'value2')
    instance2.add_tag('tag1', 'value1')
    instance2.add_tag('tag2', 'wrong value')
    instance3.add_tag('tag2', 'value2')

    reservations = conn.get_all_instances(filters={'tag:tag0': 'value0'})
    # get_all_instances should return no instances
    reservations.should.have.length_of(0)

    reservations = conn.get_all_instances(filters={'tag:tag1': 'value1'})
    # get_all_instances should return both instances with this tag value
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(2)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance2.id)

    reservations = conn.get_all_instances(
        filters={'tag:tag1': 'value1', 'tag:tag2': 'value2'})
    # get_all_instances should return the instance with both tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(1)
    reservations[0].instances[0].id.should.equal(instance1.id)

    reservations = conn.get_all_instances(
        filters={'tag:tag1': 'value1', 'tag:tag2': 'value2'})
    # get_all_instances should return the instance with both tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(1)
    reservations[0].instances[0].id.should.equal(instance1.id)

    reservations = conn.get_all_instances(
        filters={'tag:tag2': ['value2', 'bogus']})
    # get_all_instances should return both instances with one of the
    # acceptable tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(2)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance3.id)

@mock_ec2_deprecated
def test_get_instances_filtering_by_tag_value():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances
    instance1.add_tag('tag1', 'value1')
    instance1.add_tag('tag2', 'value2')
    instance2.add_tag('tag1', 'value1')
    instance2.add_tag('tag2', 'wrong value')
    instance3.add_tag('tag2', 'value2')

    reservations = conn.get_all_instances(filters={'tag-value': 'value0'})
    # get_all_instances should return no instances
    reservations.should.have.length_of(0)

    reservations = conn.get_all_instances(filters={'tag-value': 'value1'})
    # get_all_instances should return both instances with this tag value
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(2)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance2.id)

    reservations = conn.get_all_instances(
        filters={'tag-value': ['value2', 'value1']})
    # get_all_instances should return both instances with one of the
    # acceptable tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(3)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance2.id)
    reservations[0].instances[2].id.should.equal(instance3.id)

    reservations = conn.get_all_instances(
        filters={'tag-value': ['value2', 'bogus']})
    # get_all_instances should return both instances with one of the
    # acceptable tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(2)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance3.id)

@mock_ec2_deprecated
def test_get_instances_filtering_by_tag_name():
    conn = boto.connect_ec2()
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances
    instance1.add_tag('tag1')
    instance1.add_tag('tag2')
    instance2.add_tag('tag1')
    instance2.add_tag('tag2X')
    instance3.add_tag('tag3')

    reservations = conn.get_all_instances(filters={'tag-key': 'tagX'})
    # get_all_instances should return no instances
    reservations.should.have.length_of(0)

    reservations = conn.get_all_instances(filters={'tag-key': 'tag1'})
    # get_all_instances should return both instances with this tag value
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(2)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance2.id)

    reservations = conn.get_all_instances(
        filters={'tag-key': ['tag1', 'tag3']})
    # get_all_instances should return both instances with one of the
    # acceptable tag values
    reservations.should.have.length_of(1)
    reservations[0].instances.should.have.length_of(3)
    reservations[0].instances[0].id.should.equal(instance1.id)
    reservations[0].instances[1].id.should.equal(instance2.id)
    reservations[0].instances[2].id.should.equal(instance3.id)

@mock_ec2_deprecated
def test_instance_start_and_stop():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', min_count=2)
    instances = reservation.instances
    instances.should.have.length_of(2)

    instance_ids = [instance.id for instance in instances]

    with assert_raises(EC2ResponseError) as ex:
        stopped_instances = conn.stop_instances(instance_ids, dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the StopInstance operation: Request would have succeeded, but DryRun flag is set')

    stopped_instances = conn.stop_instances(instance_ids)

    for instance in stopped_instances:
        instance.state.should.equal('stopping')

    with assert_raises(EC2ResponseError) as ex:
        started_instances = conn.start_instances(
            [instances[0].id], dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the StartInstance operation: Request would have succeeded, but DryRun flag is set')

    started_instances = conn.start_instances([instances[0].id])
    started_instances[0].state.should.equal('pending')

@mock_ec2_deprecated
def test_instance_reboot():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    with assert_raises(EC2ResponseError) as ex:
        instance.reboot(dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the RebootInstance operation: Request would have succeeded, but DryRun flag is set')

    instance.reboot()
    instance.state.should.equal('pending')

@mock_ec2_deprecated
def test_instance_attribute_instance_type():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    with assert_raises(EC2ResponseError) as ex:
        instance.modify_attribute("instanceType", "m1.small", dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the ModifyInstanceType operation: Request would have succeeded, but DryRun flag is set')

    instance.modify_attribute("instanceType", "m1.small")

    instance_attribute = instance.get_attribute("instanceType")
    instance_attribute.should.be.a(InstanceAttribute)
    instance_attribute.get('instanceType').should.equal("m1.small")

@mock_ec2_deprecated
def test_modify_instance_attribute_security_groups():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    sg_id = conn.create_security_group('test security group', 'this is a test security group').id
    sg_id2 = conn.create_security_group('test security group 2', 'this is a test security group 2').id

    with assert_raises(EC2ResponseError) as ex:
        instance.modify_attribute("groupSet", [sg_id, sg_id2], dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the ModifyInstanceSecurityGroups operation: Request would have succeeded, but DryRun flag is set')

    instance.modify_attribute("groupSet", [sg_id, sg_id2])

    instance_attribute = instance.get_attribute("groupSet")
    instance_attribute.should.be.a(InstanceAttribute)
    group_list = instance_attribute.get('groupSet')
    any(g.id == sg_id for g in group_list).should.be.ok
    any(g.id == sg_id2 for g in group_list).should.be.ok

@mock_ec2_deprecated
def test_instance_attribute_user_data():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    with assert_raises(EC2ResponseError) as ex:
        instance.modify_attribute(
            "userData", "this is my user data", dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the ModifyUserData operation: Request would have succeeded, but DryRun flag is set')

    instance.modify_attribute("userData", "this is my user data")

    instance_attribute = instance.get_attribute("userData")
    instance_attribute.should.be.a(InstanceAttribute)
    instance_attribute.get("userData").should.equal("this is my user data")

@mock_ec2_deprecated
def test_instance_attribute_source_dest_check():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    # Default value is true
    instance.sourceDestCheck.should.equal('true')

    instance_attribute = instance.get_attribute("sourceDestCheck")
    instance_attribute.should.be.a(InstanceAttribute)
    instance_attribute.get("sourceDestCheck").should.equal(True)

    # Set to false (note: Boto converts bool to string, eg 'false')

    with assert_raises(EC2ResponseError) as ex:
        instance.modify_attribute("sourceDestCheck", False, dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the ModifySourceDestCheck operation: Request would have succeeded, but DryRun flag is set')

    instance.modify_attribute("sourceDestCheck", False)

    instance.update()
    instance.sourceDestCheck.should.equal('false')

    instance_attribute = instance.get_attribute("sourceDestCheck")
    instance_attribute.should.be.a(InstanceAttribute)
    instance_attribute.get("sourceDestCheck").should.equal(False)

    # Set back to true
    instance.modify_attribute("sourceDestCheck", True)

    instance.update()
    instance.sourceDestCheck.should.equal('true')

    instance_attribute = instance.get_attribute("sourceDestCheck")
    instance_attribute.should.be.a(InstanceAttribute)
    instance_attribute.get("sourceDestCheck").should.equal(True)

@mock_ec2_deprecated
def test_user_data_with_run_instance():
    user_data = b"some user data"
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', user_data=user_data)
    instance = reservation.instances[0]

    instance_attribute = instance.get_attribute("userData")
    instance_attribute.should.be.a(InstanceAttribute)
    retrieved_user_data = instance_attribute.get("userData").encode('utf-8')
    decoded_user_data = base64.decodestring(retrieved_user_data)
    decoded_user_data.should.equal(b"some user data")

@mock_ec2_deprecated
def test_run_instance_with_security_group_name():
    conn = boto.connect_ec2('the_key', 'the_secret')

    with assert_raises(EC2ResponseError) as ex:
        group = conn.create_security_group(
            'group1', "some description", dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the CreateSecurityGroup operation: Request would have succeeded, but DryRun flag is set')

    group = conn.create_security_group('group1', "some description")

    reservation = conn.run_instances('ami-1234abcd',
                                     security_groups=['group1'])
    instance = reservation.instances[0]

    instance.groups[0].id.should.equal(group.id)
    instance.groups[0].name.should.equal("group1")

@mock_ec2_deprecated
def test_run_instance_with_security_group_id():
    conn = boto.connect_ec2('the_key', 'the_secret')
    group = conn.create_security_group('group1', "some description")
    reservation = conn.run_instances('ami-1234abcd',
                                     security_group_ids=[group.id])
    instance = reservation.instances[0]

    instance.groups[0].id.should.equal(group.id)
    instance.groups[0].name.should.equal("group1")

@mock_ec2_deprecated
def test_run_instance_with_instance_type():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', instance_type="t1.micro")
    instance = reservation.instances[0]

    instance.instance_type.should.equal("t1.micro")

@mock_ec2_deprecated
def test_run_instance_with_default_placement():
    conn = boto.ec2.connect_to_region("us-east-1")
    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    instance.placement.should.equal("us-east-1a")

@mock_ec2_deprecated
def test_run_instance_with_placement():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', placement="us-east-1b")
    instance = reservation.instances[0]

    instance.placement.should.equal("us-east-1b")

@mock_ec2
def test_run_instance_with_subnet_boto3():
    client = boto3.client('ec2', region_name='eu-central-1')

    ip_networks = [
        (ipaddress.ip_network('10.0.0.0/16'), ipaddress.ip_network('10.0.99.0/24')),
        (ipaddress.ip_network('192.168.42.0/24'), ipaddress.ip_network('192.168.42.0/25'))
    ]

    # Tests instances are created with the correct IPs
    for vpc_cidr, subnet_cidr in ip_networks:
        resp = client.create_vpc(
            CidrBlock=str(vpc_cidr),
            AmazonProvidedIpv6CidrBlock=False,
            DryRun=False,
            InstanceTenancy='default'
        )
        vpc_id = resp['Vpc']['VpcId']

        resp = client.create_subnet(
            CidrBlock=str(subnet_cidr),
            VpcId=vpc_id
        )
        subnet_id = resp['Subnet']['SubnetId']

        resp = client.run_instances(
            ImageId='ami-1234abcd',
            MaxCount=1,
            MinCount=1,
            SubnetId=subnet_id
        )
        instance = resp['Instances'][0]
        instance['SubnetId'].should.equal(subnet_id)

        priv_ipv4 = ipaddress.ip_address(six.text_type(instance['PrivateIpAddress']))
        subnet_cidr.should.contain(priv_ipv4)

@mock_ec2
def test_run_instance_with_specified_private_ipv4():
    client = boto3.client('ec2', region_name='eu-central-1')

    vpc_cidr = ipaddress.ip_network('192.168.42.0/24')
    subnet_cidr = ipaddress.ip_network('192.168.42.0/25')

    resp = client.create_vpc(
        CidrBlock=str(vpc_cidr),
        AmazonProvidedIpv6CidrBlock=False,
        DryRun=False,
        InstanceTenancy='default'
    )
    vpc_id = resp['Vpc']['VpcId']

    resp = client.create_subnet(
        CidrBlock=str(subnet_cidr),
        VpcId=vpc_id
    )
    subnet_id = resp['Subnet']['SubnetId']

    resp = client.run_instances(
        ImageId='ami-1234abcd',
        MaxCount=1,
        MinCount=1,
        SubnetId=subnet_id,
        PrivateIpAddress='192.168.42.5'
    )
    instance = resp['Instances'][0]
    instance['SubnetId'].should.equal(subnet_id)
    instance['PrivateIpAddress'].should.equal('192.168.42.5')

@mock_ec2
def test_run_instance_mapped_public_ipv4():
    client = boto3.client('ec2', region_name='eu-central-1')

    vpc_cidr = ipaddress.ip_network('192.168.42.0/24')
    subnet_cidr = ipaddress.ip_network('192.168.42.0/25')

    resp = client.create_vpc(
        CidrBlock=str(vpc_cidr),
        AmazonProvidedIpv6CidrBlock=False,
        DryRun=False,
        InstanceTenancy='default'
    )
    vpc_id = resp['Vpc']['VpcId']

    resp = client.create_subnet(
        CidrBlock=str(subnet_cidr),
        VpcId=vpc_id
    )
    subnet_id = resp['Subnet']['SubnetId']
    client.modify_subnet_attribute(
        SubnetId=subnet_id,
        MapPublicIpOnLaunch={'Value': True}
    )

    resp = client.run_instances(
        ImageId='ami-1234abcd',
        MaxCount=1,
        MinCount=1,
        SubnetId=subnet_id
    )
    instance = resp['Instances'][0]
    instance.should.contain('PublicDnsName')
    instance.should.contain('PublicIpAddress')
    len(instance['PublicDnsName']).should.be.greater_than(0)
    len(instance['PublicIpAddress']).should.be.greater_than(0)

@mock_ec2_deprecated
def test_run_instance_with_nic_autocreated():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")
    security_group1 = conn.create_security_group(
        'test security group #1', 'this is a test security group')
    security_group2 = conn.create_security_group(
        'test security group #2', 'this is a test security group')
    private_ip = "10.0.0.1"

    reservation = conn.run_instances('ami-1234abcd', subnet_id=subnet.id,
                                     security_groups=[security_group1.name],
                                     security_group_ids=[security_group2.id],
                                     private_ip_address=private_ip)
    instance = reservation.instances[0]

    all_enis = conn.get_all_network_interfaces()
    all_enis.should.have.length_of(1)
    eni = all_enis[0]

    instance.interfaces.should.have.length_of(1)
    instance.interfaces[0].id.should.equal(eni.id)

    instance.subnet_id.should.equal(subnet.id)
    instance.groups.should.have.length_of(2)
    set([group.id for group in instance.groups]).should.equal(
        set([security_group1.id, security_group2.id]))

    eni.subnet_id.should.equal(subnet.id)
    eni.groups.should.have.length_of(2)
    set([group.id for group in eni.groups]).should.equal(
        set([security_group1.id, security_group2.id]))
    eni.private_ip_addresses.should.have.length_of(1)
    eni.private_ip_addresses[0].private_ip_address.should.equal(private_ip)

@mock_ec2_deprecated
def test_run_instance_with_nic_preexisting():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")
    security_group1 = conn.create_security_group(
        'test security group #1', 'this is a test security group')
    security_group2 = conn.create_security_group(
        'test security group #2', 'this is a test security group')
    private_ip = "54.0.0.1"
    eni = conn.create_network_interface(
        subnet.id, private_ip, groups=[security_group1.id])

    # Boto requires NetworkInterfaceCollection of NetworkInterfaceSpecifications...
    #   annoying, but generates the desired querystring.
    from boto.ec2.networkinterface import NetworkInterfaceSpecification, NetworkInterfaceCollection
    interface = NetworkInterfaceSpecification(
        network_interface_id=eni.id, device_index=0)
    interfaces = NetworkInterfaceCollection(interface)
    # end Boto objects

    reservation = conn.run_instances('ami-1234abcd', network_interfaces=interfaces,
                                     security_group_ids=[security_group2.id])
    instance = reservation.instances[0]

    instance.subnet_id.should.equal(subnet.id)

    all_enis = conn.get_all_network_interfaces()
    all_enis.should.have.length_of(1)

    instance.interfaces.should.have.length_of(1)
    instance_eni = instance.interfaces[0]
    instance_eni.id.should.equal(eni.id)

    instance_eni.subnet_id.should.equal(subnet.id)
    instance_eni.groups.should.have.length_of(2)
    set([group.id for group in instance_eni.groups]).should.equal(
        set([security_group1.id, security_group2.id]))
    instance_eni.private_ip_addresses.should.have.length_of(1)
    instance_eni.private_ip_addresses[
        0].private_ip_address.should.equal(private_ip)

@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_instance_with_nic_attach_detach():
    conn = boto.connect_vpc('the_key', 'the_secret')
    vpc = conn.create_vpc("10.0.0.0/16")
    subnet = conn.create_subnet(vpc.id, "10.0.0.0/18")

    security_group1 = conn.create_security_group(
        'test security group #1', 'this is a test security group')
    security_group2 = conn.create_security_group(
        'test security group #2', 'this is a test security group')

    reservation = conn.run_instances(
        'ami-1234abcd', security_group_ids=[security_group1.id])
    instance = reservation.instances[0]

    eni = conn.create_network_interface(subnet.id, groups=[security_group2.id])

    # Check initial instance and ENI data
    instance.interfaces.should.have.length_of(1)

    eni.groups.should.have.length_of(1)
    set([group.id for group in eni.groups]).should.equal(
        set([security_group2.id]))

    # Attach
    with assert_raises(EC2ResponseError) as ex:
        conn.attach_network_interface(
            eni.id, instance.id, device_index=1, dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the AttachNetworkInterface operation: Request would have succeeded, but DryRun flag is set')

    conn.attach_network_interface(eni.id, instance.id, device_index=1)

    # Check attached instance and ENI data
    instance.update()
    instance.interfaces.should.have.length_of(2)
    instance_eni = instance.interfaces[1]
    instance_eni.id.should.equal(eni.id)
    instance_eni.groups.should.have.length_of(2)
    set([group.id for group in instance_eni.groups]).should.equal(
        set([security_group1.id, security_group2.id]))

    eni = conn.get_all_network_interfaces(
        filters={'network-interface-id': eni.id})[0]
    eni.groups.should.have.length_of(2)
    set([group.id for group in eni.groups]).should.equal(
        set([security_group1.id, security_group2.id]))

    # Detach
    with assert_raises(EC2ResponseError) as ex:
        conn.detach_network_interface(instance_eni.attachment.id, dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the DetachNetworkInterface operation: Request would have succeeded, but DryRun flag is set')

    conn.detach_network_interface(instance_eni.attachment.id)

    # Check detached instance and ENI data
    instance.update()
    instance.interfaces.should.have.length_of(1)

    eni = conn.get_all_network_interfaces(
        filters={'network-interface-id': eni.id})[0]
    eni.groups.should.have.length_of(1)
    set([group.id for group in eni.groups]).should.equal(
        set([security_group2.id]))

    # Detach with invalid attachment ID
    with assert_raises(EC2ResponseError) as cm:
        conn.detach_network_interface('eni-attach-1234abcd')
    cm.exception.code.should.equal('InvalidAttachmentID.NotFound')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none

@mock_ec2_deprecated
def test_ec2_classic_has_public_ip_address():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', key_name="keypair_name")
    instance = reservation.instances[0]
    instance.ip_address.should_not.equal(None)
    instance.public_dns_name.should.contain(instance.ip_address.replace('.', '-'))
    instance.private_ip_address.should_not.equal(None)
    instance.private_dns_name.should.contain(instance.private_ip_address.replace('.', '-'))

@mock_ec2_deprecated
def test_run_instance_with_keypair():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', key_name="keypair_name")
    instance = reservation.instances[0]

    instance.key_name.should.equal("keypair_name")

@mock_ec2_deprecated
def test_describe_instance_status_no_instances():
    conn = boto.connect_ec2('the_key', 'the_secret')
    all_status = conn.get_all_instance_status()
    len(all_status).should.equal(0)

@mock_ec2_deprecated
def test_describe_instance_status_with_instances():
    conn = boto.connect_ec2('the_key', 'the_secret')
    conn.run_instances('ami-1234abcd', key_name="keypair_name")

    all_status = conn.get_all_instance_status()
    len(all_status).should.equal(1)
    all_status[0].instance_status.status.should.equal('ok')
    all_status[0].system_status.status.should.equal('ok')

@mock_ec2_deprecated
def test_describe_instance_status_with_instance_filter():
    conn = boto.connect_ec2('the_key', 'the_secret')

    # We want to filter based on this one
    reservation = conn.run_instances('ami-1234abcd', key_name="keypair_name")
    instance = reservation.instances[0]

    # This is just to setup the test
    conn.run_instances('ami-1234abcd', key_name="keypair_name")

    all_status = conn.get_all_instance_status(instance_ids=[instance.id])
    len(all_status).should.equal(1)
    all_status[0].id.should.equal(instance.id)

    # Call get_all_instance_status with a bad id should raise an error
    with assert_raises(EC2ResponseError) as cm:
        conn.get_all_instance_status(instance_ids=[instance.id, "i-1234abcd"])
    cm.exception.code.should.equal('InvalidInstanceID.NotFound')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none

@requires_boto_gte("2.32.0")
@mock_ec2_deprecated
def test_describe_instance_status_with_non_running_instances():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances('ami-1234abcd', min_count=3)
    instance1, instance2, instance3 = reservation.instances
    instance1.stop()
    instance2.terminate()

    all_running_status = conn.get_all_instance_status()
    all_running_status.should.have.length_of(1)
    all_running_status[0].id.should.equal(instance3.id)
    all_running_status[0].state_name.should.equal('running')

    all_status = conn.get_all_instance_status(include_all_instances=True)
    all_status.should.have.length_of(3)

    status1 = next((s for s in all_status if s.id == instance1.id), None)
    status1.state_name.should.equal('stopped')

    status2 = next((s for s in all_status if s.id == instance2.id), None)
    status2.state_name.should.equal('terminated')

    status3 = next((s for s in all_status if s.id == instance3.id), None)
    status3.state_name.should.equal('running')

@mock_ec2_deprecated
def test_get_instance_by_security_group():
    conn = boto.connect_ec2('the_key', 'the_secret')

    conn.run_instances('ami-1234abcd')
    instance = conn.get_only_instances()[0]

    security_group = conn.create_security_group('test', 'test')

    with assert_raises(EC2ResponseError) as ex:
        conn.modify_instance_attribute(instance.id, "groupSet", [
                                       security_group.id], dry_run=True)
    ex.exception.error_code.should.equal('DryRunOperation')
    ex.exception.status.should.equal(400)
    ex.exception.message.should.equal(
        'An error occurred (DryRunOperation) when calling the ModifyInstanceSecurityGroups operation: Request would have succeeded, but DryRun flag is set')

    conn.modify_instance_attribute(
        instance.id, "groupSet", [security_group.id])

    security_group_instances = security_group.instances()

    assert len(security_group_instances) == 1
    assert security_group_instances[0].id == instance.id

@mock_ec2
def test_modify_delete_on_termination():
    ec2_client = boto3.resource('ec2', region_name='us-west-1')
    result = ec2_client.create_instances(ImageId='ami-12345678', MinCount=1, MaxCount=1)
    instance = result[0]
    instance.load()
    instance.block_device_mappings[0]['Ebs']['DeleteOnTermination'].should.be(False)
    instance.modify_attribute(
        BlockDeviceMappings=[{
            'DeviceName': '/dev/sda1',
            'Ebs': {'DeleteOnTermination': True}
        }]
    )
    instance.load()
    instance.block_device_mappings[0]['Ebs']['DeleteOnTermination'].should.be(True)

@mock_ec2
def test_create_instance_ebs_optimized():
    ec2_resource = boto3.resource('ec2', region_name='eu-west-1')

    instance = ec2_resource.create_instances(
        ImageId = 'ami-12345678',
        MaxCount = 1,
        MinCount = 1,
        EbsOptimized = True,
    )[0]
    instance.load()
    instance.ebs_optimized.should.be(True)

    instance.modify_attribute(
        EbsOptimized={
            'Value': False
        }
    )
    instance.load()
    instance.ebs_optimized.should.be(False)

@mock_ec2
def test_run_multiple_instances_in_same_command():
    instance_count = 4
    client = boto3.client('ec2', region_name='us-east-1')
    client.run_instances(ImageId='ami-1234abcd',
                          MinCount=instance_count,
                          MaxCount=instance_count)
    reservations = client.describe_instances()['Reservations']

    reservations[0]['Instances'].should.have.length_of(instance_count)

    instances = reservations[0]['Instances']
    for i in range(0, instance_count):
        instances[i]['AmiLaunchIndex'].should.be(i)

@mock_ec2
def test_describe_instance_attribute():
    client = boto3.client('ec2', region_name='us-east-1')
    security_group_id = client.create_security_group(
        GroupName='test security group', Description='this is a test security group')['GroupId']
    client.run_instances(ImageId='ami-1234abcd',
                         MinCount=1,
                         MaxCount=1,
                         SecurityGroupIds=[security_group_id])
    instance_id = client.describe_instances()['Reservations'][0]['Instances'][0]['InstanceId']

    valid_instance_attributes = ['instanceType', 'kernel', 'ramdisk', 'userData', 'disableApiTermination', 'instanceInitiatedShutdownBehavior', 'rootDeviceName', 'blockDeviceMapping', 'productCodes', 'sourceDestCheck', 'groupSet', 'ebsOptimized', 'sriovNetSupport']

    for valid_instance_attribute in valid_instance_attributes:
        response = client.describe_instance_attribute(InstanceId=instance_id, Attribute=valid_instance_attribute)
        if valid_instance_attribute == "groupSet":
            response.should.have.key("Groups")
            response["Groups"].should.have.length_of(1)
            response["Groups"][0]["GroupId"].should.equal(security_group_id)
        elif valid_instance_attribute == "userData":
            response.should.have.key("UserData")
            response["UserData"].should.be.empty

    invalid_instance_attributes = ['abc', 'Kernel', 'RamDisk', 'userdata', 'iNsTaNcEtYpE']

    for invalid_instance_attribute in invalid_instance_attributes:
        with assert_raises(ClientError) as ex:
            client.describe_instance_attribute(InstanceId=instance_id, Attribute=invalid_instance_attribute)
        ex.exception.response['Error']['Code'].should.equal('InvalidParameterValue')
        ex.exception.response['ResponseMetadata']['HTTPStatusCode'].should.equal(400)
        message = 'Value ({invalid_instance_attribute}) for parameter attribute is invalid. Unknown attribute.'.format(invalid_instance_attribute=invalid_instance_attribute)
        ex.exception.response['Error']['Message'].should.equal(message)

redpajama_set_name: RedPajamaGithub


The purpose of the PSR is to make payment systems work well for all those that use them.
What do we mean by payment systems, which organisations does that include and how do they work?
Our aim is to develop and protect competitive markets and the interests of those who use payment systems.
A cross-section of payments industry professionals demonstrate the PSR's collaborative approach.
Our first two market reviews looked in detail at infrastructure provision and indirect access.
Read the latest news stories and press releases from the Payment Systems Regulator.


Decoster, A. and Schokkaert, E. (2001), The Choice of Inequality Measure in Empirical Research on Distributive Judgments, Journal of Economics-Zeitschrift Fur Nationalokonomie 9, p. 197-222 (Impactfactor 0,525).
cation of individual respondents in those who want and those who do not want less inequality does depend on the measure used in 20% of the cases. Moreover, the tendency to equalise is a poor measure of conservatism.


"Randy successfully helped us lower our taxes on appeal. We purchased our home for $350,000. It's now worth, $250,000. However we were still being taxed at a value of $375,000. What a relief to have our property taxes lowered! We called Randy on many referrals, that he is the expert in residential home values. Randy was on time, very knowledgeable, courteous, detailed and accurate. We received our appraisals within three days. With his appraisal, we were able to get our taxes lowered to the appropriate and current amount. We would definitely refer Randy! Tom and Carol – Frankfort.
Randy helped me through my divorce. Me and my husband had to get appraisals done on our house. The judge leaned towards Randy's appraisal , as the most accurate and most credible. Divorce is stressful, but not with the appraisal process with Randy. Randy is very knowledgeable, polite, courteous, unbiased, objective and timely. Thank you Randy! I now have peace of mind, staying in my home with my children, from getting a fair price for my home." Tammy – Glenview.
Stephanie is the most dedicated and hard working realtor. My husband and I have dealt with other realtors and none compare to Stephanie. We met Stephanie at a open house she had. We were just "browsing ". We had no intentions on looking for a new realtor because it's usually a long process which we didn't want to deal with. The day we met her I knew something was different about her. She wasn't your typical realtor. Her knowledge and customer service is just amazing as well as her smiling face! She is such a genuine person. She is never too busy for her clients. Any questions or concerns we had, she checked into it immediately. She knows her neighborhoods and gives great advise. She followed up on things and faught for us to get our property. We almost lost it because we were so indecisive. Being the strong realtor she is we won the bid. She was with us through every step. Starting from our inspection to closing as well as sold out home. Everyone told us we won't sell because it was November. Nope, Stephanie proved everyone wrong 🙂 If I hear anyone talking about possibly selling or buying I mention Stephanie immediately. Should we ever plan on something in the future, Stephanie will be our girl. Hands down she is the best out there!!!!!!
Stephanie has been wonderful is so many ways. I admire her as a woman, a mom, a friend and a working woman. She is determined and also kind. That is the key and she holds it! She may be busy but always makes time and you never feel rushed. She help us find our dream home a year before we were planning on it because something popped up that we just had to see! She was excited as much as we were! It is so fun working with her and she will go as fast or as slow as you need to get you into your new home. She lends advice when asked and just makes you feel comfortable. She was amazing to work with and I also refer her to anyone I know that is looking to buy or sell because she will work super hard to get it done as smoothly and quickly as possible. I am happy to know her in so many ways. Her smiling face and super positive attitude go a long way and I just love her!
We worked with Stephanie Boswell in spring 2018. She was very knowledgeable of the surrounding home market and it didn't take her long to help us find exactly what we were looking for. She was able to answer all of our questions in a timely manner and was so patient throughout our entire process. Definitely recommend her 100%! Thanks again Stephanie! And good luck!
Stephanie helped me and my brother sell my mothers condo,all the way in the city, even though we all live 40 miles west of Chicago. Stephanie used her vast knowledge of real estate to guide me and my brother, and advised us on what listing price we should be asking for, which at first we thought might be too high, but within 3 days of her well planned layout of the property, we got an offer that was better that we originally thought we were going to get, so long story short, we were able to sell the property quickly, and at a price that was very satisfying for everyone involved! I wouldn't hesitate one bit recommending Stephanie to any one of my friends in the future that is looking to buy or sell..!! She is awesome..!!
There are few words to be able to fully describe such a dedicated,enthusiastic, amazing, so very knowledgeable agent, who has gone above and beyond in helping us!! Professionalism, kindness, supportive, positive attitude, are just a few!! We couldn't be more thankful and lucky to have her at our side through this!
Stephanie really goes above and beyond for her clients making sure they are well taken care of and a true professional. She is an excellent realtor and would be wonderful at helping you to sell your home.
Great company, kind courteous staff. Quick turn around time. I would definitely recommend this company for all your inspection needs.
The inspectors we're extremely knowledable, skillful, experienced professional and friendly. The dog loved them and they loved her too. They'll even brought cookies!
This is my 1st time having a home inspection done and the 2 gentleman that inspected the home were great. They walked me through everything that was wrong with the home as well as provided me some good insight on where certain things are around the home. I will definitely be using them for future inspections.
This was the best money spent on the process of purchasing a home. The contrast between Tom and his service on my new home and the company that inspected my home was incredible. Tom was very accurate unlike the person who did my home and cost me money to verify everything was fine. I would use Echo and Tom again.
Echo was great! I like that they send out 2 sets of eyes. I was present for the inspection and the inspectors were knowledgeable and courteous. I'd highly recommend!
We had an inspection done by Thomas Migon and his assistant. They were very professional and did a great job. They got to inspect the property, even in the smallest places of the house. Their report is easy to understand, with photos and important information. They were friendly, on time and know their job. I recommend this company, their prices are good too.
Sean was great to work with on both fronts; buying and selling. He always followed up on our questions and responded back quickly. Showings were scheduled when we requested. We would highly recommend Sean as your realtor.
Sean helped my wife and I buy a home of our dreams. The search took about 3 months and Sean was available to help throughout the process. He helped us stay patient and negotiate a competitive price in the neighborhood we desired. Thank you Sean!
It was great working with Sean! I gave him a specific area where we were looking to purchase. He was very knowledgeable. All the walkthroughs of the different properties we seen, he explained everything I needed to know. Considering it was our 1st home. He really took a lot of stress out of it.


3D spatial patches – a new technology in label embellishment.
Big global market potential with challenges for economic production.
The label market has an ever lasting interest for fancy new decoration technologies. Many things come up, but many fail due to missing possibilities for economic production. Get a unique insight in developments in the fields of embellishment technologies and a closer look on eye catchers like 3D registered holographic patches – combined with more information about efficient production solutions, which are the enabler for new embellishment technologies to find their way on the shelves.
See the Pantec SWIFT™ placing a record numbers of patches per hour, allowing brand owners to differentiate their products economically with newest effect hot foils to increase success at the shelf.
See, feel and get inspired by the Pantec RHINO™ II running 25'000 strokes per hour, producing a very complex three effect label in a single pass.
We would be happy to welcome you to our press conference for first hand information, live demonstration and the hand out of photo material and samples.


text:
Album of the year contender #9: Joanna Newsom - Ys
Buy Ys from Amazon.com
By Ys from Amazon.co.uk
Normally come the end of the year I've long since forgotten which albums I should be considering for album of the year - not because they're forgettable but more because time is such a confusing thing, some albums I seem to have had for years only came out months ago. So this year I thought I'd be really clever and write a blog entry everytime an "Album of the year" contender found it's way into my collection, then I'd have a nice collection I could peruse and make a reasoned decision for which album gets the top spot.
Now that was a bloody waste of time because suddenly there's one album that is standing head and shoulders above anything else on the list. One album that is mind-blowing in its ambition and astounding in its realization. One album that has shouldered its way to near (if not at) the very top of my all time list (although of course saying that three days after its release may be a little premature).
I'd read far too much about Joanna Newsom's new album Ys (Amazon US | Amazon UK) that I was worried that all the hyperbole surrounding it might just be too much for any album to manage. The superlatives were all justified. It sort of worries me that I am in agreement with so many people, because that happens so rarely but maybe this time it's just because Ys is an album that transcends the boundaries that normally separates "me" from "them".
This is an album to be alone with, this is one you need to live with inside your head. It doesn't deserve the ignorant comments of people wround you who aren't listening to it just hearing it. This has affected me like no other album since The Hounds of Love (Amazon US | Amazon UK). I think that this may be the first truly (or nearly) perfect album of the 21st Century.
See the also rans
#1: Cat Power
#2: Audrey
#3: Camera Obscura
#4, #5, #6 and #7: YLT, Sparklehorse, Fiel Garvie, Nina Nastasia
#8: Asobi Seksu
« The All-TIME 100 Albums
On Fire changed John Porcellino's life »

redpajama_set_name: RedPajamaCommonCrawl


text:
Хроносфе́ра () — супероружие Союзников из серии игр Command & Conquer: Red Alert, разработанное, согласно сюжету, Альбертом Эйнштейном. Представляет собой здание, которое содержит способность «хроносдвига», позволяющего игроку телепортировать боевые единицы в другую часть карты. Попытка телепортации пехоты, как правило, приводит к её немедленной гибели.

Command & Conquer: Red Alert (1996)

Сюжет
Первый прототип Хроносферы был построен Альбертом Эйнштейном в 1946 году, чтобы отправиться в прошлое и убить Адольфа Гитлера. В то время как намерения Эйнштейна предотвратили ужасы Второй мировой войны, устранение нацистской Германии нарушило баланс мировых держав, в результате чего Советский Союз начал новую Вторую мировую войну.

В изменённой временной шкале устройство Хроносфера было снова разработано, но на этот раз для телепортации материи. Основываясь на экспериментах с электрокинезом, проведённых физиками из Гарварда и Массачусетского технологического института в 1937 году, устройство должно было транспортировать материю, преобразовывая атомы в волновые энергии, которые можно легко транспортировать лучами света. Эксперименты были успешными с неодушевлёнными объектами, но столкнулись с проблемами с живыми существами из-за их сложной молекулярной структуры.

Первоначальное тестирование устройства в ходе Филадельфийского эксперимента показало отсутствие контроля над процессом телепортации. Решение проблемы управления стало главной заботой Альберта Эйнштейна и других сотрудников, работающих над проектом.

Кампания Союзников
Решающее контрольное испытание Хроносферы было проведено на объекте недалеко от Лихтенштейна. Наступающие советские войска обнаружили объект и пригрозили уничтожить его. База готовилась к критическим испытаниям, и эвакуация означала бы потерю месяцев подготовки. Полевой командир-игрок был отправлен защищать Хроносферу. Несмотря на продолжительное советское наступление, испытания шли по графику.

Даже после тщательных испытаний Хроносфера по-прежнему демонстрировала проблемы при использовании. Во время телепортации мог по-прежнему исчезнуть персонал машины, а также могли взорваться ядерные боеголовки. Внешний вид «хроновихря» во время использования также показал недостатки устройства. Несмотря на это, Хроносфера была официально выпущена для использования в битве под Москвой на заключительном этапе войны. Во время Третьей мировой войны недостатки устройства были устранены Эйнштейном в его лаборатории в Шварцвальде.

Кампания СССР
В альтернативной временной шкале Советы впервые узнали о Хроносфере, когда советские агенты наблюдали за её работой на острове Эльба. Сталин стал одержим её приобретением, особенно после того, как союзные войска начали её использовать.

СССР отследил Хроносферу до Швейцарии. Атака привела к поимке Альберта Эйнштейна. Советы поместили в часы Эйнштейна устройство слежения, которое позволило союзникам спасти учёного с помощью Хроносферы. Устройство слежения привело Советы к новому местоположению Хроносферы на Пиренейском полуострове.

Союзники настроили свои радары на автоматическое самоуничтожение Хроносферы при приближении советских войск. Ещё одна советская атака не смогла вывести из строя все радары, и Хроносфера была уничтожена. Генерал Георгий Куков не сообщил полевому командиру о последнем радаре, и за эту оплошность Сталин лично задушил Кукова.

В пятой миссии Советы захватывают и успешно используют Хроносферу для уничтожения местной базы Союзников. У этой Хроносферы было более быстрое время восстановления: полторы минуты вместо трёх.

Характеристика
В Command & Conquer: Red Alert (1996), где возможно телепортировать только одну боевую единицу, спустя 3 минуты объект вернется в то место, откуда и был телепортирован. Если игрок переносит военно-морские юниты противника на сушу или наземные юниты в океан, они немедленно уничтожаются. Хроносферу также нельзя использовать против вражеских юнитов.

Данное супероружие противопоставлено советскому супероружию, известному как Железный занавес. В одном брифинге миссии Союзников прямо говорится об этом дихотомическом противопоставлении: «С Хроносферой, которая поможет вам, даже новый сталинский Железный занавес не сможет нас остановить!». В этой игре Хроносфера внешне выглядит как гладкая хромированная конструкция. Она, как и Железный занавес, визуально выделяется на фоне окружающего её «военного утилитаризма».

Хроносфера также имеет уникальную в своём роде анимацию — когда «здоровье» большинства зданий в Red Alert падает ниже 50 %, они кажутся разбитыми, рухнувшими или горящими. Вместо этого повреждённая Хроносферы вспыхивает и испускает неконтролируемые всплески энергии, что может свидетельствовать о её экспериментальной природе. На одном из союзнических брифингов игрока предупреждают, что Хроносфера может давать «неожиданные побочные эффекты». Использование Хроносферы с вероятностью в 20 % создаёт визуальный эффект под названием «хроновихрь». Он летает по карте, по возможности уничтожая встречающиеся на его пути здания и юниты, пока не рассеется. Также использование Хроносферы имеет небольшую вероятность создания смертельного «временного землетрясения».

Хроносфера в данной игре вытесняет ядерное оружие, на которой зацикливались командиры как СССР, так и Союзников, и которую они считали необходимой для успеха войны. Сюжет поясняет, что Хроносфера способна изменить ход войны. Как и ядерное оружие, Хроносфера может быть построена только в том случае, если у игрока есть доступ к самому высокому «технологическому уровню» сооружений. Она стоит дорого и в различных одиночных миссиях является важной целью для уничтожения или захвата.

Британская исследовательница в области германистики и преподавательница Бирмингемского университета Регина Сейвальд пишет, что в Red Alert 2 «российская агрессия встречает науку в виде Хроносферы, разработанной Альбертом Эйнштейном, позволяющей союзным силам телепортировать войска за пределы Кремля и положить конец советскому господству».

По мнению исследователя Марка Джонсона, сооружение вместе с Железным занавесом является единственным в своём роде, несколько импровизированной, без стабильного пребывания людей, как в архитектуре других построек, а также, вероятно, предназначенной для его продажи и повторного развёртывания. Джонсон считает, что и Хроносфера, и Железный занавес сильно выделяются из окружающие их зданий времён Второй мировой войны, поскольку кажутся «хрупкими и экспериментальными», то есть новыми и непроверенными инновационными сооружениями, которые могут привести к тревожным или неизвестным результатам. Далее он пишет: «За несколько лет до Второй мировой войны и создания атомного оружия могла ли концепция <…> ненадолго перемещаться во времени на самом деле казаться среднему наблюдателю столь же неправдоподобной и в равной степени относящейся к сфере научной фантастики, как бомба, способная уничтожить целый город? Хотя два супероружия [Железный занавес и Хроносфера] в первую очередь незнакомы, различны и представляют собой разрыв с реальной историей в их визуальном стиле, Red Alert также позиционирует их как существующие в логике своей вымышленной вселенной».

Command & Conquer: Red Alert 2 (2000)

Сюжет

Кампания Союзников
Когда в начале Третьей мировой войны Советы вторглись в США, проект новой Хроносферы ещё не был запущен и не мог помочь Союзникам в войне против Советов. Однако Эйнштейн начал тайно работать в своей лаборатории в Шварцвальде над новой Хроносферой.

Однако в какой-то момент Советы узнали об экспериментах Эйнштейна и, зная, что хроносфера была одной из вещей, благодаря которым Союзники выиграли Вторую мировую войну, решили начать полномасштабное наступление на Германию, отправив три десантных отряда для уничтожения Германии. исключить всё присутствие Союзников в этом районе и устранить Эйнштейна. Командир-игрок Союзников лично позаботился об обороне лаборатории Эйнштейна и вынудил Советы отступить.

Вскоре после этого Эйнштейн наконец закончил работу над Хроносферой. Союзники понимали, что вторжение в СССР, как в предыдущей войне, будет очень затратным с точки зрения средств и живой силы, и поэтому они приняли решение начать хроновторжение прямо в Москву, чтобы быстро закончить войну. Но для этого Хроносфера должна была быть развернута в точном месте. Эйнштейну потребовалось некоторое время, чтобы найти его — это был небольшой остров во Флорида-Кис, который находился очень близко к советскому союзнику — Кубе. Операцией руководил тот же командир, который спас Эйнштейна в Германии. Затем Союзники узнали, что у Кубы есть три ядерных шахты, которые были готовы обстрелять США, но премьер-министр Советского Союза Романов решил использовать их на небольшой базе Союзников, чтобы уничтожить Хроносферу. Прежде чем самые мощные ракеты были загружены в шахты, командующему Союзников удалось телепортировать силы прямо за ними, положив конец ядерной угрозе.

Когда Хроносфера была в безопасности и готова к использованию, Союзники начали неожиданное хроновторжение в Москву, телепортировав войска в центр города, чтобы создать базу и захватить Кремль, где Романов командовал своими войсками. Командующему-игроку Союзниками также было разрешено построить Хроносферу в этом районе. С помощью этих двух орудий был окружен Кремль и взят в плен Романов.

Кампания СССР
Советский Союз одерживает победы над Союзниками. После их неудачной попытки разработать устройство управления погодой на Виргинских островах эффективное сопротивление Союзников советскому превосходству было ограничено Аляской. С поражением телепата Юрия и воссоединением СССР под руководством нового премьера Советы были готовы обратить своё безраздельное внимание на это единственное оставшееся препятствие на пути к окончательному триумфу коммунизма в мире. Файлы, извлеченные из скрытого архива в Кремле, сообщали о местонахождении Хроносферы в Пойнт-Хопе, что позволяло Союзникам нанести удар в любую точку планеты. Местонахождение этого последнего устройства было самым большим секретом Союзников. Тем не менее, Юрию каким-то образом удалось его обнаружить, но сообщить об этом остальным советским войскам не удалось. Советский командующий разгромил все силы Союзников в этом районе и ядерным ударом уничтожил Хроносферу, устранив последнее препятствие на пути к победе в войне.

Характеристика
В данной игре Союзники продолжают владеть Хроносферой, но теперь она может телепортировать до девяти единиц вместо одной, и пропало ограничение по времени на их транспортировку, что делает её на порядок более полезной. Кроме того, были устранены проблемы с «хроновихрем», однако устройство по-прежнему не могло напрямую телепортировать пехоту (хронолегионеры же выживут и будут мгновенно доставлены в указанное место).

Хроносфера может перемещать любые наземные и/или морские юниты на площади 3х3. Хотя нацелить эффект телепортации довольно сложно, все же можно телепортировать максимум 9 юнитов в чётко определённое место. В отличие от Железного занавеса, Хроносфера также является мощным наступательным оружием: телепортация морского юнита на сушу (или наоборот) уничтожает его, если только он не является амфибией.

Юниты нельзя телепортировать на непроходимую местность, такую как скалы, здания или области, перенаселённые объектами местности (такими как деревья и фонарные столбы), поскольку они мгновенно взрываются по прибытии. Такой способ обычно используется игроками в нападении, например, телепортируются вражеские юниты в воду (или корабли на землю, и те и те в обоих случаях мгновенно уничтожаются).

Хроносфера, по сравнению с Железным занавесом, обеспечивает быстрое перемещение и развертывание. В отличие от своей прошлой версии, она теперь выглядит «гладкой и утончённой». На основе технологии Хроносферы были созданые такие войска, как Хронолегионер и Хроношахтёр.

Command & Conquer: Yuri's Revenge (2001)

Сюжет

Кампания СССР
Когда Юрий появился со своей собственной армией и предъявил ультиматум президенту США Дугану, объяснив свой план по завоеванию мира с помощью своих Пси-доминаторов, президент приказал нанести воздушный удар по Пси-доминатору, расположенному на острове Алькатрас. Авиаудар не смог уничтожить доминатор, но повредил ядерный реактор, не позволив устройству выйти в сеть. Ситуация по-прежнему была критической, так как другие доминаторы были активированы, и мир вскоре должен был попасть под их контроль. Союзники быстро позвонили Эйнштейну, у которого был план остановить Юрия. Он сильно модифицировал одну из хроносфер в Сан-Франциско в машину времени.

Обнаружив устройство, Юрий быстро приказал своим войскам уничтожить его, но сильное сопротивление позволило Союзникам захватить различные гражданские электростанции в городе, чтобы запустить машину времени и вернуться в прошлое, когда Третья мировая война только начиналась. Хроносфера также несколько раз использовалась во время новой войны против Юрия, наиболее примечательным из которых был штурм последней цитадели Юрия в Антарктиде, где объединённые союзные и советские силы победили Юрия и уничтожили последни оставшийся Пси-доминатор.

Кампания Союзников
Вернувшись в прошлое, Советы уничтожили первое устройство и лабораторию Эйнштейна в Шварцвальде, чтобы предотвратить то, что могло бы привести к их поражению. Таким образом, Хроносфера отсутствует в остальной части кампании, даже в конце войны.

Характеристика
После Третьей мировой войны Хроносфера в арсенале Союзников никак не поменялась, так как считалась практически идеальным оружием. После поражения Советского Союза Союзникам казалось, что в её использовании больше нет необходимости, но они ошибались.

Command & Conquer: Red Alert 3 (2008)
Несмотря на то, что Советский Союз имел первоначальное преимущество во время войны, Союзникам удалось противостоять советскому натиску, используя различные новые виды вооружений и технологий, одной из которых была Хроносфера. Хроносфера, одно из многих передовых технических чудес, тайно разработанных специалистами FutureTech, представляла собой устройство для транспортировки материи, способное телепортировать группы транспортных средств из одной точки поля боя в другую. Хроносфера изначально вызывала споры, но оказалась мощным дополнением к арсеналу Союзников.

Хроносфера имеет множество потенциальных применений, наиболее очевидным из которых является телепортация ударной группы в тыл врага. Она также используется для быстрого перемещения более медленных юнитов, таких как сборочный цех (MCV), что полезно для создания базы вдалеке, и для спасения дорогих юнитов, таких как авианосцы, от уничтожения.

Поскольку наземные юниты мгновенно уничтожаются при телепортации в воду, а корабли уничтожаются при телепортации на сушу, устройство может использоваться для уничтожения сил противника таким образом с помощью их телепорта. Юниты также можно телепортировать прямо во вражеские строения, уничтожая их и повреждая указанные строения.

См. также

 Железный занавес (Command & Conquer: Red Alert)

Примечания

Литература

Ссылки

Вымышленные технические средства
Машина времени
Command & Conquer
Альберт Эйнштейн

redpajama_set_name: RedPajamaWikipedia


text:
Q: IllegalStateException i have a budget application and while im trying to get infromation out of my SQLite database i keep getting IllegalStateExpeaction error and i cant find out why. here is my code its at line Memos.add(i.getString(1)); that the error happens
public List<String> getMemo(List<String> expeances) {
            // TODO Auto-generated method stub
            List<String> Memos = new ArrayList<String>();
            for(String exp: expeances)
            {
                Cursor i = ourDatabase.query(DATABASE_TABLE4, new String[]{KEY_MEMO},KEY_DATE+" = '"+exp+"'", null, null, null, null,null);

                if(i.getCount()>0)
                {
                    if(i.moveToFirst())
                    {
                        do
                        {
                            Memos.add(i.getString(1));
                        }
                        while (i.moveToNext());
                    }
                }
            }

            if (Memos.size()>0)
            {
                return Memos;
            }
            else
            {
                return null;
            }
        }

here is my logcat
 12-05 10:49:46.058: E/AndroidRuntime(12980): FATAL EXCEPTION: main
        12-05 10:49:46.058: E/AndroidRuntime(12980): java.lang.RuntimeException: Unable to start activity ComponentInfo{budget.app/budget.app.ReviewBudget}: java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.os.Handler.dispatchMessage(Handler.java:99)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.os.Looper.loop(Looper.java:137)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread.main(ActivityThread.java:4745)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at java.lang.reflect.Method.invokeNative(Native Method)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at java.lang.reflect.Method.invoke(Method.java:511)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at dalvik.system.NativeStart.main(Native Method)
        12-05 10:49:46.058: E/AndroidRuntime(12980): Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.database.CursorWindow.nativeGetString(Native Method)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.database.CursorWindow.getString(CursorWindow.java:434)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at budget.app.BudgetDB.getMemo(BudgetDB.java:511)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at budget.app.ReviewBudget.loadSpinnerData(ReviewBudget.java:58)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at budget.app.ReviewBudget.onCreate(ReviewBudget.java:51)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.Activity.performCreate(Activity.java:5008)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
        12-05 10:49:46.058: E/AndroidRuntime(12980):    ... 11 more

A: Your Cursor projection has only one column KEY_MEMO
but you are trying to access second column with
i.getString(1)

use
i.getString(0)

instead

A: The cursor contains only one column .So use
Memos.add(i.getString(0));

redpajama_set_name: RedPajamaStackExchange


This chapter details the formation of Republican Rome's urban supply chains. As much of the city's material even in later periods derived from Italy, the geography of supply emphasizes the Mid-Republican period, when the first stages of imperial conquest allowed Roman access to Italian quarries, forests, mines, and so forth. This discussion also serves to introduce various building materials referred to throughout the volume. Alongside reviewing the evidence for the supplies of stone, terracotta, metal, and wood to urban construction, the chapter considers the role of the Republican state in acquiring and working territories that provided such resources.


Want your YouTube video intro to be really recognizable? Make sure you include your brand's signature colors. They can be the background, a filter, or the color of the font for your YouTube channel's name, or you can find other creative ways to incorporate them in the design.... 13/12/2011 · Can Someone Make Me a cool intro with exploding letters with exlposions in the background i want the letters to be white and the background to be black and with the theme song of "When I met you in the Summer" but with no singing.
I'm looking for someone who can make relatively good minecraft themed youtube intros. If you can do that then please contact me by replying in this forum or just pm me on youtube: youtube.com how to add links to seiko watch band Create stunning intros online using our free intro maker! Upload your logo, select the music, and get your intro in minutes. Get started for free! No downloads or credit card required Upload your logo, select the music, and get your intro in minutes.
Save yourself from hours of headaches and follow our step-by-step tutorial to making the perfect intro for YouTube instantly! Making an intro used to be a challenge, it shouldn't be. Making an intro used to be a challenge, it shouldn't be.
Download Intro Designer Lite - Create Intros for iMovie and enjoy it on your iPhone, iPad, and iPod touch. - More than 5 Million Downloads !!! - "This is a great little app that can help you create professional-looking intro videos for your creations.
Head over to Fiverr, and search using terms like " YouTube video intro " or " video intro ", and you will find many options to have a video intro created for your blog or brand. All you need to do is buy one creative gig, provide your brand logo .psd file and a tag line/message, and the creative folks at Fiverr will create your video within one week's time.
Want your YouTube video intro to be really recognizable? Make sure you include your brand's signature colors. They can be the background, a filter, or the color of the font for your YouTube channel's name, or you can find other creative ways to incorporate them in the design.
Create stunning intros online using our free intro maker! Upload your logo, select the music, and get your intro in minutes. Get started for free! No downloads or credit card required Upload your logo, select the music, and get your intro in minutes.


text:
Q: Paypal Subscription Next due date payment solution? I created a paypal subscription in my merchant account. But i have problem on next due date. it like this...
i created the paypal subscription on 14 jan 2013 and set one day trail period. (this is daily subscription)
In my paypal account subscription detail page it shows 15 jan 2013 as next due date. That is correct because i setup a one day trail period. i wait and see to get daily subscription in 15 jan 2013 (due date).
However payment is made on 16 jan 2013. Now i have problem..
I want to know if i setup a subscription rule in 2013/01/14 with one day trail period. So when i get first payment. is it beginning of day on 2013/01/15 or end of day on 2013/01/15
Thanks

A: PayPal attempts to collect recurring payments from subscribers on the day after the previous
billing cycle or trial period ends. Billing cycles can be daily, weekly, monthly or yearly,
depending on the terms of the original subscription.
So the first payment happens when they first subscribe, then the next payment occurs the day after the first subscription period runs out...
Any delay otherwise is probably processing time (it can take a little while for payments to clear...)
I'm guessing after you created your plan you tried it out by subscribing... so you paid on the 14th for a 1 day trial that was over on the 15th... then the next payment happens the day after that billing cycle (the 16th) when it charges for the next period.
Information taken from the paypal pdf here https://www.x.com/sites/default/files/pp_websitepaymentsstandard_integrationguide.pdf  Which I don't blame you for not finding... I had to download 2 pdfs before that one that kept telling me the document had moved and sent me to the next one until I finally got the right one.