コード例 #1
0
def showIPPanel(panelfloat=True):
	'''Show viewer input control panel'''
	try:
		node_ip = nuke.activeViewer().node()['input_process_node'].value()
		nuke.toNode(node_ip).showControlPanel(forceFloat=panelfloat)
		print "VIEWER_INPUT Shown"
	except:
		if nuke.ask('No Viewer_Input found, load one?'):
			import os
			nuke.loadToolset(os.path.join(os.getEnv('HOME'), '.nuke/ToolSets/Utility/ku_IP.nk'))
		else:
			nuke.message("Oh well then")
コード例 #2
0
import os
import boto3
import datetime

bucket_name = os.getenv('BUCKET_NAME')

# Create bucket
boto3.resource('s3').create_bucket(Bucket=bucket_name)

try:
    # Create key pair
    key_pair = boto3.resource('ec2').create_key_pair(
        KeyName=os.getenv('KEY_NAME'))

    # Store in key pair S3 bucket
    key_name = '{}.pem'.format(os.getEnv('KEY_NAME'))

    s3 = boto3.client('s3')
    s3.put_object(Body=key_pair.key_material, Bucket=bucket_name, Key=key_name)

except Exception as e:
    pass

print("Success")