Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/p/r/prosthetic-runner-HEAD/dreamer/prosthetic.py   prosthetic-runner(Download)
    def act(self, force=False):
 
        state = self.get("/1/weavr/state/")
        if state["awake"] and not force:
            logging.info("weavr is awake. not dreaming.")
        # find all the image posts that I _didn't_ write.
        since = datetime.datetime.utcnow() - datetime.timedelta(days = 2)
        posts = self.get("/1/weavr/post/", { "category":"image", "after":since.strftime("%Y-%m-%dT%H:%M:%SZ") })["posts"]
        images = filter(lambda p: (p["category"] == 'image') and (not p["posted_by_calling_prosthetic"]), posts)
        logging.info("got images " + repr(images))

src/p/r/prosthetic-runner-HEAD/emotional/prosthetic.py   prosthetic-runner(Download)
    def act(self, force=False):
        state = self.get("/1/weavr/state/")
        if not state["awake"] and not force:
            logging.info("weavr is sleeping. not emotional.")
            return "weavr is asleep - refusing to be emotional"