Templates for a few companies. SPS notes.

This commit is contained in:
Norm Rasmussen
2023-03-28 16:55:54 -04:00
parent 5f971353ec
commit f373159238
7 changed files with 91 additions and 1 deletions

View File

@ -22,3 +22,7 @@ Phase 2: Cross functional, deeper training for clients who also have CSMs.
### Chat with Paul
Name, Email, Company Name & Company ID - IDEAL parameters.
## 03/27/2023
### Content Implementation

View File

@ -15,3 +15,10 @@ DONE: Ask Patrycja to add me to the final run through.
To start for the 23rd, people are getting assigned to learning paths. But self-selection in groups is the ideal long-term setup.
Ocean Academy or Stripe type landing page would be ideal for self-selection.
Actually start on 27th. 23rd is 100% ready and QA done. 27th are real people.
## 03/28/2023
### Mizuno Running Kickoff with Matt
TODO: Confirm dates with Matt for Sales conference.
Matt to collect the rest of the videos etc for the course.

View File

@ -187,3 +187,7 @@ Feedback from clients:
* Ask product to make search results available to non-authenticated users.
Start up weekly meetings with Kaisa for 10am on Tuesday
## 03/28/2023
GetVero is the customer emailing platform they currently use. They wanted to do it via Segment.

View File

@ -118,3 +118,13 @@ Kayla thought it could be the webinar template in Zoom.
Default- expanded sections
course prop boolean
t/F - collapsed sections
## 03/28/2023
### Answers for Kathleen
Borders in tables _can_ be hidden! Add this code to your table in HTML:
```html
<table style="width: 100%; border:hidden;"><tbody><tr><td style="width: 50.0000%; border:hidden;">
```

View File

@ -3,6 +3,7 @@ import json
import Apikeys
def get_course():
count = 0
apiKey = Apikeys.walmartprod
@ -30,7 +31,6 @@ def get_course():
if "next" not in nextlink:
break
print(live_courses)

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

65
Scripts/drac_test.py Normal file
View File

@ -0,0 +1,65 @@
import adbase
import json
import time
import requests
class birdnet(adbase.ADBase):
def initialize(self):
self.hassapi = self.get_plugin_api("HASS")
self.adapi = self.get_ad_api()
self.mqttapi = self.get_plugin_api("MQTT")
self.birdnet_mqtt = "birdnet"
self.mqttapi.listen_event(
self.birdnet_message, "MQTT_MESSAGE", topic=self.birdnet_mqtt
)
def birdnet_message(self, event_name, data, kwargs):
pre_split = data["payload"]
common_name = pre_split.split(",")[0].strip()
science_name = pre_split.split(",")[1].strip()
date_seen = pre_split.split(",")[2].strip
time_seen = pre_split.split(",")[3].strip()
confidence = pre_split.split(",")[5].strip()
# print(f"A {common_name} was seen on {date_seen} at {time_seen}. Confidence is {confidence}.")
self.mqttapi.mqtt_publish("birdnet/sensors/common_name", common_name)
self.mqttapi.mqtt_publish("birdnet/sensors/science_name", science_name)
self.mqttapi.mqtt_publish("birdnet/sensors/time_seen", time_seen)
self.mqttapi.mqtt_publish("birdnet/sensors/date_seen", date_seen)
self.mqttapi.mqtt_publish("birdnet/sensors/confidence", confidence)
url = f"https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles={science_name}"
response = requests.get(url)
response = response.json()
for value in response["query"]["pages"]:
wiki_desc = response["query"]["pages"][value]["extract"]
self.hassapi.set_state(
"sensor.birdnet_wiki", state="on", attributes={"description": wiki_desc}
)
headers = {"User-Agent": "Python_Flickr/1.0"}
flickr_api = "2b550e7db4a944843a46e57c263582e3"
flickr_url = f"https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key={flickr_api}&text={common_name} bird&sort=relevance&per_page=5&media=photos&format=json&nojsoncallback=1"
flickr_resp = requests.get(url=flickr_url, headers=headers)
data = flickr_resp.json()["photos"]["photo"][0]
print(data)
image_url = (
"https://farm"
+ str(data["farm"])
+ ".static.flickr.com/"
+ str(data["server"])
+ "/"
+ str(data["id"])
+ "_"
+ str(data["secret"])
+ "_n.jpg"
)
self.hassapi.set_state(
"sensor.birdpic_test", state="on", attributes={"image": image_url}
)