id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
50,900 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.attach_internet_gateway | def attach_internet_gateway(self, internet_gateway_id, vpc_id):
"""
Attach an internet gateway to a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to a... | python | def attach_internet_gateway(self, internet_gateway_id, vpc_id):
"""
Attach an internet gateway to a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to a... | [
"def",
"attach_internet_gateway",
"(",
"self",
",",
"internet_gateway_id",
",",
"vpc_id",
")",
":",
"params",
"=",
"{",
"'InternetGatewayId'",
":",
"internet_gateway_id",
",",
"'VpcId'",
":",
"vpc_id",
"}",
"return",
"self",
".",
"get_status",
"(",
"'AttachInterne... | Attach an internet gateway to a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to attach to.
:rtype: Bool
:return: True if successful | [
"Attach",
"an",
"internet",
"gateway",
"to",
"a",
"specific",
"VPC",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L289-L307 |
50,901 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.detach_internet_gateway | def detach_internet_gateway(self, internet_gateway_id, vpc_id):
"""
Detach an internet gateway from a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to... | python | def detach_internet_gateway(self, internet_gateway_id, vpc_id):
"""
Detach an internet gateway from a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to... | [
"def",
"detach_internet_gateway",
"(",
"self",
",",
"internet_gateway_id",
",",
"vpc_id",
")",
":",
"params",
"=",
"{",
"'InternetGatewayId'",
":",
"internet_gateway_id",
",",
"'VpcId'",
":",
"vpc_id",
"}",
"return",
"self",
".",
"get_status",
"(",
"'DetachInterne... | Detach an internet gateway from a specific VPC.
:type internet_gateway_id: str
:param internet_gateway_id: The ID of the internet gateway to delete.
:type vpc_id: str
:param vpc_id: The ID of the VPC to attach to.
:rtype: Bool
:return: True if successful | [
"Detach",
"an",
"internet",
"gateway",
"from",
"a",
"specific",
"VPC",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L309-L327 |
50,902 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.get_all_customer_gateways | def get_all_customer_gateways(self, customer_gateway_ids=None, filters=None):
"""
Retrieve information about your CustomerGateways. You can filter results to
return information only about those CustomerGateways that match your search
parameters. Otherwise, all CustomerGateways associat... | python | def get_all_customer_gateways(self, customer_gateway_ids=None, filters=None):
"""
Retrieve information about your CustomerGateways. You can filter results to
return information only about those CustomerGateways that match your search
parameters. Otherwise, all CustomerGateways associat... | [
"def",
"get_all_customer_gateways",
"(",
"self",
",",
"customer_gateway_ids",
"=",
"None",
",",
"filters",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"customer_gateway_ids",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"customer_gateway_... | Retrieve information about your CustomerGateways. You can filter results to
return information only about those CustomerGateways that match your search
parameters. Otherwise, all CustomerGateways associated with your account
are returned.
:type customer_gateway_ids: list
:para... | [
"Retrieve",
"information",
"about",
"your",
"CustomerGateways",
".",
"You",
"can",
"filter",
"results",
"to",
"return",
"information",
"only",
"about",
"those",
"CustomerGateways",
"that",
"match",
"your",
"search",
"parameters",
".",
"Otherwise",
"all",
"CustomerGa... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L331-L364 |
50,903 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.create_customer_gateway | def create_customer_gateway(self, type, ip_address, bgp_asn):
"""
Create a new Customer Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type ip_address: str
:param ip_address: Internet-routable IP address for custom... | python | def create_customer_gateway(self, type, ip_address, bgp_asn):
"""
Create a new Customer Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type ip_address: str
:param ip_address: Internet-routable IP address for custom... | [
"def",
"create_customer_gateway",
"(",
"self",
",",
"type",
",",
"ip_address",
",",
"bgp_asn",
")",
":",
"params",
"=",
"{",
"'Type'",
":",
"type",
",",
"'IpAddress'",
":",
"ip_address",
",",
"'BgpAsn'",
":",
"bgp_asn",
"}",
"return",
"self",
".",
"get_obj... | Create a new Customer Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type ip_address: str
:param ip_address: Internet-routable IP address for customer's gateway.
Must be a static address.
:type ... | [
"Create",
"a",
"new",
"Customer",
"Gateway"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L366-L387 |
50,904 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.get_all_vpn_gateways | def get_all_vpn_gateways(self, vpn_gateway_ids=None, filters=None):
"""
Retrieve information about your VpnGateways. You can filter results to
return information only about those VpnGateways that match your search
parameters. Otherwise, all VpnGateways associated with your account
... | python | def get_all_vpn_gateways(self, vpn_gateway_ids=None, filters=None):
"""
Retrieve information about your VpnGateways. You can filter results to
return information only about those VpnGateways that match your search
parameters. Otherwise, all VpnGateways associated with your account
... | [
"def",
"get_all_vpn_gateways",
"(",
"self",
",",
"vpn_gateway_ids",
"=",
"None",
",",
"filters",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"vpn_gateway_ids",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"vpn_gateway_ids",
",",
"'Vpn... | Retrieve information about your VpnGateways. You can filter results to
return information only about those VpnGateways that match your search
parameters. Otherwise, all VpnGateways associated with your account
are returned.
:type vpn_gateway_ids: list
:param vpn_gateway_ids: A... | [
"Retrieve",
"information",
"about",
"your",
"VpnGateways",
".",
"You",
"can",
"filter",
"results",
"to",
"return",
"information",
"only",
"about",
"those",
"VpnGateways",
"that",
"match",
"your",
"search",
"parameters",
".",
"Otherwise",
"all",
"VpnGateways",
"ass... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L404-L437 |
50,905 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.create_vpn_gateway | def create_vpn_gateway(self, type, availability_zone=None):
"""
Create a new Vpn Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type availability_zone: str
:param availability_zone: The Availability Zone where you ... | python | def create_vpn_gateway(self, type, availability_zone=None):
"""
Create a new Vpn Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type availability_zone: str
:param availability_zone: The Availability Zone where you ... | [
"def",
"create_vpn_gateway",
"(",
"self",
",",
"type",
",",
"availability_zone",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'Type'",
":",
"type",
"}",
"if",
"availability_zone",
":",
"params",
"[",
"'AvailabilityZone'",
"]",
"=",
"availability_zone",
"return"... | Create a new Vpn Gateway
:type type: str
:param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1'
:type availability_zone: str
:param availability_zone: The Availability Zone where you want the VPN gateway.
:rtype: The newly created VpnGateway
:ret... | [
"Create",
"a",
"new",
"Vpn",
"Gateway"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L439-L455 |
50,906 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.attach_vpn_gateway | def attach_vpn_gateway(self, vpn_gateway_id, vpc_id):
"""
Attaches a VPN gateway to a VPC.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to attach
:type vpc_id: str
:param vpc_id: The ID of the VPC you want to attach the gateway to.
... | python | def attach_vpn_gateway(self, vpn_gateway_id, vpc_id):
"""
Attaches a VPN gateway to a VPC.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to attach
:type vpc_id: str
:param vpc_id: The ID of the VPC you want to attach the gateway to.
... | [
"def",
"attach_vpn_gateway",
"(",
"self",
",",
"vpn_gateway_id",
",",
"vpc_id",
")",
":",
"params",
"=",
"{",
"'VpnGatewayId'",
":",
"vpn_gateway_id",
",",
"'VpcId'",
":",
"vpc_id",
"}",
"return",
"self",
".",
"get_object",
"(",
"'AttachVpnGateway'",
",",
"par... | Attaches a VPN gateway to a VPC.
:type vpn_gateway_id: str
:param vpn_gateway_id: The ID of the vpn_gateway to attach
:type vpc_id: str
:param vpc_id: The ID of the VPC you want to attach the gateway to.
:rtype: An attachment
:return: a :class:`boto.vpc.vpngateway.Atta... | [
"Attaches",
"a",
"VPN",
"gateway",
"to",
"a",
"VPC",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L470-L485 |
50,907 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.get_all_subnets | def get_all_subnets(self, subnet_ids=None, filters=None):
"""
Retrieve information about your Subnets. You can filter results to
return information only about those Subnets that match your search
parameters. Otherwise, all Subnets associated with your account
are returned.
... | python | def get_all_subnets(self, subnet_ids=None, filters=None):
"""
Retrieve information about your Subnets. You can filter results to
return information only about those Subnets that match your search
parameters. Otherwise, all Subnets associated with your account
are returned.
... | [
"def",
"get_all_subnets",
"(",
"self",
",",
"subnet_ids",
"=",
"None",
",",
"filters",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"subnet_ids",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"subnet_ids",
",",
"'SubnetId'",
")",
"i... | Retrieve information about your Subnets. You can filter results to
return information only about those Subnets that match your search
parameters. Otherwise, all Subnets associated with your account
are returned.
:type subnet_ids: list
:param subnet_ids: A list of strings with ... | [
"Retrieve",
"information",
"about",
"your",
"Subnets",
".",
"You",
"can",
"filter",
"results",
"to",
"return",
"information",
"only",
"about",
"those",
"Subnets",
"that",
"match",
"your",
"search",
"parameters",
".",
"Otherwise",
"all",
"Subnets",
"associated",
... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L489-L524 |
50,908 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.create_subnet | def create_subnet(self, vpc_id, cidr_block, availability_zone=None):
"""
Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
... | python | def create_subnet(self, vpc_id, cidr_block, availability_zone=None):
"""
Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
... | [
"def",
"create_subnet",
"(",
"self",
",",
"vpc_id",
",",
"cidr_block",
",",
"availability_zone",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'VpcId'",
":",
"vpc_id",
",",
"'CidrBlock'",
":",
"cidr_block",
"}",
"if",
"availability_zone",
":",
"params",
"[",
... | Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
:type availability_zone: str
:param availability_zone: The AZ you want the ... | [
"Create",
"a",
"new",
"Subnet"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L526-L546 |
50,909 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.get_all_dhcp_options | def get_all_dhcp_options(self, dhcp_options_ids=None):
"""
Retrieve information about your DhcpOptions.
:type dhcp_options_ids: list
:param dhcp_options_ids: A list of strings with the desired DhcpOption ID's
:rtype: list
:return: A list of :class:`boto.vpc.dhcpoptions.... | python | def get_all_dhcp_options(self, dhcp_options_ids=None):
"""
Retrieve information about your DhcpOptions.
:type dhcp_options_ids: list
:param dhcp_options_ids: A list of strings with the desired DhcpOption ID's
:rtype: list
:return: A list of :class:`boto.vpc.dhcpoptions.... | [
"def",
"get_all_dhcp_options",
"(",
"self",
",",
"dhcp_options_ids",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"dhcp_options_ids",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"dhcp_options_ids",
",",
"'DhcpOptionsId'",
")",
"return",
... | Retrieve information about your DhcpOptions.
:type dhcp_options_ids: list
:param dhcp_options_ids: A list of strings with the desired DhcpOption ID's
:rtype: list
:return: A list of :class:`boto.vpc.dhcpoptions.DhcpOptions` | [
"Retrieve",
"information",
"about",
"your",
"DhcpOptions",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L564-L577 |
50,910 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.create_dhcp_options | def create_dhcp_options(self, vpc_id, cidr_block, availability_zone=None):
"""
Create a new DhcpOption
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to ... | python | def create_dhcp_options(self, vpc_id, cidr_block, availability_zone=None):
"""
Create a new DhcpOption
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to ... | [
"def",
"create_dhcp_options",
"(",
"self",
",",
"vpc_id",
",",
"cidr_block",
",",
"availability_zone",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'VpcId'",
":",
"vpc_id",
",",
"'CidrBlock'",
":",
"cidr_block",
"}",
"if",
"availability_zone",
":",
"params",
... | Create a new DhcpOption
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
:type availability_zone: str
:param availability_zone: The AZ you want ... | [
"Create",
"a",
"new",
"DhcpOption"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L579-L599 |
50,911 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.associate_dhcp_options | def associate_dhcp_options(self, dhcp_options_id, vpc_id):
"""
Associate a set of Dhcp Options with a VPC.
:type dhcp_options_id: str
:param dhcp_options_id: The ID of the Dhcp Options
:type vpc_id: str
:param vpc_id: The ID of the VPC.
:rtype: bool
:re... | python | def associate_dhcp_options(self, dhcp_options_id, vpc_id):
"""
Associate a set of Dhcp Options with a VPC.
:type dhcp_options_id: str
:param dhcp_options_id: The ID of the Dhcp Options
:type vpc_id: str
:param vpc_id: The ID of the VPC.
:rtype: bool
:re... | [
"def",
"associate_dhcp_options",
"(",
"self",
",",
"dhcp_options_id",
",",
"vpc_id",
")",
":",
"params",
"=",
"{",
"'DhcpOptionsId'",
":",
"dhcp_options_id",
",",
"'VpcId'",
":",
"vpc_id",
"}",
"return",
"self",
".",
"get_status",
"(",
"'AssociateDhcpOptions'",
... | Associate a set of Dhcp Options with a VPC.
:type dhcp_options_id: str
:param dhcp_options_id: The ID of the Dhcp Options
:type vpc_id: str
:param vpc_id: The ID of the VPC.
:rtype: bool
:return: True if successful | [
"Associate",
"a",
"set",
"of",
"Dhcp",
"Options",
"with",
"a",
"VPC",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L614-L629 |
50,912 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.get_all_vpn_connections | def get_all_vpn_connections(self, vpn_connection_ids=None, filters=None):
"""
Retrieve information about your VPN_CONNECTIONs. You can filter results to
return information only about those VPN_CONNECTIONs that match your search
parameters. Otherwise, all VPN_CONNECTIONs associated with... | python | def get_all_vpn_connections(self, vpn_connection_ids=None, filters=None):
"""
Retrieve information about your VPN_CONNECTIONs. You can filter results to
return information only about those VPN_CONNECTIONs that match your search
parameters. Otherwise, all VPN_CONNECTIONs associated with... | [
"def",
"get_all_vpn_connections",
"(",
"self",
",",
"vpn_connection_ids",
"=",
"None",
",",
"filters",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"vpn_connection_ids",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"vpn_connection_ids",
... | Retrieve information about your VPN_CONNECTIONs. You can filter results to
return information only about those VPN_CONNECTIONs that match your search
parameters. Otherwise, all VPN_CONNECTIONs associated with your account
are returned.
:type vpn_connection_ids: list
:param vpn... | [
"Retrieve",
"information",
"about",
"your",
"VPN_CONNECTIONs",
".",
"You",
"can",
"filter",
"results",
"to",
"return",
"information",
"only",
"about",
"those",
"VPN_CONNECTIONs",
"that",
"match",
"your",
"search",
"parameters",
".",
"Otherwise",
"all",
"VPN_CONNECTI... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L633-L668 |
50,913 | yyuu/botornado | boto/vpc/__init__.py | VPCConnection.create_vpn_connection | def create_vpn_connection(self, type, customer_gateway_id, vpn_gateway_id):
"""
Create a new VPN Connection.
:type type: str
:param type: The type of VPN Connection. Currently only 'ipsec.1'
is supported
:type customer_gateway_id: str
:param custom... | python | def create_vpn_connection(self, type, customer_gateway_id, vpn_gateway_id):
"""
Create a new VPN Connection.
:type type: str
:param type: The type of VPN Connection. Currently only 'ipsec.1'
is supported
:type customer_gateway_id: str
:param custom... | [
"def",
"create_vpn_connection",
"(",
"self",
",",
"type",
",",
"customer_gateway_id",
",",
"vpn_gateway_id",
")",
":",
"params",
"=",
"{",
"'Type'",
":",
"type",
",",
"'CustomerGatewayId'",
":",
"customer_gateway_id",
",",
"'VpnGatewayId'",
":",
"vpn_gateway_id",
... | Create a new VPN Connection.
:type type: str
:param type: The type of VPN Connection. Currently only 'ipsec.1'
is supported
:type customer_gateway_id: str
:param customer_gateway_id: The ID of the customer gateway.
:type vpn_gateway_id: str
:param... | [
"Create",
"a",
"new",
"VPN",
"Connection",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/vpc/__init__.py#L670-L690 |
50,914 | yyuu/botornado | boto/s3/resumable_download_handler.py | get_cur_file_size | def get_cur_file_size(fp, position_to_eof=False):
"""
Returns size of file, optionally leaving fp positioned at EOF.
"""
if not position_to_eof:
cur_pos = fp.tell()
fp.seek(0, os.SEEK_END)
cur_file_size = fp.tell()
if not position_to_eof:
fp.seek(cur_pos, os.SEEK_SET)
ret... | python | def get_cur_file_size(fp, position_to_eof=False):
"""
Returns size of file, optionally leaving fp positioned at EOF.
"""
if not position_to_eof:
cur_pos = fp.tell()
fp.seek(0, os.SEEK_END)
cur_file_size = fp.tell()
if not position_to_eof:
fp.seek(cur_pos, os.SEEK_SET)
ret... | [
"def",
"get_cur_file_size",
"(",
"fp",
",",
"position_to_eof",
"=",
"False",
")",
":",
"if",
"not",
"position_to_eof",
":",
"cur_pos",
"=",
"fp",
".",
"tell",
"(",
")",
"fp",
".",
"seek",
"(",
"0",
",",
"os",
".",
"SEEK_END",
")",
"cur_file_size",
"=",... | Returns size of file, optionally leaving fp positioned at EOF. | [
"Returns",
"size",
"of",
"file",
"optionally",
"leaving",
"fp",
"positioned",
"at",
"EOF",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/s3/resumable_download_handler.py#L71-L81 |
50,915 | yyuu/botornado | boto/s3/resumable_download_handler.py | ResumableDownloadHandler._attempt_resumable_download | def _attempt_resumable_download(self, key, fp, headers, cb, num_cb,
torrent, version_id):
"""
Attempts a resumable download.
Raises ResumableDownloadException if any problems occur.
"""
cur_file_size = get_cur_file_size(fp, position_to_eof=Tru... | python | def _attempt_resumable_download(self, key, fp, headers, cb, num_cb,
torrent, version_id):
"""
Attempts a resumable download.
Raises ResumableDownloadException if any problems occur.
"""
cur_file_size = get_cur_file_size(fp, position_to_eof=Tru... | [
"def",
"_attempt_resumable_download",
"(",
"self",
",",
"key",
",",
"fp",
",",
"headers",
",",
"cb",
",",
"num_cb",
",",
"torrent",
",",
"version_id",
")",
":",
"cur_file_size",
"=",
"get_cur_file_size",
"(",
"fp",
",",
"position_to_eof",
"=",
"True",
")",
... | Attempts a resumable download.
Raises ResumableDownloadException if any problems occur. | [
"Attempts",
"a",
"resumable",
"download",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/s3/resumable_download_handler.py#L171-L213 |
50,916 | mishbahr/django-connected | connected_accounts/providers/base.py | BaseOAuthProvider.get_redirect_url | def get_redirect_url(self, request, callback, parameters=None):
"""Build authentication redirect url."""
args = self.get_redirect_args(request, callback=callback)
additional = parameters or {}
args.update(additional)
params = urlencode(args)
return '{0}?{1}'.format(self.a... | python | def get_redirect_url(self, request, callback, parameters=None):
"""Build authentication redirect url."""
args = self.get_redirect_args(request, callback=callback)
additional = parameters or {}
args.update(additional)
params = urlencode(args)
return '{0}?{1}'.format(self.a... | [
"def",
"get_redirect_url",
"(",
"self",
",",
"request",
",",
"callback",
",",
"parameters",
"=",
"None",
")",
":",
"args",
"=",
"self",
".",
"get_redirect_args",
"(",
"request",
",",
"callback",
"=",
"callback",
")",
"additional",
"=",
"parameters",
"or",
... | Build authentication redirect url. | [
"Build",
"authentication",
"redirect",
"url",
"."
] | 7ec1f042786fef2eb6c00b1479ce47c90341ba81 | https://github.com/mishbahr/django-connected/blob/7ec1f042786fef2eb6c00b1479ce47c90341ba81/connected_accounts/providers/base.py#L88-L94 |
50,917 | mishbahr/django-connected | connected_accounts/providers/base.py | OAuthProvider.get_request_token | def get_request_token(self, request, callback):
"""Fetch the OAuth request token. Only required for OAuth 1.0."""
callback = force_text(request.build_absolute_uri(callback))
try:
response = self.request('post', self.request_token_url, oauth_callback=callback)
response.rai... | python | def get_request_token(self, request, callback):
"""Fetch the OAuth request token. Only required for OAuth 1.0."""
callback = force_text(request.build_absolute_uri(callback))
try:
response = self.request('post', self.request_token_url, oauth_callback=callback)
response.rai... | [
"def",
"get_request_token",
"(",
"self",
",",
"request",
",",
"callback",
")",
":",
"callback",
"=",
"force_text",
"(",
"request",
".",
"build_absolute_uri",
"(",
"callback",
")",
")",
"try",
":",
"response",
"=",
"self",
".",
"request",
"(",
"'post'",
","... | Fetch the OAuth request token. Only required for OAuth 1.0. | [
"Fetch",
"the",
"OAuth",
"request",
"token",
".",
"Only",
"required",
"for",
"OAuth",
"1",
".",
"0",
"."
] | 7ec1f042786fef2eb6c00b1479ce47c90341ba81 | https://github.com/mishbahr/django-connected/blob/7ec1f042786fef2eb6c00b1479ce47c90341ba81/connected_accounts/providers/base.py#L152-L162 |
50,918 | Trebek/pydealer | pydealer/tools.py | build_cards | def build_cards(jokers=False, num_jokers=0):
"""
Builds a list containing a full French deck of 52 Card instances. The
cards are sorted according to ``DEFAULT_RANKS``.
.. note:
Adding jokers may break some functions & methods at the moment.
:arg bool jokers:
Whether or not to inclu... | python | def build_cards(jokers=False, num_jokers=0):
"""
Builds a list containing a full French deck of 52 Card instances. The
cards are sorted according to ``DEFAULT_RANKS``.
.. note:
Adding jokers may break some functions & methods at the moment.
:arg bool jokers:
Whether or not to inclu... | [
"def",
"build_cards",
"(",
"jokers",
"=",
"False",
",",
"num_jokers",
"=",
"0",
")",
":",
"new_deck",
"=",
"[",
"]",
"if",
"jokers",
":",
"new_deck",
"+=",
"[",
"Card",
"(",
"\"Joker\"",
",",
"None",
")",
"for",
"i",
"in",
"xrange",
"(",
"num_jokers"... | Builds a list containing a full French deck of 52 Card instances. The
cards are sorted according to ``DEFAULT_RANKS``.
.. note:
Adding jokers may break some functions & methods at the moment.
:arg bool jokers:
Whether or not to include jokers in the deck.
:arg int num_jokers:
T... | [
"Builds",
"a",
"list",
"containing",
"a",
"full",
"French",
"deck",
"of",
"52",
"Card",
"instances",
".",
"The",
"cards",
"are",
"sorted",
"according",
"to",
"DEFAULT_RANKS",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L43-L67 |
50,919 | Trebek/pydealer | pydealer/tools.py | check_sorted | def check_sorted(cards, ranks=None):
"""
Checks whether the given cards are sorted by the given ranks.
:arg cards:
The cards to check. Can be a ``Stack``, ``Deck``, or ``list`` of
``Card`` isntances.
:arg dict ranks:
The ranks to check against. Default is DEFAULT_RANKS.
:re... | python | def check_sorted(cards, ranks=None):
"""
Checks whether the given cards are sorted by the given ranks.
:arg cards:
The cards to check. Can be a ``Stack``, ``Deck``, or ``list`` of
``Card`` isntances.
:arg dict ranks:
The ranks to check against. Default is DEFAULT_RANKS.
:re... | [
"def",
"check_sorted",
"(",
"cards",
",",
"ranks",
"=",
"None",
")",
":",
"ranks",
"=",
"ranks",
"or",
"DEFAULT_RANKS",
"sorted_cards",
"=",
"sort_cards",
"(",
"cards",
",",
"ranks",
")",
"if",
"cards",
"==",
"sorted_cards",
"or",
"cards",
"[",
":",
":",... | Checks whether the given cards are sorted by the given ranks.
:arg cards:
The cards to check. Can be a ``Stack``, ``Deck``, or ``list`` of
``Card`` isntances.
:arg dict ranks:
The ranks to check against. Default is DEFAULT_RANKS.
:returns:
``True`` or ``False``. | [
"Checks",
"whether",
"the",
"given",
"cards",
"are",
"sorted",
"by",
"the",
"given",
"ranks",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L70-L91 |
50,920 | Trebek/pydealer | pydealer/tools.py | check_term | def check_term(card, term):
"""
Checks a given search term against a given card's full name, suit,
value, and abbreviation.
:arg Card card:
The card to check.
:arg str term:
The search term to check for. Can be a card full name, suit,
value, or abbreviation.
:returns:
... | python | def check_term(card, term):
"""
Checks a given search term against a given card's full name, suit,
value, and abbreviation.
:arg Card card:
The card to check.
:arg str term:
The search term to check for. Can be a card full name, suit,
value, or abbreviation.
:returns:
... | [
"def",
"check_term",
"(",
"card",
",",
"term",
")",
":",
"check_list",
"=",
"[",
"x",
".",
"lower",
"(",
")",
"for",
"x",
"in",
"[",
"card",
".",
"name",
",",
"card",
".",
"suit",
",",
"card",
".",
"value",
",",
"card",
".",
"abbrev",
",",
"car... | Checks a given search term against a given card's full name, suit,
value, and abbreviation.
:arg Card card:
The card to check.
:arg str term:
The search term to check for. Can be a card full name, suit,
value, or abbreviation.
:returns:
``True`` or ``False``. | [
"Checks",
"a",
"given",
"search",
"term",
"against",
"a",
"given",
"card",
"s",
"full",
"name",
"suit",
"value",
"and",
"abbreviation",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L94-L120 |
50,921 | Trebek/pydealer | pydealer/tools.py | open_cards | def open_cards(filename=None):
"""
Open cards from a txt file.
:arg str filename:
The filename of the deck file to open. If no filename given,
defaults to "cards-YYYYMMDD.txt", where "YYYYMMDD" is the year, month,
and day. For example, "cards-20140711.txt".
:returns:
Th... | python | def open_cards(filename=None):
"""
Open cards from a txt file.
:arg str filename:
The filename of the deck file to open. If no filename given,
defaults to "cards-YYYYMMDD.txt", where "YYYYMMDD" is the year, month,
and day. For example, "cards-20140711.txt".
:returns:
Th... | [
"def",
"open_cards",
"(",
"filename",
"=",
"None",
")",
":",
"filename",
"=",
"filename",
"or",
"\"cards-%s.txt\"",
"%",
"(",
"time",
".",
"strftime",
"(",
"\"%Y%m%d\"",
")",
")",
"with",
"open",
"(",
"filename",
",",
"\"r\"",
")",
"as",
"deck_file",
":"... | Open cards from a txt file.
:arg str filename:
The filename of the deck file to open. If no filename given,
defaults to "cards-YYYYMMDD.txt", where "YYYYMMDD" is the year, month,
and day. For example, "cards-20140711.txt".
:returns:
The opened cards, as a list. | [
"Open",
"cards",
"from",
"a",
"txt",
"file",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L331-L355 |
50,922 | Trebek/pydealer | pydealer/tools.py | random_card | def random_card(cards, remove=False):
"""
Returns a random card from the Stack. If ``remove=True``, it will
also remove the card from the deck.
:arg bool remove:
Whether or not to remove the card from the deck.
:returns:
A random Card object, from the Stack.
"""
if not rem... | python | def random_card(cards, remove=False):
"""
Returns a random card from the Stack. If ``remove=True``, it will
also remove the card from the deck.
:arg bool remove:
Whether or not to remove the card from the deck.
:returns:
A random Card object, from the Stack.
"""
if not rem... | [
"def",
"random_card",
"(",
"cards",
",",
"remove",
"=",
"False",
")",
":",
"if",
"not",
"remove",
":",
"return",
"random",
".",
"choice",
"(",
"cards",
")",
"else",
":",
"i",
"=",
"random",
".",
"randrange",
"(",
"len",
"(",
"cards",
")",
")",
"car... | Returns a random card from the Stack. If ``remove=True``, it will
also remove the card from the deck.
:arg bool remove:
Whether or not to remove the card from the deck.
:returns:
A random Card object, from the Stack. | [
"Returns",
"a",
"random",
"card",
"from",
"the",
"Stack",
".",
"If",
"remove",
"=",
"True",
"it",
"will",
"also",
"remove",
"the",
"card",
"from",
"the",
"deck",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L358-L376 |
50,923 | Trebek/pydealer | pydealer/tools.py | save_cards | def save_cards(cards, filename=None):
"""
Save the given cards, in plain text, to a txt file.
:arg cards:
The cards to save. Can be a ``Stack``, ``Deck``, or ``list``.
:arg str filename:
The filename to use for the cards file. If no filename given,
defaults to "cards-YYYYMMDD.tx... | python | def save_cards(cards, filename=None):
"""
Save the given cards, in plain text, to a txt file.
:arg cards:
The cards to save. Can be a ``Stack``, ``Deck``, or ``list``.
:arg str filename:
The filename to use for the cards file. If no filename given,
defaults to "cards-YYYYMMDD.tx... | [
"def",
"save_cards",
"(",
"cards",
",",
"filename",
"=",
"None",
")",
":",
"filename",
"=",
"filename",
"or",
"\"cards-%s.txt\"",
"%",
"(",
"time",
".",
"strftime",
"(",
"\"%Y%m%d\"",
")",
")",
"with",
"open",
"(",
"filename",
",",
"\"w\"",
")",
"as",
... | Save the given cards, in plain text, to a txt file.
:arg cards:
The cards to save. Can be a ``Stack``, ``Deck``, or ``list``.
:arg str filename:
The filename to use for the cards file. If no filename given,
defaults to "cards-YYYYMMDD.txt", where "YYYYMMDD" is the year, month,
a... | [
"Save",
"the",
"given",
"cards",
"in",
"plain",
"text",
"to",
"a",
"txt",
"file",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L379-L397 |
50,924 | Trebek/pydealer | pydealer/tools.py | sort_card_indices | def sort_card_indices(cards, indices, ranks=None):
"""
Sorts the given Deck indices by the given ranks. Must also supply the
``Stack``, ``Deck``, or ``list`` that the indices are from.
:arg cards:
The cards the indices are from. Can be a ``Stack``, ``Deck``, or
``list``
:arg list in... | python | def sort_card_indices(cards, indices, ranks=None):
"""
Sorts the given Deck indices by the given ranks. Must also supply the
``Stack``, ``Deck``, or ``list`` that the indices are from.
:arg cards:
The cards the indices are from. Can be a ``Stack``, ``Deck``, or
``list``
:arg list in... | [
"def",
"sort_card_indices",
"(",
"cards",
",",
"indices",
",",
"ranks",
"=",
"None",
")",
":",
"ranks",
"=",
"ranks",
"or",
"DEFAULT_RANKS",
"if",
"ranks",
".",
"get",
"(",
"\"suits\"",
")",
":",
"indices",
"=",
"sorted",
"(",
"indices",
",",
"key",
"=... | Sorts the given Deck indices by the given ranks. Must also supply the
``Stack``, ``Deck``, or ``list`` that the indices are from.
:arg cards:
The cards the indices are from. Can be a ``Stack``, ``Deck``, or
``list``
:arg list indices:
The indices to sort.
:arg dict ranks:
... | [
"Sorts",
"the",
"given",
"Deck",
"indices",
"by",
"the",
"given",
"ranks",
".",
"Must",
"also",
"supply",
"the",
"Stack",
"Deck",
"or",
"list",
"that",
"the",
"indices",
"are",
"from",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L400-L432 |
50,925 | Trebek/pydealer | pydealer/tools.py | sort_cards | def sort_cards(cards, ranks=None):
"""
Sorts a given list of cards, either by poker ranks, or big two ranks.
:arg cards:
The cards to sort.
:arg dict ranks:
The rank dict to reference for sorting. If ``None``, it will
default to ``DEFAULT_RANKS``.
:returns:
The sort... | python | def sort_cards(cards, ranks=None):
"""
Sorts a given list of cards, either by poker ranks, or big two ranks.
:arg cards:
The cards to sort.
:arg dict ranks:
The rank dict to reference for sorting. If ``None``, it will
default to ``DEFAULT_RANKS``.
:returns:
The sort... | [
"def",
"sort_cards",
"(",
"cards",
",",
"ranks",
"=",
"None",
")",
":",
"ranks",
"=",
"ranks",
"or",
"DEFAULT_RANKS",
"if",
"ranks",
".",
"get",
"(",
"\"suits\"",
")",
":",
"cards",
"=",
"sorted",
"(",
"cards",
",",
"key",
"=",
"lambda",
"x",
":",
... | Sorts a given list of cards, either by poker ranks, or big two ranks.
:arg cards:
The cards to sort.
:arg dict ranks:
The rank dict to reference for sorting. If ``None``, it will
default to ``DEFAULT_RANKS``.
:returns:
The sorted cards. | [
"Sorts",
"a",
"given",
"list",
"of",
"cards",
"either",
"by",
"poker",
"ranks",
"or",
"big",
"two",
"ranks",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/tools.py#L435-L462 |
50,926 | yyuu/botornado | boto/sdb/db/manager/sdbmanager.py | SDBConverter.decode_map_element | def decode_map_element(self, item_type, value):
"""Decode a single element for a map"""
import urllib
key = value
if ":" in value:
key, value = value.split(':',1)
key = urllib.unquote(key)
if Model in item_type.mro():
value = item_type(id=value... | python | def decode_map_element(self, item_type, value):
"""Decode a single element for a map"""
import urllib
key = value
if ":" in value:
key, value = value.split(':',1)
key = urllib.unquote(key)
if Model in item_type.mro():
value = item_type(id=value... | [
"def",
"decode_map_element",
"(",
"self",
",",
"item_type",
",",
"value",
")",
":",
"import",
"urllib",
"key",
"=",
"value",
"if",
"\":\"",
"in",
"value",
":",
"key",
",",
"value",
"=",
"value",
".",
"split",
"(",
"':'",
",",
"1",
")",
"key",
"=",
... | Decode a single element for a map | [
"Decode",
"a",
"single",
"element",
"for",
"a",
"map"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/db/manager/sdbmanager.py#L150-L161 |
50,927 | yyuu/botornado | boto/sdb/db/manager/sdbmanager.py | SDBConverter.encode_string | def encode_string(self, value):
"""Convert ASCII, Latin-1 or UTF-8 to pure Unicode"""
if not isinstance(value, str): return value
try:
return unicode(value, 'utf-8')
except: # really, this should throw an exception.
# in the interest of not breaking current
... | python | def encode_string(self, value):
"""Convert ASCII, Latin-1 or UTF-8 to pure Unicode"""
if not isinstance(value, str): return value
try:
return unicode(value, 'utf-8')
except: # really, this should throw an exception.
# in the interest of not breaking current
... | [
"def",
"encode_string",
"(",
"self",
",",
"value",
")",
":",
"if",
"not",
"isinstance",
"(",
"value",
",",
"str",
")",
":",
"return",
"value",
"try",
":",
"return",
"unicode",
"(",
"value",
",",
"'utf-8'",
")",
"except",
":",
"# really, this should throw a... | Convert ASCII, Latin-1 or UTF-8 to pure Unicode | [
"Convert",
"ASCII",
"Latin",
"-",
"1",
"or",
"UTF",
"-",
"8",
"to",
"pure",
"Unicode"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/db/manager/sdbmanager.py#L356-L367 |
50,928 | yyuu/botornado | boto/sdb/db/manager/sdbmanager.py | SDBManager.count | def count(self, cls, filters, quick=True, sort_by=None, select=None):
"""
Get the number of results that would
be returned in this query
"""
query = "select count(*) from `%s` %s" % (self.domain.name, self._build_filter_part(cls, filters, sort_by, select))
count = 0
... | python | def count(self, cls, filters, quick=True, sort_by=None, select=None):
"""
Get the number of results that would
be returned in this query
"""
query = "select count(*) from `%s` %s" % (self.domain.name, self._build_filter_part(cls, filters, sort_by, select))
count = 0
... | [
"def",
"count",
"(",
"self",
",",
"cls",
",",
"filters",
",",
"quick",
"=",
"True",
",",
"sort_by",
"=",
"None",
",",
"select",
"=",
"None",
")",
":",
"query",
"=",
"\"select count(*) from `%s` %s\"",
"%",
"(",
"self",
".",
"domain",
".",
"name",
",",
... | Get the number of results that would
be returned in this query | [
"Get",
"the",
"number",
"of",
"results",
"that",
"would",
"be",
"returned",
"in",
"this",
"query"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/db/manager/sdbmanager.py#L503-L514 |
50,929 | yyuu/botornado | boto/sdb/db/manager/sdbmanager.py | SDBManager._get_all_decendents | def _get_all_decendents(self, cls):
"""Get all decendents for a given class"""
decendents = {}
for sc in cls.__sub_classes__:
decendents[sc.__name__] = sc
decendents.update(self._get_all_decendents(sc))
return decendents | python | def _get_all_decendents(self, cls):
"""Get all decendents for a given class"""
decendents = {}
for sc in cls.__sub_classes__:
decendents[sc.__name__] = sc
decendents.update(self._get_all_decendents(sc))
return decendents | [
"def",
"_get_all_decendents",
"(",
"self",
",",
"cls",
")",
":",
"decendents",
"=",
"{",
"}",
"for",
"sc",
"in",
"cls",
".",
"__sub_classes__",
":",
"decendents",
"[",
"sc",
".",
"__name__",
"]",
"=",
"sc",
"decendents",
".",
"update",
"(",
"self",
"."... | Get all decendents for a given class | [
"Get",
"all",
"decendents",
"for",
"a",
"given",
"class"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/db/manager/sdbmanager.py#L620-L626 |
50,930 | yyuu/botornado | boto/ec2/snapshot.py | Snapshot.update | def update(self, validate=False):
"""
Update the data associated with this snapshot by querying EC2.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
snapshot the update method returns quietly. If
the v... | python | def update(self, validate=False):
"""
Update the data associated with this snapshot by querying EC2.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
snapshot the update method returns quietly. If
the v... | [
"def",
"update",
"(",
"self",
",",
"validate",
"=",
"False",
")",
":",
"rs",
"=",
"self",
".",
"connection",
".",
"get_all_snapshots",
"(",
"[",
"self",
".",
"id",
"]",
")",
"if",
"len",
"(",
"rs",
")",
">",
"0",
":",
"self",
".",
"_update",
"(",... | Update the data associated with this snapshot by querying EC2.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
snapshot the update method returns quietly. If
the validate param is True, however, it will
... | [
"Update",
"the",
"data",
"associated",
"with",
"this",
"snapshot",
"by",
"querying",
"EC2",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/snapshot.py#L71-L87 |
50,931 | Trebek/pydealer | pydealer/card.py | Card.ne | def ne(self, other, ranks=None):
"""
Compares the card against another card, ``other``, and checks whether
the card is not equal to ``other``, based on the given rank dict.
:arg Card other:
The second Card to compare.
:arg dict ranks:
The ranks to refer t... | python | def ne(self, other, ranks=None):
"""
Compares the card against another card, ``other``, and checks whether
the card is not equal to ``other``, based on the given rank dict.
:arg Card other:
The second Card to compare.
:arg dict ranks:
The ranks to refer t... | [
"def",
"ne",
"(",
"self",
",",
"other",
",",
"ranks",
"=",
"None",
")",
":",
"ranks",
"=",
"ranks",
"or",
"DEFAULT_RANKS",
"if",
"isinstance",
"(",
"other",
",",
"Card",
")",
":",
"if",
"ranks",
".",
"get",
"(",
"\"suits\"",
")",
":",
"return",
"("... | Compares the card against another card, ``other``, and checks whether
the card is not equal to ``other``, based on the given rank dict.
:arg Card other:
The second Card to compare.
:arg dict ranks:
The ranks to refer to for comparisons.
:returns:
``T... | [
"Compares",
"the",
"card",
"against",
"another",
"card",
"other",
"and",
"checks",
"whether",
"the",
"card",
"is",
"not",
"equal",
"to",
"other",
"based",
"on",
"the",
"given",
"rank",
"dict",
"."
] | 2ac583dd8c55715658c740b614387775f4dda333 | https://github.com/Trebek/pydealer/blob/2ac583dd8c55715658c740b614387775f4dda333/pydealer/card.py#L323-L349 |
50,932 | emory-libraries/eulfedora | eulfedora/indexdata/views.py | index_config | def index_config(request):
'''This view returns the index configuration of the current
application as JSON. Currently, this consists of a Solr index url
and the Fedora content models that this application expects to index.
.. Note::
By default, Fedora system content models (such as
``fe... | python | def index_config(request):
'''This view returns the index configuration of the current
application as JSON. Currently, this consists of a Solr index url
and the Fedora content models that this application expects to index.
.. Note::
By default, Fedora system content models (such as
``fe... | [
"def",
"index_config",
"(",
"request",
")",
":",
"#Ensure permission to this resource is allowed. Currently based on IP only.",
"if",
"_permission_denied_check",
"(",
"request",
")",
":",
"return",
"HttpResponseForbidden",
"(",
"'Access to this web service was denied.'",
",",
"co... | This view returns the index configuration of the current
application as JSON. Currently, this consists of a Solr index url
and the Fedora content models that this application expects to index.
.. Note::
By default, Fedora system content models (such as
``fedora-system:ContentModel-3.0``) ar... | [
"This",
"view",
"returns",
"the",
"index",
"configuration",
"of",
"the",
"current",
"application",
"as",
"JSON",
".",
"Currently",
"this",
"consists",
"of",
"a",
"Solr",
"index",
"url",
"and",
"the",
"Fedora",
"content",
"models",
"that",
"this",
"application"... | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/indexdata/views.py#L82-L116 |
50,933 | emory-libraries/eulfedora | eulfedora/indexdata/views.py | _permission_denied_check | def _permission_denied_check(request):
'''Internal function to verify that access to this webservice is allowed.
Currently, based on the value of EUL_INDEXER_ALLOWED_IPS in settings.py.
:param request: HttpRequest
'''
allowed_ips = settings.EUL_INDEXER_ALLOWED_IPS
if allowed_ips != "ANY" and n... | python | def _permission_denied_check(request):
'''Internal function to verify that access to this webservice is allowed.
Currently, based on the value of EUL_INDEXER_ALLOWED_IPS in settings.py.
:param request: HttpRequest
'''
allowed_ips = settings.EUL_INDEXER_ALLOWED_IPS
if allowed_ips != "ANY" and n... | [
"def",
"_permission_denied_check",
"(",
"request",
")",
":",
"allowed_ips",
"=",
"settings",
".",
"EUL_INDEXER_ALLOWED_IPS",
"if",
"allowed_ips",
"!=",
"\"ANY\"",
"and",
"not",
"request",
".",
"META",
"[",
"'REMOTE_ADDR'",
"]",
"in",
"allowed_ips",
":",
"return",
... | Internal function to verify that access to this webservice is allowed.
Currently, based on the value of EUL_INDEXER_ALLOWED_IPS in settings.py.
:param request: HttpRequest | [
"Internal",
"function",
"to",
"verify",
"that",
"access",
"to",
"this",
"webservice",
"is",
"allowed",
".",
"Currently",
"based",
"on",
"the",
"value",
"of",
"EUL_INDEXER_ALLOWED_IPS",
"in",
"settings",
".",
"py",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/indexdata/views.py#L156-L167 |
50,934 | yyuu/botornado | boto/ec2/instance.py | Instance.update | def update(self, validate=False):
"""
Update the instance's state information by making a call to fetch
the current instance attributes from the service.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
instance the upda... | python | def update(self, validate=False):
"""
Update the instance's state information by making a call to fetch
the current instance attributes from the service.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
instance the upda... | [
"def",
"update",
"(",
"self",
",",
"validate",
"=",
"False",
")",
":",
"rs",
"=",
"self",
".",
"connection",
".",
"get_all_instances",
"(",
"[",
"self",
".",
"id",
"]",
")",
"if",
"len",
"(",
"rs",
")",
">",
"0",
":",
"r",
"=",
"rs",
"[",
"0",
... | Update the instance's state information by making a call to fetch
the current instance attributes from the service.
:type validate: bool
:param validate: By default, if EC2 returns no data about the
instance the update method returns quietly. If
... | [
"Update",
"the",
"instance",
"s",
"state",
"information",
"by",
"making",
"a",
"call",
"to",
"fetch",
"the",
"current",
"instance",
"attributes",
"from",
"the",
"service",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/instance.py#L225-L245 |
50,935 | yyuu/botornado | boto/ec2/instance.py | Instance.terminate | def terminate(self):
"""
Terminate the instance
"""
rs = self.connection.terminate_instances([self.id])
if len(rs) > 0:
self._update(rs[0]) | python | def terminate(self):
"""
Terminate the instance
"""
rs = self.connection.terminate_instances([self.id])
if len(rs) > 0:
self._update(rs[0]) | [
"def",
"terminate",
"(",
"self",
")",
":",
"rs",
"=",
"self",
".",
"connection",
".",
"terminate_instances",
"(",
"[",
"self",
".",
"id",
"]",
")",
"if",
"len",
"(",
"rs",
")",
">",
"0",
":",
"self",
".",
"_update",
"(",
"rs",
"[",
"0",
"]",
")... | Terminate the instance | [
"Terminate",
"the",
"instance"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/instance.py#L247-L253 |
50,936 | yyuu/botornado | boto/ec2/instance.py | Instance.stop | def stop(self, force=False):
"""
Stop the instance
:type force: bool
:param force: Forces the instance to stop
:rtype: list
:return: A list of the instances stopped
"""
rs = self.connection.stop_instances([self.id], force)
if len(rs) > 0:... | python | def stop(self, force=False):
"""
Stop the instance
:type force: bool
:param force: Forces the instance to stop
:rtype: list
:return: A list of the instances stopped
"""
rs = self.connection.stop_instances([self.id], force)
if len(rs) > 0:... | [
"def",
"stop",
"(",
"self",
",",
"force",
"=",
"False",
")",
":",
"rs",
"=",
"self",
".",
"connection",
".",
"stop_instances",
"(",
"[",
"self",
".",
"id",
"]",
",",
"force",
")",
"if",
"len",
"(",
"rs",
")",
">",
"0",
":",
"self",
".",
"_updat... | Stop the instance
:type force: bool
:param force: Forces the instance to stop
:rtype: list
:return: A list of the instances stopped | [
"Stop",
"the",
"instance"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/instance.py#L255-L267 |
50,937 | yyuu/botornado | boto/ec2/instance.py | Instance.modify_attribute | def modify_attribute(self, attribute, value):
"""
Changes an attribute of this instance
:type attribute: string
:param attribute: The attribute you wish to change.
AttributeName - Expected value (default)
instanceType - A valid instanc... | python | def modify_attribute(self, attribute, value):
"""
Changes an attribute of this instance
:type attribute: string
:param attribute: The attribute you wish to change.
AttributeName - Expected value (default)
instanceType - A valid instanc... | [
"def",
"modify_attribute",
"(",
"self",
",",
"attribute",
",",
"value",
")",
":",
"return",
"self",
".",
"connection",
".",
"modify_instance_attribute",
"(",
"self",
".",
"id",
",",
"attribute",
",",
"value",
")"
] | Changes an attribute of this instance
:type attribute: string
:param attribute: The attribute you wish to change.
AttributeName - Expected value (default)
instanceType - A valid instance type (m1.small)
kernel - Kernel ID (No... | [
"Changes",
"an",
"attribute",
"of",
"this",
"instance"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/instance.py#L321-L343 |
50,938 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.get_all_load_balancers | def get_all_load_balancers(self, load_balancer_names=None):
"""
Retrieve all load balancers associated with your account.
:type load_balancer_names: list
:keyword load_balancer_names: An optional list of load balancer names.
:rtype: :py:class:`boto.resultset.ResultSet`
... | python | def get_all_load_balancers(self, load_balancer_names=None):
"""
Retrieve all load balancers associated with your account.
:type load_balancer_names: list
:keyword load_balancer_names: An optional list of load balancer names.
:rtype: :py:class:`boto.resultset.ResultSet`
... | [
"def",
"get_all_load_balancers",
"(",
"self",
",",
"load_balancer_names",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"load_balancer_names",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
"load_balancer_names",
",",
"'LoadBalancerNames.member.%... | Retrieve all load balancers associated with your account.
:type load_balancer_names: list
:keyword load_balancer_names: An optional list of load balancer names.
:rtype: :py:class:`boto.resultset.ResultSet`
:return: A ResultSet containing instances of
:class:`boto.ec2.elb.lo... | [
"Retrieve",
"all",
"load",
"balancers",
"associated",
"with",
"your",
"account",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L111-L127 |
50,939 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.enable_availability_zones | def enable_availability_zones(self, load_balancer_name, zones_to_add):
"""
Add availability zones to an existing Load Balancer
All zones must be in the same region as the Load Balancer
Adding zones that are already registered with the Load Balancer
has no effect.
:type l... | python | def enable_availability_zones(self, load_balancer_name, zones_to_add):
"""
Add availability zones to an existing Load Balancer
All zones must be in the same region as the Load Balancer
Adding zones that are already registered with the Load Balancer
has no effect.
:type l... | [
"def",
"enable_availability_zones",
"(",
"self",
",",
"load_balancer_name",
",",
"zones_to_add",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"load_balancer_name",
"}",
"self",
".",
"build_list_params",
"(",
"params",
",",
"zones_to_add",
",",
"'Availabi... | Add availability zones to an existing Load Balancer
All zones must be in the same region as the Load Balancer
Adding zones that are already registered with the Load Balancer
has no effect.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
... | [
"Add",
"availability",
"zones",
"to",
"an",
"existing",
"Load",
"Balancer",
"All",
"zones",
"must",
"be",
"in",
"the",
"same",
"region",
"as",
"the",
"Load",
"Balancer",
"Adding",
"zones",
"that",
"are",
"already",
"registered",
"with",
"the",
"Load",
"Balan... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L241-L262 |
50,940 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.disable_availability_zones | def disable_availability_zones(self, load_balancer_name, zones_to_remove):
"""
Remove availability zones from an existing Load Balancer.
All zones must be in the same region as the Load Balancer.
Removing zones that are not registered with the Load Balancer
has no effect.
... | python | def disable_availability_zones(self, load_balancer_name, zones_to_remove):
"""
Remove availability zones from an existing Load Balancer.
All zones must be in the same region as the Load Balancer.
Removing zones that are not registered with the Load Balancer
has no effect.
... | [
"def",
"disable_availability_zones",
"(",
"self",
",",
"load_balancer_name",
",",
"zones_to_remove",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"load_balancer_name",
"}",
"self",
".",
"build_list_params",
"(",
"params",
",",
"zones_to_remove",
",",
"'A... | Remove availability zones from an existing Load Balancer.
All zones must be in the same region as the Load Balancer.
Removing zones that are not registered with the Load Balancer
has no effect.
You cannot remove all zones from an Load Balancer.
:type load_balancer_name: string
... | [
"Remove",
"availability",
"zones",
"from",
"an",
"existing",
"Load",
"Balancer",
".",
"All",
"zones",
"must",
"be",
"in",
"the",
"same",
"region",
"as",
"the",
"Load",
"Balancer",
".",
"Removing",
"zones",
"that",
"are",
"not",
"registered",
"with",
"the",
... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L264-L286 |
50,941 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.register_instances | def register_instances(self, load_balancer_name, instances):
"""
Add new Instances to an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ID'... | python | def register_instances(self, load_balancer_name, instances):
"""
Add new Instances to an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ID'... | [
"def",
"register_instances",
"(",
"self",
",",
"load_balancer_name",
",",
"instances",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"load_balancer_name",
"}",
"self",
".",
"build_list_params",
"(",
"params",
",",
"instances",
",",
"'Instances.member.%d.I... | Add new Instances to an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ID's of the EC2 instances to add.
:rtype: List of strings
:return: ... | [
"Add",
"new",
"Instances",
"to",
"an",
"existing",
"Load",
"Balancer",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L288-L306 |
50,942 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.deregister_instances | def deregister_instances(self, load_balancer_name, instances):
"""
Remove Instances from an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ... | python | def deregister_instances(self, load_balancer_name, instances):
"""
Remove Instances from an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ... | [
"def",
"deregister_instances",
"(",
"self",
",",
"load_balancer_name",
",",
"instances",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"load_balancer_name",
"}",
"self",
".",
"build_list_params",
"(",
"params",
",",
"instances",
",",
"'Instances.member.%d... | Remove Instances from an existing Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ID's of the EC2 instances to remove.
:rtype: List of strings
:retu... | [
"Remove",
"Instances",
"from",
"an",
"existing",
"Load",
"Balancer",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L308-L326 |
50,943 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.describe_instance_health | def describe_instance_health(self, load_balancer_name, instances=None):
"""
Get current state of all Instances registered to an Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:par... | python | def describe_instance_health(self, load_balancer_name, instances=None):
"""
Get current state of all Instances registered to an Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:par... | [
"def",
"describe_instance_health",
"(",
"self",
",",
"load_balancer_name",
",",
"instances",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"load_balancer_name",
"}",
"if",
"instances",
":",
"self",
".",
"build_list_params",
"(",
"params",
... | Get current state of all Instances registered to an Load Balancer.
:type load_balancer_name: string
:param load_balancer_name: The name of the Load Balancer
:type instances: List of strings
:param instances: The instance ID's of the EC2 instances
to return sta... | [
"Get",
"current",
"state",
"of",
"all",
"Instances",
"registered",
"to",
"an",
"Load",
"Balancer",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L328-L349 |
50,944 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.configure_health_check | def configure_health_check(self, name, health_check):
"""
Define a health check for the EndPoints.
:type name: string
:param name: The mnemonic name associated with the load balancer
:type health_check: :class:`boto.ec2.elb.healthcheck.HealthCheck`
:param health_check: ... | python | def configure_health_check(self, name, health_check):
"""
Define a health check for the EndPoints.
:type name: string
:param name: The mnemonic name associated with the load balancer
:type health_check: :class:`boto.ec2.elb.healthcheck.HealthCheck`
:param health_check: ... | [
"def",
"configure_health_check",
"(",
"self",
",",
"name",
",",
"health_check",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"name",
",",
"'HealthCheck.Timeout'",
":",
"health_check",
".",
"timeout",
",",
"'HealthCheck.Target'",
":",
"health_check",
".... | Define a health check for the EndPoints.
:type name: string
:param name: The mnemonic name associated with the load balancer
:type health_check: :class:`boto.ec2.elb.healthcheck.HealthCheck`
:param health_check: A HealthCheck object populated with the desired
... | [
"Define",
"a",
"health",
"check",
"for",
"the",
"EndPoints",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L351-L371 |
50,945 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.set_lb_listener_SSL_certificate | def set_lb_listener_SSL_certificate(self, lb_name, lb_port,
ssl_certificate_id):
"""
Sets the certificate that terminates the specified listener's SSL
connections. The specified certificate replaces any prior certificate
that was used on the same L... | python | def set_lb_listener_SSL_certificate(self, lb_name, lb_port,
ssl_certificate_id):
"""
Sets the certificate that terminates the specified listener's SSL
connections. The specified certificate replaces any prior certificate
that was used on the same L... | [
"def",
"set_lb_listener_SSL_certificate",
"(",
"self",
",",
"lb_name",
",",
"lb_port",
",",
"ssl_certificate_id",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"lb_name",
",",
"'LoadBalancerPort'",
":",
"lb_port",
",",
"'SSLCertificateId'",
":",
"ssl_cert... | Sets the certificate that terminates the specified listener's SSL
connections. The specified certificate replaces any prior certificate
that was used on the same LoadBalancer and port. | [
"Sets",
"the",
"certificate",
"that",
"terminates",
"the",
"specified",
"listener",
"s",
"SSL",
"connections",
".",
"The",
"specified",
"certificate",
"replaces",
"any",
"prior",
"certificate",
"that",
"was",
"used",
"on",
"the",
"same",
"LoadBalancer",
"and",
"... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L373-L385 |
50,946 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.create_app_cookie_stickiness_policy | def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name):
"""
Generates a stickiness policy with sticky session lifetimes that follow
that of an application-generated cookie. This policy can only be
associated with HTTP listeners.
This policy is similar to the p... | python | def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name):
"""
Generates a stickiness policy with sticky session lifetimes that follow
that of an application-generated cookie. This policy can only be
associated with HTTP listeners.
This policy is similar to the p... | [
"def",
"create_app_cookie_stickiness_policy",
"(",
"self",
",",
"name",
",",
"lb_name",
",",
"policy_name",
")",
":",
"params",
"=",
"{",
"'CookieName'",
":",
"name",
",",
"'LoadBalancerName'",
":",
"lb_name",
",",
"'PolicyName'",
":",
"policy_name",
",",
"}",
... | Generates a stickiness policy with sticky session lifetimes that follow
that of an application-generated cookie. This policy can only be
associated with HTTP listeners.
This policy is similar to the policy created by
CreateLBCookieStickinessPolicy, except that the lifetime of the specia... | [
"Generates",
"a",
"stickiness",
"policy",
"with",
"sticky",
"session",
"lifetimes",
"that",
"follow",
"that",
"of",
"an",
"application",
"-",
"generated",
"cookie",
".",
"This",
"policy",
"can",
"only",
"be",
"associated",
"with",
"HTTP",
"listeners",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L387-L408 |
50,947 | yyuu/botornado | boto/ec2/elb/__init__.py | ELBConnection.delete_lb_policy | def delete_lb_policy(self, lb_name, policy_name):
"""
Deletes a policy from the LoadBalancer. The specified policy must not
be enabled for any listeners.
"""
params = {
'LoadBalancerName' : lb_name,
'PolicyName' : po... | python | def delete_lb_policy(self, lb_name, policy_name):
"""
Deletes a policy from the LoadBalancer. The specified policy must not
be enabled for any listeners.
"""
params = {
'LoadBalancerName' : lb_name,
'PolicyName' : po... | [
"def",
"delete_lb_policy",
"(",
"self",
",",
"lb_name",
",",
"policy_name",
")",
":",
"params",
"=",
"{",
"'LoadBalancerName'",
":",
"lb_name",
",",
"'PolicyName'",
":",
"policy_name",
",",
"}",
"return",
"self",
".",
"get_status",
"(",
"'DeleteLoadBalancerPolic... | Deletes a policy from the LoadBalancer. The specified policy must not
be enabled for any listeners. | [
"Deletes",
"a",
"policy",
"from",
"the",
"LoadBalancer",
".",
"The",
"specified",
"policy",
"must",
"not",
"be",
"enabled",
"for",
"any",
"listeners",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/elb/__init__.py#L437-L446 |
50,948 | gmichaeljaison/cv-utils | cv_utils/utils.py | remove_missing_keys | def remove_missing_keys(src_dict, target_dict):
"""
Remove keys from target_dict that are not available in src_dict
:param src_dict: source dictionary to search for
:param target_dict: target dictionary where keys should be removed
"""
for key in list(target_dict.keys()):
if key not in ... | python | def remove_missing_keys(src_dict, target_dict):
"""
Remove keys from target_dict that are not available in src_dict
:param src_dict: source dictionary to search for
:param target_dict: target dictionary where keys should be removed
"""
for key in list(target_dict.keys()):
if key not in ... | [
"def",
"remove_missing_keys",
"(",
"src_dict",
",",
"target_dict",
")",
":",
"for",
"key",
"in",
"list",
"(",
"target_dict",
".",
"keys",
"(",
")",
")",
":",
"if",
"key",
"not",
"in",
"src_dict",
":",
"target_dict",
".",
"pop",
"(",
"key",
")"
] | Remove keys from target_dict that are not available in src_dict
:param src_dict: source dictionary to search for
:param target_dict: target dictionary where keys should be removed | [
"Remove",
"keys",
"from",
"target_dict",
"that",
"are",
"not",
"available",
"in",
"src_dict"
] | a8251c870165a7428d8c468a6436aa41d0cf7c09 | https://github.com/gmichaeljaison/cv-utils/blob/a8251c870165a7428d8c468a6436aa41d0cf7c09/cv_utils/utils.py#L11-L20 |
50,949 | gmichaeljaison/cv-utils | cv_utils/utils.py | create_dirs | def create_dirs(path):
"""
Creates all directories mentioned in the given path.
Useful to write a new file with the specified path.
It carefully skips the file-name in the given path.
:param path: Path of a file or directory
"""
fname = os.path.basename(path)
# if file name exi... | python | def create_dirs(path):
"""
Creates all directories mentioned in the given path.
Useful to write a new file with the specified path.
It carefully skips the file-name in the given path.
:param path: Path of a file or directory
"""
fname = os.path.basename(path)
# if file name exi... | [
"def",
"create_dirs",
"(",
"path",
")",
":",
"fname",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"path",
")",
"# if file name exists in path, skip the filename",
"if",
"fname",
".",
"__contains__",
"(",
"'.'",
")",
":",
"path",
"=",
"os",
".",
"path",
"... | Creates all directories mentioned in the given path.
Useful to write a new file with the specified path.
It carefully skips the file-name in the given path.
:param path: Path of a file or directory | [
"Creates",
"all",
"directories",
"mentioned",
"in",
"the",
"given",
"path",
".",
"Useful",
"to",
"write",
"a",
"new",
"file",
"with",
"the",
"specified",
"path",
".",
"It",
"carefully",
"skips",
"the",
"file",
"-",
"name",
"in",
"the",
"given",
"path",
"... | a8251c870165a7428d8c468a6436aa41d0cf7c09 | https://github.com/gmichaeljaison/cv-utils/blob/a8251c870165a7428d8c468a6436aa41d0cf7c09/cv_utils/utils.py#L54-L69 |
50,950 | slawek87/yql-finance | yql/api.py | YQL.fetch_data | def fetch_data(self):
"""Method returns results from response of Yahoo YQL API. It should returns always python list."""
if relativedelta(self.end_date, self.start_date).years <= const.ONE_YEAR:
data = self.request.send(self.symbol, self.start_date, self.end_date)
else:
d... | python | def fetch_data(self):
"""Method returns results from response of Yahoo YQL API. It should returns always python list."""
if relativedelta(self.end_date, self.start_date).years <= const.ONE_YEAR:
data = self.request.send(self.symbol, self.start_date, self.end_date)
else:
d... | [
"def",
"fetch_data",
"(",
"self",
")",
":",
"if",
"relativedelta",
"(",
"self",
".",
"end_date",
",",
"self",
".",
"start_date",
")",
".",
"years",
"<=",
"const",
".",
"ONE_YEAR",
":",
"data",
"=",
"self",
".",
"request",
".",
"send",
"(",
"self",
".... | Method returns results from response of Yahoo YQL API. It should returns always python list. | [
"Method",
"returns",
"results",
"from",
"response",
"of",
"Yahoo",
"YQL",
"API",
".",
"It",
"should",
"returns",
"always",
"python",
"list",
"."
] | 52b1ac6720db09c4d8a9864b171506e90a8d3964 | https://github.com/slawek87/yql-finance/blob/52b1ac6720db09c4d8a9864b171506e90a8d3964/yql/api.py#L56-L63 |
50,951 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.register_hit_type | def register_hit_type(self, title, description, reward, duration,
keywords=None, approval_delay=None, qual_req=None):
"""
Register a new HIT Type
title, description are strings
reward is a Price object
duration can be a timedelta, or an object castable t... | python | def register_hit_type(self, title, description, reward, duration,
keywords=None, approval_delay=None, qual_req=None):
"""
Register a new HIT Type
title, description are strings
reward is a Price object
duration can be a timedelta, or an object castable t... | [
"def",
"register_hit_type",
"(",
"self",
",",
"title",
",",
"description",
",",
"reward",
",",
"duration",
",",
"keywords",
"=",
"None",
",",
"approval_delay",
"=",
"None",
",",
"qual_req",
"=",
"None",
")",
":",
"params",
"=",
"dict",
"(",
"Title",
"=",... | Register a new HIT Type
title, description are strings
reward is a Price object
duration can be a timedelta, or an object castable to an int | [
"Register",
"a",
"new",
"HIT",
"Type",
"title",
"description",
"are",
"strings",
"reward",
"is",
"a",
"Price",
"object",
"duration",
"can",
"be",
"a",
"timedelta",
"or",
"an",
"object",
"castable",
"to",
"an",
"int"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L71-L97 |
50,952 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.set_email_notification | def set_email_notification(self, hit_type, email, event_types=None):
"""
Performs a SetHITTypeNotification operation to set email
notification for a specified HIT type
"""
return self._set_notification(hit_type, 'Email', email, event_types) | python | def set_email_notification(self, hit_type, email, event_types=None):
"""
Performs a SetHITTypeNotification operation to set email
notification for a specified HIT type
"""
return self._set_notification(hit_type, 'Email', email, event_types) | [
"def",
"set_email_notification",
"(",
"self",
",",
"hit_type",
",",
"email",
",",
"event_types",
"=",
"None",
")",
":",
"return",
"self",
".",
"_set_notification",
"(",
"hit_type",
",",
"'Email'",
",",
"email",
",",
"event_types",
")"
] | Performs a SetHITTypeNotification operation to set email
notification for a specified HIT type | [
"Performs",
"a",
"SetHITTypeNotification",
"operation",
"to",
"set",
"email",
"notification",
"for",
"a",
"specified",
"HIT",
"type"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L99-L104 |
50,953 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.set_rest_notification | def set_rest_notification(self, hit_type, url, event_types=None):
"""
Performs a SetHITTypeNotification operation to set REST notification
for a specified HIT type
"""
return self._set_notification(hit_type, 'REST', url, event_types) | python | def set_rest_notification(self, hit_type, url, event_types=None):
"""
Performs a SetHITTypeNotification operation to set REST notification
for a specified HIT type
"""
return self._set_notification(hit_type, 'REST', url, event_types) | [
"def",
"set_rest_notification",
"(",
"self",
",",
"hit_type",
",",
"url",
",",
"event_types",
"=",
"None",
")",
":",
"return",
"self",
".",
"_set_notification",
"(",
"hit_type",
",",
"'REST'",
",",
"url",
",",
"event_types",
")"
] | Performs a SetHITTypeNotification operation to set REST notification
for a specified HIT type | [
"Performs",
"a",
"SetHITTypeNotification",
"operation",
"to",
"set",
"REST",
"notification",
"for",
"a",
"specified",
"HIT",
"type"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L106-L111 |
50,954 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection._set_notification | def _set_notification(self, hit_type, transport, destination, event_types=None):
"""
Common SetHITTypeNotification operation to set notification for a
specified HIT type
"""
assert type(hit_type) is str, "hit_type argument should be a string."
params = {'HITTypeI... | python | def _set_notification(self, hit_type, transport, destination, event_types=None):
"""
Common SetHITTypeNotification operation to set notification for a
specified HIT type
"""
assert type(hit_type) is str, "hit_type argument should be a string."
params = {'HITTypeI... | [
"def",
"_set_notification",
"(",
"self",
",",
"hit_type",
",",
"transport",
",",
"destination",
",",
"event_types",
"=",
"None",
")",
":",
"assert",
"type",
"(",
"hit_type",
")",
"is",
"str",
",",
"\"hit_type argument should be a string.\"",
"params",
"=",
"{",
... | Common SetHITTypeNotification operation to set notification for a
specified HIT type | [
"Common",
"SetHITTypeNotification",
"operation",
"to",
"set",
"notification",
"for",
"a",
"specified",
"HIT",
"type"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L113-L146 |
50,955 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_reviewable_hits | def get_reviewable_hits(self, hit_type=None, status='Reviewable',
sort_by='Expiration', sort_direction='Ascending',
page_size=10, page_number=1):
"""
Retrieve the HITs that have a status of Reviewable, or HITs that
have a status of Reviewi... | python | def get_reviewable_hits(self, hit_type=None, status='Reviewable',
sort_by='Expiration', sort_direction='Ascending',
page_size=10, page_number=1):
"""
Retrieve the HITs that have a status of Reviewable, or HITs that
have a status of Reviewi... | [
"def",
"get_reviewable_hits",
"(",
"self",
",",
"hit_type",
"=",
"None",
",",
"status",
"=",
"'Reviewable'",
",",
"sort_by",
"=",
"'Expiration'",
",",
"sort_direction",
"=",
"'Ascending'",
",",
"page_size",
"=",
"10",
",",
"page_number",
"=",
"1",
")",
":",
... | Retrieve the HITs that have a status of Reviewable, or HITs that
have a status of Reviewing, and that belong to the Requester
calling the operation. | [
"Retrieve",
"the",
"HITs",
"that",
"have",
"a",
"status",
"of",
"Reviewable",
"or",
"HITs",
"that",
"have",
"a",
"status",
"of",
"Reviewing",
"and",
"that",
"belong",
"to",
"the",
"Requester",
"calling",
"the",
"operation",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L240-L258 |
50,956 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_all_hits | def get_all_hits(self):
"""
Return all of a Requester's HITs
Despite what search_hits says, it does not return all hits, but
instead returns a page of hits. This method will pull the hits
from the server 100 at a time, but will yield the results
iteratively, so s... | python | def get_all_hits(self):
"""
Return all of a Requester's HITs
Despite what search_hits says, it does not return all hits, but
instead returns a page of hits. This method will pull the hits
from the server 100 at a time, but will yield the results
iteratively, so s... | [
"def",
"get_all_hits",
"(",
"self",
")",
":",
"page_size",
"=",
"100",
"search_rs",
"=",
"self",
".",
"search_hits",
"(",
"page_size",
"=",
"page_size",
")",
"total_records",
"=",
"int",
"(",
"search_rs",
".",
"TotalNumResults",
")",
"get_page_hits",
"=",
"l... | Return all of a Requester's HITs
Despite what search_hits says, it does not return all hits, but
instead returns a page of hits. This method will pull the hits
from the server 100 at a time, but will yield the results
iteratively, so subsequent requests are made on demand. | [
"Return",
"all",
"of",
"a",
"Requester",
"s",
"HITs",
"Despite",
"what",
"search_hits",
"says",
"it",
"does",
"not",
"return",
"all",
"hits",
"but",
"instead",
"returns",
"a",
"page",
"of",
"hits",
".",
"This",
"method",
"will",
"pull",
"the",
"hits",
"f... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L270-L285 |
50,957 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_assignments | def get_assignments(self, hit_id, status=None,
sort_by='SubmitTime', sort_direction='Ascending',
page_size=10, page_number=1, response_groups=None):
"""
Retrieves completed assignments for a HIT.
Use this operation to retrieve the results... | python | def get_assignments(self, hit_id, status=None,
sort_by='SubmitTime', sort_direction='Ascending',
page_size=10, page_number=1, response_groups=None):
"""
Retrieves completed assignments for a HIT.
Use this operation to retrieve the results... | [
"def",
"get_assignments",
"(",
"self",
",",
"hit_id",
",",
"status",
"=",
"None",
",",
"sort_by",
"=",
"'SubmitTime'",
",",
"sort_direction",
"=",
"'Ascending'",
",",
"page_size",
"=",
"10",
",",
"page_number",
"=",
"1",
",",
"response_groups",
"=",
"None",
... | Retrieves completed assignments for a HIT.
Use this operation to retrieve the results for a HIT.
The returned ResultSet will have the following attributes:
NumResults
The number of assignments on the page in the filtered results
list, equivalent to the number o... | [
"Retrieves",
"completed",
"assignments",
"for",
"a",
"HIT",
".",
"Use",
"this",
"operation",
"to",
"retrieve",
"the",
"results",
"for",
"a",
"HIT",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L308-L348 |
50,958 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.set_reviewing | def set_reviewing(self, hit_id, revert=None):
"""
Update a HIT with a status of Reviewable to have a status of Reviewing,
or reverts a Reviewing HIT back to the Reviewable status.
Only HITs with a status of Reviewable can be updated with a status of
Reviewing. Similarly, only ... | python | def set_reviewing(self, hit_id, revert=None):
"""
Update a HIT with a status of Reviewable to have a status of Reviewing,
or reverts a Reviewing HIT back to the Reviewable status.
Only HITs with a status of Reviewable can be updated with a status of
Reviewing. Similarly, only ... | [
"def",
"set_reviewing",
"(",
"self",
",",
"hit_id",
",",
"revert",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'HITId'",
":",
"hit_id",
",",
"}",
"if",
"revert",
":",
"params",
"[",
"'Revert'",
"]",
"=",
"revert",
"return",
"self",
".",
"_process_reque... | Update a HIT with a status of Reviewable to have a status of Reviewing,
or reverts a Reviewing HIT back to the Reviewable status.
Only HITs with a status of Reviewable can be updated with a status of
Reviewing. Similarly, only Reviewing HITs can be reverted back to a
status of Reviewa... | [
"Update",
"a",
"HIT",
"with",
"a",
"status",
"of",
"Reviewable",
"to",
"have",
"a",
"status",
"of",
"Reviewing",
"or",
"reverts",
"a",
"Reviewing",
"HIT",
"back",
"to",
"the",
"Reviewable",
"status",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L376-L388 |
50,959 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.disable_hit | def disable_hit(self, hit_id, response_groups=None):
"""
Remove a HIT from the Mechanical Turk marketplace, approves all
submitted assignments that have not already been approved or rejected,
and disposes of the HIT and all assignment data.
Assignments for the HIT that have alre... | python | def disable_hit(self, hit_id, response_groups=None):
"""
Remove a HIT from the Mechanical Turk marketplace, approves all
submitted assignments that have not already been approved or rejected,
and disposes of the HIT and all assignment data.
Assignments for the HIT that have alre... | [
"def",
"disable_hit",
"(",
"self",
",",
"hit_id",
",",
"response_groups",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'HITId'",
":",
"hit_id",
",",
"}",
"# Handle optional response groups argument",
"if",
"response_groups",
":",
"self",
".",
"build_list_params",
... | Remove a HIT from the Mechanical Turk marketplace, approves all
submitted assignments that have not already been approved or rejected,
and disposes of the HIT and all assignment data.
Assignments for the HIT that have already been submitted, but not yet
approved or rejected, will be aut... | [
"Remove",
"a",
"HIT",
"from",
"the",
"Mechanical",
"Turk",
"marketplace",
"approves",
"all",
"submitted",
"assignments",
"that",
"have",
"not",
"already",
"been",
"approved",
"or",
"rejected",
"and",
"disposes",
"of",
"the",
"HIT",
"and",
"all",
"assignment",
... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L390-L412 |
50,960 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_help | def get_help(self, about, help_type='Operation'):
"""
Return information about the Mechanical Turk Service
operations and response group NOTE - this is basically useless
as it just returns the URL of the documentation
help_type: either 'Operation' or 'ResponseGroup'
"""
... | python | def get_help(self, about, help_type='Operation'):
"""
Return information about the Mechanical Turk Service
operations and response group NOTE - this is basically useless
as it just returns the URL of the documentation
help_type: either 'Operation' or 'ResponseGroup'
"""
... | [
"def",
"get_help",
"(",
"self",
",",
"about",
",",
"help_type",
"=",
"'Operation'",
")",
":",
"params",
"=",
"{",
"'About'",
":",
"about",
",",
"'HelpType'",
":",
"help_type",
",",
"}",
"return",
"self",
".",
"_process_request",
"(",
"'Help'",
",",
"para... | Return information about the Mechanical Turk Service
operations and response group NOTE - this is basically useless
as it just returns the URL of the documentation
help_type: either 'Operation' or 'ResponseGroup' | [
"Return",
"information",
"about",
"the",
"Mechanical",
"Turk",
"Service",
"operations",
"and",
"response",
"group",
"NOTE",
"-",
"this",
"is",
"basically",
"useless",
"as",
"it",
"just",
"returns",
"the",
"URL",
"of",
"the",
"documentation"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L471-L480 |
50,961 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.grant_bonus | def grant_bonus(self, worker_id, assignment_id, bonus_price, reason):
"""
Issues a payment of money from your account to a Worker. To
be eligible for a bonus, the Worker must have submitted
results for one of your HITs, and have had those results
approved or rejected. This payme... | python | def grant_bonus(self, worker_id, assignment_id, bonus_price, reason):
"""
Issues a payment of money from your account to a Worker. To
be eligible for a bonus, the Worker must have submitted
results for one of your HITs, and have had those results
approved or rejected. This payme... | [
"def",
"grant_bonus",
"(",
"self",
",",
"worker_id",
",",
"assignment_id",
",",
"bonus_price",
",",
"reason",
")",
":",
"params",
"=",
"bonus_price",
".",
"get_as_params",
"(",
"'BonusAmount'",
",",
"1",
")",
"params",
"[",
"'WorkerId'",
"]",
"=",
"worker_id... | Issues a payment of money from your account to a Worker. To
be eligible for a bonus, the Worker must have submitted
results for one of your HITs, and have had those results
approved or rejected. This payment happens separately from the
reward you pay to the Worker when you approve the W... | [
"Issues",
"a",
"payment",
"of",
"money",
"from",
"your",
"account",
"to",
"a",
"Worker",
".",
"To",
"be",
"eligible",
"for",
"a",
"bonus",
"the",
"Worker",
"must",
"have",
"submitted",
"results",
"for",
"one",
"of",
"your",
"HITs",
"and",
"have",
"had",
... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L482-L497 |
50,962 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.block_worker | def block_worker(self, worker_id, reason):
"""
Block a worker from working on my tasks.
"""
params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('BlockWorker', params) | python | def block_worker(self, worker_id, reason):
"""
Block a worker from working on my tasks.
"""
params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('BlockWorker', params) | [
"def",
"block_worker",
"(",
"self",
",",
"worker_id",
",",
"reason",
")",
":",
"params",
"=",
"{",
"'WorkerId'",
":",
"worker_id",
",",
"'Reason'",
":",
"reason",
"}",
"return",
"self",
".",
"_process_request",
"(",
"'BlockWorker'",
",",
"params",
")"
] | Block a worker from working on my tasks. | [
"Block",
"a",
"worker",
"from",
"working",
"on",
"my",
"tasks",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L499-L505 |
50,963 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.unblock_worker | def unblock_worker(self, worker_id, reason):
"""
Unblock a worker from working on my tasks.
"""
params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('UnblockWorker', params) | python | def unblock_worker(self, worker_id, reason):
"""
Unblock a worker from working on my tasks.
"""
params = {'WorkerId': worker_id, 'Reason': reason}
return self._process_request('UnblockWorker', params) | [
"def",
"unblock_worker",
"(",
"self",
",",
"worker_id",
",",
"reason",
")",
":",
"params",
"=",
"{",
"'WorkerId'",
":",
"worker_id",
",",
"'Reason'",
":",
"reason",
"}",
"return",
"self",
".",
"_process_request",
"(",
"'UnblockWorker'",
",",
"params",
")"
] | Unblock a worker from working on my tasks. | [
"Unblock",
"a",
"worker",
"from",
"working",
"on",
"my",
"tasks",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L507-L513 |
50,964 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.notify_workers | def notify_workers(self, worker_ids, subject, message_text):
"""
Send a text message to workers.
"""
params = {'Subject' : subject,
'MessageText': message_text}
self.build_list_params(params, worker_ids, 'WorkerId')
return self._process_request('NotifyW... | python | def notify_workers(self, worker_ids, subject, message_text):
"""
Send a text message to workers.
"""
params = {'Subject' : subject,
'MessageText': message_text}
self.build_list_params(params, worker_ids, 'WorkerId')
return self._process_request('NotifyW... | [
"def",
"notify_workers",
"(",
"self",
",",
"worker_ids",
",",
"subject",
",",
"message_text",
")",
":",
"params",
"=",
"{",
"'Subject'",
":",
"subject",
",",
"'MessageText'",
":",
"message_text",
"}",
"self",
".",
"build_list_params",
"(",
"params",
",",
"wo... | Send a text message to workers. | [
"Send",
"a",
"text",
"message",
"to",
"workers",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L515-L523 |
50,965 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.create_qualification_type | def create_qualification_type(self,
name,
description,
status,
keywords=None,
retry_delay=None,
test=None,
... | python | def create_qualification_type(self,
name,
description,
status,
keywords=None,
retry_delay=None,
test=None,
... | [
"def",
"create_qualification_type",
"(",
"self",
",",
"name",
",",
"description",
",",
"status",
",",
"keywords",
"=",
"None",
",",
"retry_delay",
"=",
"None",
",",
"test",
"=",
"None",
",",
"answer_key",
"=",
"None",
",",
"answer_key_xml",
"=",
"None",
",... | Create a new Qualification Type.
name: This will be visible to workers and must be unique for a
given requester.
description: description shown to workers. Max 2000 characters.
status: 'Active' or 'Inactive'
keywords: list of keyword strings or comma separated string.
... | [
"Create",
"a",
"new",
"Qualification",
"Type",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L525-L601 |
50,966 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_keywords_as_string | def get_keywords_as_string(keywords):
"""
Returns a comma+space-separated string of keywords from either
a list or a string
"""
if type(keywords) is list:
keywords = ', '.join(keywords)
if type(keywords) is str:
final_keywords = keywords
el... | python | def get_keywords_as_string(keywords):
"""
Returns a comma+space-separated string of keywords from either
a list or a string
"""
if type(keywords) is list:
keywords = ', '.join(keywords)
if type(keywords) is str:
final_keywords = keywords
el... | [
"def",
"get_keywords_as_string",
"(",
"keywords",
")",
":",
"if",
"type",
"(",
"keywords",
")",
"is",
"list",
":",
"keywords",
"=",
"', '",
".",
"join",
"(",
"keywords",
")",
"if",
"type",
"(",
"keywords",
")",
"is",
"str",
":",
"final_keywords",
"=",
... | Returns a comma+space-separated string of keywords from either
a list or a string | [
"Returns",
"a",
"comma",
"+",
"space",
"-",
"separated",
"string",
"of",
"keywords",
"from",
"either",
"a",
"list",
"or",
"a",
"string"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L749-L764 |
50,967 | yyuu/botornado | boto/mturk/connection.py | MTurkConnection.get_price_as_price | def get_price_as_price(reward):
"""
Returns a Price data structure from either a float or a Price
"""
if isinstance(reward, Price):
final_price = reward
else:
final_price = Price(reward)
return final_price | python | def get_price_as_price(reward):
"""
Returns a Price data structure from either a float or a Price
"""
if isinstance(reward, Price):
final_price = reward
else:
final_price = Price(reward)
return final_price | [
"def",
"get_price_as_price",
"(",
"reward",
")",
":",
"if",
"isinstance",
"(",
"reward",
",",
"Price",
")",
":",
"final_price",
"=",
"reward",
"else",
":",
"final_price",
"=",
"Price",
"(",
"reward",
")",
"return",
"final_price"
] | Returns a Price data structure from either a float or a Price | [
"Returns",
"a",
"Price",
"data",
"structure",
"from",
"either",
"a",
"float",
"or",
"a",
"Price"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L767-L775 |
50,968 | yyuu/botornado | boto/mturk/connection.py | HIT._has_expired | def _has_expired(self):
""" Has this HIT expired yet? """
expired = False
if hasattr(self, 'Expiration'):
now = datetime.datetime.utcnow()
expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ')
expired = (now >= expiration)
else... | python | def _has_expired(self):
""" Has this HIT expired yet? """
expired = False
if hasattr(self, 'Expiration'):
now = datetime.datetime.utcnow()
expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ')
expired = (now >= expiration)
else... | [
"def",
"_has_expired",
"(",
"self",
")",
":",
"expired",
"=",
"False",
"if",
"hasattr",
"(",
"self",
",",
"'Expiration'",
")",
":",
"now",
"=",
"datetime",
".",
"datetime",
".",
"utcnow",
"(",
")",
"expiration",
"=",
"datetime",
".",
"datetime",
".",
"... | Has this HIT expired yet? | [
"Has",
"this",
"HIT",
"expired",
"yet?"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/mturk/connection.py#L809-L818 |
50,969 | yyuu/botornado | boto/s3/bucketlistresultset.py | versioned_bucket_lister | def versioned_bucket_lister(bucket, prefix='', delimiter='',
key_marker='', version_id_marker='', headers=None):
"""
A generator function for listing versions in a bucket.
"""
more_results = True
k = None
while more_results:
rs = bucket.get_all_versions(prefix... | python | def versioned_bucket_lister(bucket, prefix='', delimiter='',
key_marker='', version_id_marker='', headers=None):
"""
A generator function for listing versions in a bucket.
"""
more_results = True
k = None
while more_results:
rs = bucket.get_all_versions(prefix... | [
"def",
"versioned_bucket_lister",
"(",
"bucket",
",",
"prefix",
"=",
"''",
",",
"delimiter",
"=",
"''",
",",
"key_marker",
"=",
"''",
",",
"version_id_marker",
"=",
"''",
",",
"headers",
"=",
"None",
")",
":",
"more_results",
"=",
"True",
"k",
"=",
"None... | A generator function for listing versions in a bucket. | [
"A",
"generator",
"function",
"for",
"listing",
"versions",
"in",
"a",
"bucket",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/s3/bucketlistresultset.py#L58-L74 |
50,970 | yyuu/botornado | boto/s3/bucketlistresultset.py | multipart_upload_lister | def multipart_upload_lister(bucket, key_marker='',
upload_id_marker='',
headers=None):
"""
A generator function for listing multipart uploads in a bucket.
"""
more_results = True
k = None
while more_results:
rs = bucket.get_all_mult... | python | def multipart_upload_lister(bucket, key_marker='',
upload_id_marker='',
headers=None):
"""
A generator function for listing multipart uploads in a bucket.
"""
more_results = True
k = None
while more_results:
rs = bucket.get_all_mult... | [
"def",
"multipart_upload_lister",
"(",
"bucket",
",",
"key_marker",
"=",
"''",
",",
"upload_id_marker",
"=",
"''",
",",
"headers",
"=",
"None",
")",
":",
"more_results",
"=",
"True",
"k",
"=",
"None",
"while",
"more_results",
":",
"rs",
"=",
"bucket",
".",... | A generator function for listing multipart uploads in a bucket. | [
"A",
"generator",
"function",
"for",
"listing",
"multipart",
"uploads",
"in",
"a",
"bucket",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/s3/bucketlistresultset.py#L101-L117 |
50,971 | yyuu/botornado | boto/sdb/domain.py | Domain.put_attributes | def put_attributes(self, item_name, attributes,
replace=True, expected_value=None):
"""
Store attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being stored.
:type attribute_names: dict or dic... | python | def put_attributes(self, item_name, attributes,
replace=True, expected_value=None):
"""
Store attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being stored.
:type attribute_names: dict or dic... | [
"def",
"put_attributes",
"(",
"self",
",",
"item_name",
",",
"attributes",
",",
"replace",
"=",
"True",
",",
"expected_value",
"=",
"None",
")",
":",
"return",
"self",
".",
"connection",
".",
"put_attributes",
"(",
"self",
",",
"item_name",
",",
"attributes"... | Store attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being stored.
:type attribute_names: dict or dict-like object
:param attribute_names: The name/value pairs to store as attributes
:type expected_value: list
... | [
"Store",
"attributes",
"for",
"a",
"given",
"item",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L54-L91 |
50,972 | yyuu/botornado | boto/sdb/domain.py | Domain.batch_put_attributes | def batch_put_attributes(self, items, replace=True):
"""
Store attributes for multiple items.
:type items: dict or dict-like object
:param items: A dictionary-like object. The keys of the dictionary are
the item names and the values are themselves dictionaries
... | python | def batch_put_attributes(self, items, replace=True):
"""
Store attributes for multiple items.
:type items: dict or dict-like object
:param items: A dictionary-like object. The keys of the dictionary are
the item names and the values are themselves dictionaries
... | [
"def",
"batch_put_attributes",
"(",
"self",
",",
"items",
",",
"replace",
"=",
"True",
")",
":",
"return",
"self",
".",
"connection",
".",
"batch_put_attributes",
"(",
"self",
",",
"items",
",",
"replace",
")"
] | Store attributes for multiple items.
:type items: dict or dict-like object
:param items: A dictionary-like object. The keys of the dictionary are
the item names and the values are themselves dictionaries
of attribute names/values, exactly the same as the
... | [
"Store",
"attributes",
"for",
"multiple",
"items",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L93-L112 |
50,973 | yyuu/botornado | boto/sdb/domain.py | Domain.get_attributes | def get_attributes(self, item_name, attribute_name=None,
consistent_read=False, item=None):
"""
Retrieve attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being retrieved.
:type attribute_name... | python | def get_attributes(self, item_name, attribute_name=None,
consistent_read=False, item=None):
"""
Retrieve attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being retrieved.
:type attribute_name... | [
"def",
"get_attributes",
"(",
"self",
",",
"item_name",
",",
"attribute_name",
"=",
"None",
",",
"consistent_read",
"=",
"False",
",",
"item",
"=",
"None",
")",
":",
"return",
"self",
".",
"connection",
".",
"get_attributes",
"(",
"self",
",",
"item_name",
... | Retrieve attributes for a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being retrieved.
:type attribute_names: string or list of strings
:param attribute_names: An attribute name or list of attribute names. This
... | [
"Retrieve",
"attributes",
"for",
"a",
"given",
"item",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L114-L131 |
50,974 | yyuu/botornado | boto/sdb/domain.py | Domain.delete_attributes | def delete_attributes(self, item_name, attributes=None,
expected_values=None):
"""
Delete attributes from a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being deleted.
:type attributes: dict, list or :... | python | def delete_attributes(self, item_name, attributes=None,
expected_values=None):
"""
Delete attributes from a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being deleted.
:type attributes: dict, list or :... | [
"def",
"delete_attributes",
"(",
"self",
",",
"item_name",
",",
"attributes",
"=",
"None",
",",
"expected_values",
"=",
"None",
")",
":",
"return",
"self",
".",
"connection",
".",
"delete_attributes",
"(",
"self",
",",
"item_name",
",",
"attributes",
",",
"e... | Delete attributes from a given item.
:type item_name: string
:param item_name: The name of the item whose attributes are being deleted.
:type attributes: dict, list or :class:`boto.sdb.item.Item`
:param attributes: Either a list containing attribute names which will cause
... | [
"Delete",
"attributes",
"from",
"a",
"given",
"item",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L133-L169 |
50,975 | yyuu/botornado | boto/sdb/domain.py | Domain.select | def select(self, query='', next_token=None, consistent_read=False, max_items=None):
"""
Returns a set of Attributes for item names within domain_name that match the query.
The query must be expressed in using the SELECT style syntax rather than the
original SimpleDB query language.
... | python | def select(self, query='', next_token=None, consistent_read=False, max_items=None):
"""
Returns a set of Attributes for item names within domain_name that match the query.
The query must be expressed in using the SELECT style syntax rather than the
original SimpleDB query language.
... | [
"def",
"select",
"(",
"self",
",",
"query",
"=",
"''",
",",
"next_token",
"=",
"None",
",",
"consistent_read",
"=",
"False",
",",
"max_items",
"=",
"None",
")",
":",
"return",
"SelectResultSet",
"(",
"self",
",",
"query",
",",
"max_items",
"=",
"max_item... | Returns a set of Attributes for item names within domain_name that match the query.
The query must be expressed in using the SELECT style syntax rather than the
original SimpleDB query language.
:type query: string
:param query: The SimpleDB query to be performed.
:rtype: iter
... | [
"Returns",
"a",
"set",
"of",
"Attributes",
"for",
"item",
"names",
"within",
"domain_name",
"that",
"match",
"the",
"query",
".",
"The",
"query",
"must",
"be",
"expressed",
"in",
"using",
"the",
"SELECT",
"style",
"syntax",
"rather",
"than",
"the",
"original... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L192-L207 |
50,976 | yyuu/botornado | boto/sdb/domain.py | Domain.from_xml | def from_xml(self, doc):
"""Load this domain based on an XML document"""
import xml.sax
handler = DomainDumpParser(self)
xml.sax.parse(doc, handler)
return handler | python | def from_xml(self, doc):
"""Load this domain based on an XML document"""
import xml.sax
handler = DomainDumpParser(self)
xml.sax.parse(doc, handler)
return handler | [
"def",
"from_xml",
"(",
"self",
",",
"doc",
")",
":",
"import",
"xml",
".",
"sax",
"handler",
"=",
"DomainDumpParser",
"(",
"self",
")",
"xml",
".",
"sax",
".",
"parse",
"(",
"doc",
",",
"handler",
")",
"return",
"handler"
] | Load this domain based on an XML document | [
"Load",
"this",
"domain",
"based",
"on",
"an",
"XML",
"document"
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/sdb/domain.py#L268-L273 |
50,977 | emory-libraries/eulfedora | eulfedora/models.py | DatastreamObject.isModified | def isModified(self):
"""Check if either the datastream content or profile fields have changed
and should be saved to Fedora.
:rtype: boolean
"""
# NOTE: only check content digest if locally cached content is set
# (content already pulled or new content set); otherwise t... | python | def isModified(self):
"""Check if either the datastream content or profile fields have changed
and should be saved to Fedora.
:rtype: boolean
"""
# NOTE: only check content digest if locally cached content is set
# (content already pulled or new content set); otherwise t... | [
"def",
"isModified",
"(",
"self",
")",
":",
"# NOTE: only check content digest if locally cached content is set",
"# (content already pulled or new content set); otherwise this",
"# results in pulling content down to checksum it !",
"return",
"self",
".",
"info_modified",
"or",
"self",
... | Check if either the datastream content or profile fields have changed
and should be saved to Fedora.
:rtype: boolean | [
"Check",
"if",
"either",
"the",
"datastream",
"content",
"or",
"profile",
"fields",
"have",
"changed",
"and",
"should",
"be",
"saved",
"to",
"Fedora",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L205-L215 |
50,978 | emory-libraries/eulfedora | eulfedora/models.py | DatastreamObject.save | def save(self, logmessage=None):
"""Save datastream content and any changed datastream profile
information to Fedora.
:rtype: boolean for success
"""
if self.as_of_date is not None:
raise RuntimeError('Saving is not implemented for datastream versions')
save... | python | def save(self, logmessage=None):
"""Save datastream content and any changed datastream profile
information to Fedora.
:rtype: boolean for success
"""
if self.as_of_date is not None:
raise RuntimeError('Saving is not implemented for datastream versions')
save... | [
"def",
"save",
"(",
"self",
",",
"logmessage",
"=",
"None",
")",
":",
"if",
"self",
".",
"as_of_date",
"is",
"not",
"None",
":",
"raise",
"RuntimeError",
"(",
"'Saving is not implemented for datastream versions'",
")",
"save_opts",
"=",
"{",
"}",
"if",
"self",... | Save datastream content and any changed datastream profile
information to Fedora.
:rtype: boolean for success | [
"Save",
"datastream",
"content",
"and",
"any",
"changed",
"datastream",
"profile",
"information",
"to",
"Fedora",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L326-L404 |
50,979 | emory-libraries/eulfedora | eulfedora/models.py | DatastreamObject.undo_last_save | def undo_last_save(self, logMessage=None):
"""Undo the last change made to the datastream content and profile, effectively
reverting to the object state in Fedora as of the specified timestamp.
For a versioned datastream, this will purge the most recent datastream.
For an unversioned da... | python | def undo_last_save(self, logMessage=None):
"""Undo the last change made to the datastream content and profile, effectively
reverting to the object state in Fedora as of the specified timestamp.
For a versioned datastream, this will purge the most recent datastream.
For an unversioned da... | [
"def",
"undo_last_save",
"(",
"self",
",",
"logMessage",
"=",
"None",
")",
":",
"# NOTE: currently not clearing any of the object caches and backups",
"# of fedora content and datastream info, as it is unclear what (if anything)",
"# should be cleared",
"if",
"self",
".",
"versionabl... | Undo the last change made to the datastream content and profile, effectively
reverting to the object state in Fedora as of the specified timestamp.
For a versioned datastream, this will purge the most recent datastream.
For an unversioned datastream, this will overwrite the last changes with
... | [
"Undo",
"the",
"last",
"change",
"made",
"to",
"the",
"datastream",
"content",
"and",
"profile",
"effectively",
"reverting",
"to",
"the",
"object",
"state",
"in",
"Fedora",
"as",
"of",
"the",
"specified",
"timestamp",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L419-L449 |
50,980 | emory-libraries/eulfedora | eulfedora/models.py | DatastreamObject.get_chunked_content | def get_chunked_content(self, chunksize=4096):
'''Generator that returns the datastream content in chunks, so
larger datastreams can be used without reading the entire
contents into memory.'''
# get the datastream dissemination, but return the actual http response
r = self.obj.a... | python | def get_chunked_content(self, chunksize=4096):
'''Generator that returns the datastream content in chunks, so
larger datastreams can be used without reading the entire
contents into memory.'''
# get the datastream dissemination, but return the actual http response
r = self.obj.a... | [
"def",
"get_chunked_content",
"(",
"self",
",",
"chunksize",
"=",
"4096",
")",
":",
"# get the datastream dissemination, but return the actual http response",
"r",
"=",
"self",
".",
"obj",
".",
"api",
".",
"getDatastreamDissemination",
"(",
"self",
".",
"obj",
".",
... | Generator that returns the datastream content in chunks, so
larger datastreams can be used without reading the entire
contents into memory. | [
"Generator",
"that",
"returns",
"the",
"datastream",
"content",
"in",
"chunks",
"so",
"larger",
"datastreams",
"can",
"be",
"used",
"without",
"reading",
"the",
"entire",
"contents",
"into",
"memory",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L451-L461 |
50,981 | emory-libraries/eulfedora | eulfedora/models.py | RdfDatastreamObject.replace_uri | def replace_uri(self, src, dest):
"""Replace a uri reference everywhere it appears in the graph with
another one. It could appear as the subject, predicate, or object of
a statement, so for each position loop through each statement that
uses the reference in that position, remove the old... | python | def replace_uri(self, src, dest):
"""Replace a uri reference everywhere it appears in the graph with
another one. It could appear as the subject, predicate, or object of
a statement, so for each position loop through each statement that
uses the reference in that position, remove the old... | [
"def",
"replace_uri",
"(",
"self",
",",
"src",
",",
"dest",
")",
":",
"# NB: The hypothetical statement <src> <src> <src> will be removed",
"# and re-added several times. The subject block will remove it and",
"# add <dest> <src> <src>. The predicate block will remove that and",
"# add <de... | Replace a uri reference everywhere it appears in the graph with
another one. It could appear as the subject, predicate, or object of
a statement, so for each position loop through each statement that
uses the reference in that position, remove the old statement, and
add the replacement. | [
"Replace",
"a",
"uri",
"reference",
"everywhere",
"it",
"appears",
"in",
"the",
"graph",
"with",
"another",
"one",
".",
"It",
"could",
"appear",
"as",
"the",
"subject",
"predicate",
"or",
"object",
"of",
"a",
"statement",
"so",
"for",
"each",
"position",
"... | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L618-L654 |
50,982 | emory-libraries/eulfedora | eulfedora/models.py | RdfDatastreamObject._prepare_ingest | def _prepare_ingest(self):
"""If the RDF datastream refers to the object by the default dummy
uriref then we need to replace that dummy reference with a real one
before we ingest the object."""
# see also commentary on DigitalObject.DUMMY_URIREF
self.replace_uri(self.obj.DUMMY_U... | python | def _prepare_ingest(self):
"""If the RDF datastream refers to the object by the default dummy
uriref then we need to replace that dummy reference with a real one
before we ingest the object."""
# see also commentary on DigitalObject.DUMMY_URIREF
self.replace_uri(self.obj.DUMMY_U... | [
"def",
"_prepare_ingest",
"(",
"self",
")",
":",
"# see also commentary on DigitalObject.DUMMY_URIREF",
"self",
".",
"replace_uri",
"(",
"self",
".",
"obj",
".",
"DUMMY_URIREF",
",",
"self",
".",
"obj",
".",
"uriref",
")"
] | If the RDF datastream refers to the object by the default dummy
uriref then we need to replace that dummy reference with a real one
before we ingest the object. | [
"If",
"the",
"RDF",
"datastream",
"refers",
"to",
"the",
"object",
"by",
"the",
"default",
"dummy",
"uriref",
"then",
"we",
"need",
"to",
"replace",
"that",
"dummy",
"reference",
"with",
"a",
"real",
"one",
"before",
"we",
"ingest",
"the",
"object",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L656-L662 |
50,983 | emory-libraries/eulfedora | eulfedora/models.py | DigitalObject.getDatastreamProfile | def getDatastreamProfile(self, dsid, date=None):
"""Get information about a particular datastream belonging to this object.
:param dsid: datastream id
:rtype: :class:`DatastreamProfile`
"""
# NOTE: used by DatastreamObject
if self._create:
return None
... | python | def getDatastreamProfile(self, dsid, date=None):
"""Get information about a particular datastream belonging to this object.
:param dsid: datastream id
:rtype: :class:`DatastreamProfile`
"""
# NOTE: used by DatastreamObject
if self._create:
return None
... | [
"def",
"getDatastreamProfile",
"(",
"self",
",",
"dsid",
",",
"date",
"=",
"None",
")",
":",
"# NOTE: used by DatastreamObject",
"if",
"self",
".",
"_create",
":",
"return",
"None",
"r",
"=",
"self",
".",
"api",
".",
"getDatastream",
"(",
"self",
".",
"pid... | Get information about a particular datastream belonging to this object.
:param dsid: datastream id
:rtype: :class:`DatastreamProfile` | [
"Get",
"information",
"about",
"a",
"particular",
"datastream",
"belonging",
"to",
"this",
"object",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L1389-L1400 |
50,984 | emory-libraries/eulfedora | eulfedora/models.py | DigitalObject._undo_save | def _undo_save(self, datastreams, logMessage=None):
"""Takes a list of datastreams and a datetime, run undo save on all of them,
and returns a list of the datastreams where the undo succeeded.
:param datastreams: list of datastream ids (should be in self.dscache)
:param logMessage: opti... | python | def _undo_save(self, datastreams, logMessage=None):
"""Takes a list of datastreams and a datetime, run undo save on all of them,
and returns a list of the datastreams where the undo succeeded.
:param datastreams: list of datastream ids (should be in self.dscache)
:param logMessage: opti... | [
"def",
"_undo_save",
"(",
"self",
",",
"datastreams",
",",
"logMessage",
"=",
"None",
")",
":",
"return",
"[",
"ds",
"for",
"ds",
"in",
"datastreams",
"if",
"self",
".",
"dscache",
"[",
"ds",
"]",
".",
"undo_last_save",
"(",
"logMessage",
")",
"]"
] | Takes a list of datastreams and a datetime, run undo save on all of them,
and returns a list of the datastreams where the undo succeeded.
:param datastreams: list of datastream ids (should be in self.dscache)
:param logMessage: optional log message | [
"Takes",
"a",
"list",
"of",
"datastreams",
"and",
"a",
"datetime",
"run",
"undo",
"save",
"on",
"all",
"of",
"them",
"and",
"returns",
"a",
"list",
"of",
"the",
"datastreams",
"where",
"the",
"undo",
"succeeded",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L1578-L1585 |
50,985 | emory-libraries/eulfedora | eulfedora/models.py | DigitalObject._get_datastreams | def _get_datastreams(self):
"""
Get all datastreams that belong to this object.
Returns a dictionary; key is datastream id, value is an :class:`ObjectDatastream`
for that datastream.
:rtype: dictionary
"""
if self._create:
# FIXME: should we default ... | python | def _get_datastreams(self):
"""
Get all datastreams that belong to this object.
Returns a dictionary; key is datastream id, value is an :class:`ObjectDatastream`
for that datastream.
:rtype: dictionary
"""
if self._create:
# FIXME: should we default ... | [
"def",
"_get_datastreams",
"(",
"self",
")",
":",
"if",
"self",
".",
"_create",
":",
"# FIXME: should we default to the datastreams defined in code?",
"return",
"{",
"}",
"else",
":",
"# NOTE: can be accessed as a cached class property via ds_list",
"r",
"=",
"self",
".",
... | Get all datastreams that belong to this object.
Returns a dictionary; key is datastream id, value is an :class:`ObjectDatastream`
for that datastream.
:rtype: dictionary | [
"Get",
"all",
"datastreams",
"that",
"belong",
"to",
"this",
"object",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L1765-L1781 |
50,986 | emory-libraries/eulfedora | eulfedora/models.py | DigitalObject.has_model | def has_model(self, model):
"""
Check if this object subscribes to the specified content model.
:param model: URI for the content model, as a string
(currently only accepted in ``info:fedora/foo:###`` format)
:rtype: boolean
"""
# TODO:
# - ac... | python | def has_model(self, model):
"""
Check if this object subscribes to the specified content model.
:param model: URI for the content model, as a string
(currently only accepted in ``info:fedora/foo:###`` format)
:rtype: boolean
"""
# TODO:
# - ac... | [
"def",
"has_model",
"(",
"self",
",",
"model",
")",
":",
"# TODO:",
"# - accept DigitalObject for model?",
"# - convert model pid to info:fedora/ form if not passed in that way?",
"try",
":",
"rels",
"=",
"self",
".",
"rels_ext",
".",
"content",
"except",
"RequestFailed",
... | Check if this object subscribes to the specified content model.
:param model: URI for the content model, as a string
(currently only accepted in ``info:fedora/foo:###`` format)
:rtype: boolean | [
"Check",
"if",
"this",
"object",
"subscribes",
"to",
"the",
"specified",
"content",
"model",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L2029-L2051 |
50,987 | emory-libraries/eulfedora | eulfedora/models.py | DigitalObject.get_models | def get_models(self):
"""
Get a list of content models the object subscribes to.
"""
try:
rels = self.rels_ext.content
except RequestFailed:
# if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT
# (in which case, it doe... | python | def get_models(self):
"""
Get a list of content models the object subscribes to.
"""
try:
rels = self.rels_ext.content
except RequestFailed:
# if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT
# (in which case, it doe... | [
"def",
"get_models",
"(",
"self",
")",
":",
"try",
":",
"rels",
"=",
"self",
".",
"rels_ext",
".",
"content",
"except",
"RequestFailed",
":",
"# if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT",
"# (in which case, it does not have any content models... | Get a list of content models the object subscribes to. | [
"Get",
"a",
"list",
"of",
"content",
"models",
"the",
"object",
"subscribes",
"to",
"."
] | 161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4 | https://github.com/emory-libraries/eulfedora/blob/161826f3fdcdab4007f6fa7dfd9f1ecabc4bcbe4/eulfedora/models.py#L2053-L2067 |
50,988 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.delete_auto_scaling_group | def delete_auto_scaling_group(self, name, force_delete=False):
"""
Deletes the specified auto scaling group if the group has no instances
and no scaling activities in progress.
"""
if(force_delete):
params = {'AutoScalingGroupName': name, 'ForceDelete': 'true'}
... | python | def delete_auto_scaling_group(self, name, force_delete=False):
"""
Deletes the specified auto scaling group if the group has no instances
and no scaling activities in progress.
"""
if(force_delete):
params = {'AutoScalingGroupName': name, 'ForceDelete': 'true'}
... | [
"def",
"delete_auto_scaling_group",
"(",
"self",
",",
"name",
",",
"force_delete",
"=",
"False",
")",
":",
"if",
"(",
"force_delete",
")",
":",
"params",
"=",
"{",
"'AutoScalingGroupName'",
":",
"name",
",",
"'ForceDelete'",
":",
"'true'",
"}",
"else",
":",
... | Deletes the specified auto scaling group if the group has no instances
and no scaling activities in progress. | [
"Deletes",
"the",
"specified",
"auto",
"scaling",
"group",
"if",
"the",
"group",
"has",
"no",
"instances",
"and",
"no",
"scaling",
"activities",
"in",
"progress",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L177-L186 |
50,989 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.create_launch_configuration | def create_launch_configuration(self, launch_config):
"""
Creates a new Launch Configuration.
:type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`
:param launch_config: LaunchConfiguration object.
"""
params = {'ImageId': launch_config.image_... | python | def create_launch_configuration(self, launch_config):
"""
Creates a new Launch Configuration.
:type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`
:param launch_config: LaunchConfiguration object.
"""
params = {'ImageId': launch_config.image_... | [
"def",
"create_launch_configuration",
"(",
"self",
",",
"launch_config",
")",
":",
"params",
"=",
"{",
"'ImageId'",
":",
"launch_config",
".",
"image_id",
",",
"'LaunchConfigurationName'",
":",
"launch_config",
".",
"name",
",",
"'InstanceType'",
":",
"launch_config... | Creates a new Launch Configuration.
:type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration`
:param launch_config: LaunchConfiguration object. | [
"Creates",
"a",
"new",
"Launch",
"Configuration",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L188-L215 |
50,990 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.create_scaling_policy | def create_scaling_policy(self, scaling_policy):
"""
Creates a new Scaling Policy.
:type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy`
:param scaling_policy: ScalingPolicy object.
"""
params = {'AdjustmentType': scaling_policy.adjustment_type,
... | python | def create_scaling_policy(self, scaling_policy):
"""
Creates a new Scaling Policy.
:type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy`
:param scaling_policy: ScalingPolicy object.
"""
params = {'AdjustmentType': scaling_policy.adjustment_type,
... | [
"def",
"create_scaling_policy",
"(",
"self",
",",
"scaling_policy",
")",
":",
"params",
"=",
"{",
"'AdjustmentType'",
":",
"scaling_policy",
".",
"adjustment_type",
",",
"'AutoScalingGroupName'",
":",
"scaling_policy",
".",
"as_name",
",",
"'PolicyName'",
":",
"scal... | Creates a new Scaling Policy.
:type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy`
:param scaling_policy: ScalingPolicy object. | [
"Creates",
"a",
"new",
"Scaling",
"Policy",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L217-L231 |
50,991 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.get_all_groups | def get_all_groups(self, names=None, max_records=None, next_token=None):
"""
Returns a full description of each Auto Scaling group in the given
list. This includes all Amazon EC2 instances that are members of the
group. If a list of names is not provided, the service returns the full
... | python | def get_all_groups(self, names=None, max_records=None, next_token=None):
"""
Returns a full description of each Auto Scaling group in the given
list. This includes all Amazon EC2 instances that are members of the
group. If a list of names is not provided, the service returns the full
... | [
"def",
"get_all_groups",
"(",
"self",
",",
"names",
"=",
"None",
",",
"max_records",
"=",
"None",
",",
"next_token",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"max_records",
":",
"params",
"[",
"'MaxRecords'",
"]",
"=",
"max_records",
"if",
... | Returns a full description of each Auto Scaling group in the given
list. This includes all Amazon EC2 instances that are members of the
group. If a list of names is not provided, the service returns the full
details of all Auto Scaling groups.
This action supports pagination by returnin... | [
"Returns",
"a",
"full",
"description",
"of",
"each",
"Auto",
"Scaling",
"group",
"in",
"the",
"given",
"list",
".",
"This",
"includes",
"all",
"Amazon",
"EC2",
"instances",
"that",
"are",
"members",
"of",
"the",
"group",
".",
"If",
"a",
"list",
"of",
"na... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L244-L273 |
50,992 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.get_all_launch_configurations | def get_all_launch_configurations(self, **kwargs):
"""
Returns a full description of the launch configurations given the
specified names.
If no names are specified, then the full details of all launch
configurations are returned.
:type names: list
:param names: ... | python | def get_all_launch_configurations(self, **kwargs):
"""
Returns a full description of the launch configurations given the
specified names.
If no names are specified, then the full details of all launch
configurations are returned.
:type names: list
:param names: ... | [
"def",
"get_all_launch_configurations",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"params",
"=",
"{",
"}",
"max_records",
"=",
"kwargs",
".",
"get",
"(",
"'max_records'",
",",
"None",
")",
"names",
"=",
"kwargs",
".",
"get",
"(",
"'names'",
",",
... | Returns a full description of the launch configurations given the
specified names.
If no names are specified, then the full details of all launch
configurations are returned.
:type names: list
:param names: List of configuration names which should be searched for.
:typ... | [
"Returns",
"a",
"full",
"description",
"of",
"the",
"launch",
"configurations",
"given",
"the",
"specified",
"names",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L275-L309 |
50,993 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.get_all_activities | def get_all_activities(self, autoscale_group, activity_ids=None,
max_records=None, next_token=None):
"""
Get all activities for the given autoscaling group.
This action supports pagination by returning a token if there are more
pages to retrieve. To get the ne... | python | def get_all_activities(self, autoscale_group, activity_ids=None,
max_records=None, next_token=None):
"""
Get all activities for the given autoscaling group.
This action supports pagination by returning a token if there are more
pages to retrieve. To get the ne... | [
"def",
"get_all_activities",
"(",
"self",
",",
"autoscale_group",
",",
"activity_ids",
"=",
"None",
",",
"max_records",
"=",
"None",
",",
"next_token",
"=",
"None",
")",
":",
"name",
"=",
"autoscale_group",
"if",
"isinstance",
"(",
"autoscale_group",
",",
"Aut... | Get all activities for the given autoscaling group.
This action supports pagination by returning a token if there are more
pages to retrieve. To get the next page, call this action again with
the returned token as the NextToken parameter
:type autoscale_group: str or
:class... | [
"Get",
"all",
"activities",
"for",
"the",
"given",
"autoscaling",
"group",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L311-L342 |
50,994 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.delete_scheduled_action | def delete_scheduled_action(self, scheduled_action_name,
autoscale_group=None):
"""
Deletes a previously scheduled action.
:type scheduled_action_name: str
:param scheduled_action_name: The name of the action you want
to delete.
:type... | python | def delete_scheduled_action(self, scheduled_action_name,
autoscale_group=None):
"""
Deletes a previously scheduled action.
:type scheduled_action_name: str
:param scheduled_action_name: The name of the action you want
to delete.
:type... | [
"def",
"delete_scheduled_action",
"(",
"self",
",",
"scheduled_action_name",
",",
"autoscale_group",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'ScheduledActionName'",
":",
"scheduled_action_name",
"}",
"if",
"autoscale_group",
":",
"params",
"[",
"'AutoScalingGroupN... | Deletes a previously scheduled action.
:type scheduled_action_name: str
:param scheduled_action_name: The name of the action you want
to delete.
:type autoscale_group: str
:param autoscale_group: The name of the autoscale group. | [
"Deletes",
"a",
"previously",
"scheduled",
"action",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L344-L359 |
50,995 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.terminate_instance | def terminate_instance(self, instance_id, decrement_capacity=True):
"""
Terminates the specified instance. The desired group size can
also be adjusted, if desired.
:type instance_id: str
:param instance_id: The ID of the instance to be terminated.
:type decrement_capabi... | python | def terminate_instance(self, instance_id, decrement_capacity=True):
"""
Terminates the specified instance. The desired group size can
also be adjusted, if desired.
:type instance_id: str
:param instance_id: The ID of the instance to be terminated.
:type decrement_capabi... | [
"def",
"terminate_instance",
"(",
"self",
",",
"instance_id",
",",
"decrement_capacity",
"=",
"True",
")",
":",
"params",
"=",
"{",
"'InstanceId'",
":",
"instance_id",
"}",
"if",
"decrement_capacity",
":",
"params",
"[",
"'ShouldDecrementDesiredCapacity'",
"]",
"=... | Terminates the specified instance. The desired group size can
also be adjusted, if desired.
:type instance_id: str
:param instance_id: The ID of the instance to be terminated.
:type decrement_capability: bool
:param decrement_capacity: Whether to decrement the size of the
... | [
"Terminates",
"the",
"specified",
"instance",
".",
"The",
"desired",
"group",
"size",
"can",
"also",
"be",
"adjusted",
"if",
"desired",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L361-L379 |
50,996 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.delete_policy | def delete_policy(self, policy_name, autoscale_group=None):
"""
Delete a policy.
:type policy_name: str
:param policy_name: The name or ARN of the policy to delete.
:type autoscale_group: str
:param autoscale_group: The name of the autoscale group.
"""
p... | python | def delete_policy(self, policy_name, autoscale_group=None):
"""
Delete a policy.
:type policy_name: str
:param policy_name: The name or ARN of the policy to delete.
:type autoscale_group: str
:param autoscale_group: The name of the autoscale group.
"""
p... | [
"def",
"delete_policy",
"(",
"self",
",",
"policy_name",
",",
"autoscale_group",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'PolicyName'",
":",
"policy_name",
"}",
"if",
"autoscale_group",
":",
"params",
"[",
"'AutoScalingGroupName'",
"]",
"=",
"autoscale_group... | Delete a policy.
:type policy_name: str
:param policy_name: The name or ARN of the policy to delete.
:type autoscale_group: str
:param autoscale_group: The name of the autoscale group. | [
"Delete",
"a",
"policy",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L381-L394 |
50,997 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.get_all_autoscaling_instances | def get_all_autoscaling_instances(self, instance_ids=None,
max_records=None, next_token=None):
"""
Returns a description of each Auto Scaling instance in the instance_ids
list. If a list is not provided, the service returns the full details
of all in... | python | def get_all_autoscaling_instances(self, instance_ids=None,
max_records=None, next_token=None):
"""
Returns a description of each Auto Scaling instance in the instance_ids
list. If a list is not provided, the service returns the full details
of all in... | [
"def",
"get_all_autoscaling_instances",
"(",
"self",
",",
"instance_ids",
"=",
"None",
",",
"max_records",
"=",
"None",
",",
"next_token",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"instance_ids",
":",
"self",
".",
"build_list_params",
"(",
"para... | Returns a description of each Auto Scaling instance in the instance_ids
list. If a list is not provided, the service returns the full details
of all instances up to a maximum of fifty.
This action supports pagination by returning a token if there are more
pages to retrieve. To get the n... | [
"Returns",
"a",
"description",
"of",
"each",
"Auto",
"Scaling",
"instance",
"in",
"the",
"instance_ids",
"list",
".",
"If",
"a",
"list",
"is",
"not",
"provided",
"the",
"service",
"returns",
"the",
"full",
"details",
"of",
"all",
"instances",
"up",
"to",
"... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L400-L430 |
50,998 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.get_all_policies | def get_all_policies(self, as_group=None, policy_names=None,
max_records=None, next_token=None):
"""
Returns descriptions of what each policy does. This action supports
pagination. If the response includes a token, there are more records
available. To get the add... | python | def get_all_policies(self, as_group=None, policy_names=None,
max_records=None, next_token=None):
"""
Returns descriptions of what each policy does. This action supports
pagination. If the response includes a token, there are more records
available. To get the add... | [
"def",
"get_all_policies",
"(",
"self",
",",
"as_group",
"=",
"None",
",",
"policy_names",
"=",
"None",
",",
"max_records",
"=",
"None",
",",
"next_token",
"=",
"None",
")",
":",
"params",
"=",
"{",
"}",
"if",
"as_group",
":",
"params",
"[",
"'AutoScalin... | Returns descriptions of what each policy does. This action supports
pagination. If the response includes a token, there are more records
available. To get the additional records, repeat the request with the
response token as the NextToken parameter.
If no group name or list of policy na... | [
"Returns",
"descriptions",
"of",
"what",
"each",
"policy",
"does",
".",
"This",
"action",
"supports",
"pagination",
".",
"If",
"the",
"response",
"includes",
"a",
"token",
"there",
"are",
"more",
"records",
"available",
".",
"To",
"get",
"the",
"additional",
... | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L440-L471 |
50,999 | yyuu/botornado | boto/ec2/autoscale/__init__.py | AutoScaleConnection.suspend_processes | def suspend_processes(self, as_group, scaling_processes=None):
"""
Suspends Auto Scaling processes for an Auto Scaling group.
:type as_group: string
:param as_group: The auto scaling group to suspend processes on.
:type scaling_processes: list
:param scaling_processes: ... | python | def suspend_processes(self, as_group, scaling_processes=None):
"""
Suspends Auto Scaling processes for an Auto Scaling group.
:type as_group: string
:param as_group: The auto scaling group to suspend processes on.
:type scaling_processes: list
:param scaling_processes: ... | [
"def",
"suspend_processes",
"(",
"self",
",",
"as_group",
",",
"scaling_processes",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'AutoScalingGroupName'",
":",
"as_group",
"}",
"if",
"scaling_processes",
":",
"self",
".",
"build_list_params",
"(",
"params",
",",
... | Suspends Auto Scaling processes for an Auto Scaling group.
:type as_group: string
:param as_group: The auto scaling group to suspend processes on.
:type scaling_processes: list
:param scaling_processes: Processes you want to suspend. If omitted, all
processes will be suspen... | [
"Suspends",
"Auto",
"Scaling",
"processes",
"for",
"an",
"Auto",
"Scaling",
"group",
"."
] | fffb056f5ff2324d1d5c1304014cfb1d899f602e | https://github.com/yyuu/botornado/blob/fffb056f5ff2324d1d5c1304014cfb1d899f602e/boto/ec2/autoscale/__init__.py#L481-L495 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.