RESTAPI

Teams botframework send proactive message REST api

走远了吗. 提交于 2021-02-11 12:33:01
问题 I Try to create new converation and send proactive message with teams bot (botfreamwork). I used this document to do that. I POST to : SERVICE_URL/v3/conversations/ BODY: { "bot": { "id": BOT_ID }, "members": [ { "id": USER_ID } ], "channelData": { "tenant": { "id": TENANT_ID } } } BOT_ID - I put the app id of the bot (with a prefix of "28:") USERֹ_ID - I copied the USER_ID from a message I received from the user (not in a proactive message) TENANT_ID - I took the tenant id from the link of

Deploying ML models with Flask and Gunicorn

℡╲_俬逩灬. 提交于 2021-01-29 15:44:15
问题 I'm deploying a ML model for the first time. I'm using flask-restful to create a rest api and gunicorn as stand-alone WSGI.my project directory has only 2 files , ML_model.py and rApi.py. i installed gunicorn and ran the server using gunicorn -w 4 -b 127.0.0.1:5000 rApi:app and i'm able to use the restAPi. I see many things like .env , .config and wsgi.py files mentioned in tutorials available online. what am I missing. why do i need all those files if i can use the API already? 回答1: I see

angular/ts/json: from total records how to know the count of matching the specific values

*爱你&永不变心* 提交于 2021-01-29 05:23:17
问题 From the below data how to get the count of applicable impact, not applicable impact n FYI impact for assigned_to nested record instead of parent. So, the expected results will be: For 1st Record Applicable:2 Not Applicable: 1 For 2nd Record Applicable:1 Not Applicable: 1 db.json [ { "id": 1, "first_name": "Male", "last_name": "Record", "email": "male.record@gmail.com", "gender": "Male", "dob": "01-01-1987", "impact": "Not Applicable", "score": "Updated", "checked": false, "assigned_to": [ {

mongoose Date comparing without time and Group by createdAt and staffId with Weekly, monthly and Yearly total of staff count by aggregation?

妖精的绣舞 提交于 2021-01-20 10:53:17
问题 Might be question is look like duplicate but apologize for it. I want to aggregate the weekly, Monthly, Yearly result basis of createdAt property without time and staffId . Model is like below: { "_id" : ObjectId("5f351f3d9d90b1281c44c5dp"), "staffId" : 12345, "category" : "trend", "page_route" : "http://example.com/rer", "expireAt" : ISODate("2020-08-13T11:08:45.196Z"), "createdAt" : ISODate("2020-08-13T11:08:45.199Z"), "updatedAt" : ISODate("2020-08-13T11:08:45.199Z"), "__v" : 0 } { "_id" :

mongoose Date comparing without time and Group by createdAt and staffId with Weekly, monthly and Yearly total of staff count by aggregation?

拜拜、爱过 提交于 2021-01-20 10:49:52
问题 Might be question is look like duplicate but apologize for it. I want to aggregate the weekly, Monthly, Yearly result basis of createdAt property without time and staffId . Model is like below: { "_id" : ObjectId("5f351f3d9d90b1281c44c5dp"), "staffId" : 12345, "category" : "trend", "page_route" : "http://example.com/rer", "expireAt" : ISODate("2020-08-13T11:08:45.196Z"), "createdAt" : ISODate("2020-08-13T11:08:45.199Z"), "updatedAt" : ISODate("2020-08-13T11:08:45.199Z"), "__v" : 0 } { "_id" :