EmbeddingVariable

soft_placement=True,log_device_placement=False)with tf.Session(config=sess_config)as sess:sess.run(init)print("init global done")sess.run(init_local)print("init local done")print(sess.run([emb,train_op,loss]))print(sess....

SMTP 之 Python2 调用示例

e:print '邮件发送失败,发件人被拒绝:',e.smtp_code,e.smtp_error except smtplib.SMTPRecipientsRefused,e:print '邮件发送失败,收件人被拒绝:',e.smtp_code,e.smtp_error except smtplib.SMTPDataError,e:print '邮件发送失败,数据...

媒体处理

clt=init_vod_client()jobs=hlsencrypt_submit_transcode_jobs(clt)print(jobs['TranscodeJobs']['TranscodeJob'])print(json.dumps(jobs,ensure_ascii=False,indent=4))except Exception as e:print(e)print(traceback.format_exc())提交...

快速入门

print(iris.apply(handle,axis=1).head(5))运行结果:#print(iris.head(10))sepallength sepalwidth petallength petalwidth name 0 4.9 3.0 1.4 0.2 Iris-setosa 1 4.7 3.2 1.3 0.2 Iris-setosa 2 4.6 3.1 1.5 0.2 Iris-setosa 3 5.0 3.6 ...

PHP Demo

} catch(ClientException$exception){/获取错误消息 print_r($exception->getErrorMessage());} catch(ServerException$exception){/获取错误消息 print_r($exception->getErrorMessage());} } function getFileTransResult($taskId){$...

PyODPS读取分区表数据

with t.open_reader(partition='dt=20190715,region=beijing')as reader1:count=reader1.count print("第一种方式查询分区表数据:")for record in reader1:print record[0],record[1],record[2]#第二种方式如下。print("第二种方式查询...

使用Python SDK管理项目Project

def get_project():print("ready to get project")res=client.get_project(project_name)print("the project name is:"+res.get_projectname())print("the project region is:"+res.get_region())print("the project create time is:"+res....

通过PHP SDK使用SQL独享版

foreach($log->getContents()as$key=>$value){ print$key.":".$value."\t;} print";}/打印计算结果的统计信息。处理的日志行数。print"proccesedRows:".$response->getProcessedRows().";SQL分析执行的时长。print"elapsedMilli:".$...

绑定自定义域名

print(result.expire_time)获取CnameToken 以下代码用于获取CnameToken。coding:utf-8-*-import oss2 from oss2.credentials import EnvironmentVariableCredentialsProvider#从环境变量中获取访问凭证。运行本代码示例之前,请确保已设置...

Python Demo

ReceiptHandle:%s MessageBody:%s MessageID:%s"%(recv_msg.receipt_handle,recv_msg.message_body,recv_msg.message_id))except MNSExceptionBase as e:if e.type="QueueNotExist":print("Queue not exist,please create queue before ...

管道管理

} catch(Exception$e){ print$e->getMessage().";} function addPipeline($client){$request=new Mts\AddPipelineRequest();request->setName("test-pipeline");request->setSpeed('Standard');return$client->getAcsResponse($request);} ...

主题+QueueEndpoint使用手册

TopicName:%s SubName:%s Endpoint:%s"%(topic_name,sub_name,queue_endpoint)except MNSExceptionBase,e:if e.type="TopicNotExist":print"Topic not exist,please create topic."sys.exit(0)elif e.type="SubscriptionAlreadyExist":...

执行

示例#非交互环境执行,需手动调用execute方法 print(iris[iris.sepallength][:5].execute())#交互环境执行,自动调用execute方法 print(iris[iris.sepallength][:5])返回结果:sepallength sepalwidth petallength petalwidth name 0 4.9 3...

媒资管理

for(SearchMediaResponse.Media media:response.getMediaList()){ System.out.print("MediaId="+media.getMediaId()+"");System.out.print("MediaType="+media.getMediaType()+"");System.out.print("CreationTime="+media.getCreationTime...

Python Demo

ReceiptHandle:%s MessageBody:%s MessageID:%s"%(recv_msg.receipt_handle,recv_msg.message_body,recv_msg.message_id))except MNSExceptionBase as e:if e.type="QueueNotExist":print("Queue not exist,please create queue before ...

Python SDK调用示例

object.sub_code)print(response.result_object.verify_info)print(response.result_object.risk_info)@staticmethod def contrast_smart_verify_auto_route(request:cloudauth_models.ContrastSmartVerifyRequest,)->cloudauth_models....

媒体上传

} catch(Exception e){ System.out.print("ErrorMessage="+e.getLocalizedMessage());} } } 刷新音/视频上传凭证 调用RefreshUploadVideo接口,完成刷新音/视频上传凭证功能。阿里云OpenAPI门户地址:RefreshUploadVideo。调用示例如下:...

获取文件元数据

simplifiedmeta=bucket.get_object_meta("yourObjectName",params=params)print(simplifiedmeta.headers['Last-Modified'])print(simplifiedmeta.headers['Content-Length'])print(simplifiedmeta.headers['ETag'])#获取文件的全部元数据。...

基于Python DB-API的应用开发

10)"print(sql_update)statement.execute(sql_update)#查询 sql_select="select*from test_python"print(sql_select)statement.execute(sql_select)rows=statement.fetchall()print(rows)#禁用表。宽表引擎版本为2.2.16至2.4.1时,删除表前...

分组检索Doc

Python ret=collection.query_group_by(id='1',group_by_field='name',)#判断query接口是否成功 if ret:print('query_group_by success')print(len(ret))for group in ret:print('group:',group.group_id)for doc in group.docs:print(doc)...

使用Python SDK管理日志库Logstore

print("ready to list logstore")res=client.list_logstore(project_name,None,0,100)for logstore in res.get_logstores():print(logstore)print("list logstore success")预期结果如下:ready to list logstore ali-test-logstore ali-...

静态网站托管(镜像回源)

website=bucket.get_bucket_website()print('Index file is {0},error file is {1}'.format(website.index_file,website.error_file))except oss2.exceptions.NoSuchWebsite as e:print('Website is not configured,request_id={0}'.format...

访问NAS示例

1]nas_dirs=[x.split()[-1]for x in lines]print('uid:'+str(os.geteuid()))print('gid:'+str(os.getgid()))for nas_dir in nas_dirs:sub_dir=randomString(16)file_name=randomString(6)+'.txt' new_dir=nas_dir+'/'+sub_dir+'/' print('...

Sequence

print(iris['sepallength'].head(5))返回结果 sepallength 0 4.9 1 4.7 2 4.6 3 5.0 4 5.4 列类型 DataFrame拥有自己的类型系统,进行表初始化时,MaxCompute的类型会被转换成对应的DataFrame类型,以便支持更多类型的计算后端。...

行业运营版功能详解

AIRec智能推荐行业运营版版本功能详解 行业运营版简介 行业运营版是AIRec智能推荐专为中小型流量推荐场景打造的智能推荐算法,行业运营版拥有完整的阿里巴巴自研推荐算法体验 行业运营版特色 丰富的行业模板 包含电商、新闻、内容行业算法...

使用Python SDK管理机器组

client.update_machine_group(project_name,machine_group_detail)print("After update,the machine list is:")res2=client.get_machine_group(project_name,group_name)print(res2.get_machine_group().machine_list)print("update ...

getThingProperties

["LightSwitch"]}#The property defined in the Product TSL.res=lesdk.getThingProperties(get_params)print(res)if 'LightSwitch' in res.keys():print("-[Success]LightSwitch=s"%res['LightSwitch'])if res['LightSwitch']='0':print(...

查询Endpoint信息

print('accelerate_endpoint:{0}'.format(r.accelerate_endpoint))查询指定地域对应的Endpoint信息 以下代码用于查询指定地域对应的Endpoint信息。coding:utf-8-*-import oss2 from oss2.credentials import ...

PyODPS的列运算

data={'id':[1,2],'a':[['a1','b1'],['c1']],'b':[{'a2':0,'b2':1,'c2':2},{'d2':3,'e2':4}]} df=pd.DataFrame(data)print df df1=DataFrame(df,unknown_as_string=True,as_type={'a':'list<string>','b':'dict,int64>'})print df1.dtypes ...

通过CLI工具使用边缘脚本

json=json.loads(body)body_str=json.dumps(body_json,indent=4)print"Response Info:="print body_str return if r.getcode()=200:print"Response Code:=200 OK"print"Response Info:="body=r.read()body_json=json.loads(body)body_str=...

通过CLI工具使用边缘脚本

json=json.loads(body)body_str=json.dumps(body_json,indent=4)print"Response Info:="print body_str return if r.getcode()=200:print"Response Code:=200 OK"print"Response Info:="body=r.read()body_json=json.loads(body)body_str=...

列举文件

foreach($objectList as$objectInfo){ print($objectInfo->getKey()."");} } 通过listObjectsV2方法 以下代码用于通过listObjectsV2方法列举examplebucket下的200个文件。php if (is_file(_DIR_.'/./autoload.php')){ require_once_DIR_.'...

获取Doc

如果指定的ID不存在,则返回的output为空 if doc_id in docs:doc=docs[doc_id]print(doc.id)print(doc.vector)print(doc.fields)#遍历返回结果 for id in docs:print(docs[id])#批量fetch docs=collection.fetch(['1','2'])入参描述 参数 ...

Python

本文介绍如何在Python中通过MySQLdb的module连接 AnalyticDB MySQL 集群。usr/bin/python#-*-coding:UTF-8-*-...Python 3的print需要加括号,print("Database version:%s"%data)。print"Database version:%s"%data#关闭数据库连接。db.close()

算法配置版功能详解

行业运营版功能详解 实验平台功能 算法配置版专属能力。实验平台提供了完善的ABTest实验平台,平台中的每个实验、场景互相隔离,可自由分配流量。利用实验平台功能,您可以创建不同的实验,为其分配流量,然后直观的对比采用了不同策略的...

包中定义集合类型

CREATE OR REPLACE PACKAGE BODY pkg AS PROCEDURE print(nums NumberList)IS BEGIN FOR i IN nums.FIRST.nums.LAST LOOP RAISE NOTICE '%',nums(i);END LOOP;END;END;DECLARE TYPE CharList IS TABLE OF VARCHAR(10);n1 pkg.NumberList:=...

收发普通消息

try:receipt_handle_list=[msg.receipt_handle for msg in recv_msgs]consumer.ack_message(receipt_handle_list)print(("Ak%s Message Succeed."%len(receipt_handle_list)))except MQExceptionBase as e:print(("Ak Message Fail!...

LiveChannel管理

get_result=bucket.get_live_channel(channel_name)print("-")print("推流配置信息")print(get_result.description)print(get_result.status)print(get_result.target.type)print(get_result.target.frag_count)print(get_result.target....

视频审核

request.set_content(HttpContentHelper.toValue({"tasks":[task],"scenes":["terrorism"]}))response=clt.do_action_with_exception(request)print(response)result=json.loads(response)if 200=result["code"]:taskResults=result["data...

FeatureStore Python SDK

feature_view.write_table(ds,{'ds':'20220830'})write_table_task.wait()print(write_table_task.task_summary)cur_task=batch_feature_view.publish_table({'ds':'20220830'})cur_task.wait()print(cur_task.task_summary)batch_feature_...
共有58条 < 1 2 3 4 ... 58 >
跳转至: GO
产品推荐
云服务器 安全管家服务 安全中心
这些文档可能帮助您
弹性公网IP 短信服务 人工智能平台 PAI 金融分布式架构 对象存储 物联网平台
新人特惠 爆款特惠 最新活动 免费试用