Welcome back ladies and gentlemen, have you missed me? It's been a couple days and I apologize, listen I've been very very very very very very busy. Hey but I'm back and I was bored on Twitter. I posted this today. I desperately need some funny 2k memes and you guys responded so hopefully they're funny this time. I went to do these on Reddit and I put out a tweet but nobody else was able to help me do it so we're just gonna we're just gonna do them on Twitter. When your matchup is going off and someone screams, who's mans is that? Ladies and gentlemen I'm usually the one screaming that and it's usually my bum ass teammates blowing coverages and I see it happen but I ask the question anyway just to see if they adopt responsibility. Hey if you guys want some very funny videos of us in Pro Am, I dropped when it got demonetized last week because it's a lot of swearing. But I didn't want to censor the swearing because it was just so damn crystal pure great content alright but yeah it was a lot of this going on and it's some of the most hilarious moments. Card above link in the description. Me help they're setting double screens up top. My teammates. That's just accurate. I don't know what this is just so accurate. I'm gonna just leave it like that. The 2k league owes you a check for that drama and that's a fact. Agent Beamstar has been saying for a very long time they need some drama. Drama pulls views and what happened? There was a fight and everybody and their parents covered it. Ladies and gentlemen if you want to grow your business, Agent Beamstar, the business guru, he's back in the workshop right now. He's gonna help you. Alright for a cheap cost of $25,000 per session. I'm telling you bro he's gonna take your business to the next level. Davis link this photo. Davis link this photo. I did it. And if you know, you know. Me just trying to find a fun my team game. I don't understand my team memes. At all. Y'all let Hadoo Turcaloo terrorize your community? This guy?  Pure sharpshooter in the NBA. You let him do that. I have never in my life met a single Hadoo Turcaloo fan ever. I remember in 2k15 and 16 I used to abuse Dirk Novitsky and Byron Scott. Those guys were budget friendly and OD. Things worse than 2k18. He opens the door. Wow look nothing. There's a couple things. The servers. Micro transactions. But all in all, you're right. Very very accurate. I can't stream for 5 minutes without someone saying throw a chair. Found this meme on the internet. Dropped it as a reply. Phantom loses a game. His chair. Tom and Jerry cat meme ladies and gentlemen. How is that not a perfect use of that meme? My goodness Agent Beamstar. I know what an 8 out of 10 meme that is. Phantom was streaming the other day and I'm not gonna lie to you. I almost thought about doing it again. But I was just talking in this chat for a little bit. I have a heart ladies and gentlemen. The guy doesn't have an unlimited wallet. He can't just keep buying chairs every time he loses to me. Paul George. He mad far and I'm contesting it. We going to OT. Damian Lillard. Green. PG. Green. That one got 73 likes. That was funny to y'all huh? Alright Blaze literally just sent me a DM with a meme and he didn't even know I was recording this. Just out of thin air which means this must be the greatest meme of all time. Alright man. I don't know what to say about that one. Okay I guess okay yeah they do do that from time to time when they get takeover. Great great addition Blaze. Thank you so much for the link. 2k devs. We have removed pushing. Post scorers. Well yes but actually no. Yeah I'm missing the mark today. I'm gonna keep it at 1000. That was the one. This has 64 likes. Fix the servers. Give us cross plate. Nerf pier stretches. Add do rags. And here we have the 2k developers. Clicking circle. What a brilliant enemy.  I used to do funny joking sarcastic videos back in 2k16 begging 2k for do rags. And now that they have do rags in the game I can't even wear them because I had the face can and you can't put things on your head so I'm just incredibly depressed ladies and gentlemen. I'm not even mad. I'd rather have do rags than all that stuff ladies and gentlemen. I'm making 2k19 great. It's never gonna be great. I just came to the realization it could have been great but it's gonna stay mid tier ladies and gentlemen. I went to the store remember that one video I had uh Braids. I went to the store to get a do right 299 boom silky do right. I come home and I find out 2k is literally releasing do rags for that are more expensive in the game than in real life. 2k just I don't get the company man. You guys ran out of virtual clothes at the store. When somebody asked Ronnie about it Ronnie was like yeah we wanted to make it realistic. Ronnie if you want to make this game realistic drop the latency so we can play like we do in real life all right. So we can have that great reaction speed okay. Work on the server so we don't lag. Nobody lags in real life. That's realism ladies and gentlemen. What are you talking about you made the do rags expensive and limited for realism. You can explore realism in 16 different realms that would actually make the game better. I'm serious. I don't I know he just said that to avoid the question but it's like oh look the next meme has to do with Ronnie 2k. Suggestions on how to make a better 2k. Here's Ronnie ducking and dodging ladies and gentlemen. You know what would be a good meme. You guys remember that video of Muhammad Ali in the corner just not even attack and just straight up ducking and dodging. There needs to be a meme of Ronnie 2k being tracked on that person's body as he ducks and dodges the community's suggestions. I'm just saying it'll be great so someone make it happen. Russell Westbrook with a zero overall bronze card. Well actually it's Russell Westbrook in this situation. Not funny but accurate very accurate. No memes my guy and he linked this video. Let's see what he has to say. Hey because when someone pisses me off in the game guys I want to push him. Like you know you're up 12 and the other guys talking smack. Add an M4 into the game 2k. Check it out. Yeah what was I thinking that video? What was that? Did I just say add an M4 into the game? Yo lead. Did I tell people to add an M4 into the game? Believe in something even if it means giving me all your money. 2k just pay me. That he should post that on his Instagram. That's OD inspiration. I found it. Okay here's the full clip ladies and gentlemen. Let's get let's gain some context on the situation. All right I can't be out here advocating for M4s. I don't really make it so that pushing is still in the game but it's a foul 100% of the time. You see what I'm saying? So if you want to push to get an advantage in the game you're not going to get it. You're just going to forfeit the ball but keep it in the game because when someone pisses me off in the game guys I want to push him. Like you know what you're up 12 and all the guys talking smack. I want to get locked up. I want to add guns into the game. Add an M4 into the game 2k. Check it out. All right. How's it going to go down? Okay you're playing the game. The guy cheeses you. He says some reckless bit like David says a better shooter than agent. So are you crazy? So you just equip your M4. And you laid a whole team down but with rubber bullets so they're only down for 10 seconds and it gives you enough time to make more sense in context right? Nobody. 60 overalls in 2k. I'm gonna keep it a thousand bro. He's not dressed like a brown shirt. He's dressed like a peasant from the medieval times. You know what I mean? I'm gonna keep it a thousand with you guys. I dress like that every day too. So if you catch me on the street don't be posting me on Twitter. You know what I mean? Or do. Just tag me. Give me some followers. Here's Damian Lillert shooting a green light with TakeOver activated in front of what is that? A medic? Is that a medic right there? Paul George? This was on my birthday by the way. April 23rd. I went to a Raptors game. Kawhi landed in the Raptors. Orlando's out of the playoffs now. All right. Listen they're boom. They're out the way. Great birthday. I was very excited. Came home with Vortex. Was watching the game on the TV. And ladies and gentlemen I witness greatness. Damian Lillert with one of the greatest performances in NBA history. What a great moment that was. And what a great day for that game. Phantom's chair after he says he won't get mad. Phantom sat down and said I'm not mad though after he just finished murking half his setup. Listen once you get to the point of throwing things around you're officially angry. All right. Or you're at least mad or infuriated, frustrated, irritated. You're one of those things right. There's plenty of adjectives to describe it. Here's Carl Anthony Towns at the urinal. Hey welcome to LA. Ronnie says as he walks towards Carl Anthony Towns. Thanks.  No when I do these episodes I watch some of the memes back just to make sure there's nothing crazy in them. And on this one I was like oh look the first two ones look innocent enough but I didn't see this. That is 10 for being so edgy. What an edgy guy this person is. Brendan. You're so edgy Brendan. Oh my goodness. 2k19 graphics looking so realistic this year. Look it's Westbrook beside a Ninja Turtle. Forgive me I forgot. I haven't watched a show in like 10 years. I don't know which one that is. Graphics have improved. Skull emoji. That's just a week two out of 10 meme. All right. Nelson don't come to me with no week two out of 10 memes. Come to me with at least five out of 10 or better. When your homie dunks on you in 2k and makes you watch the replays.  If you made me watch the replays my guy I felt like something. We used to have a rule. No pause in the game because if you did this it was a fight going on. We would not finish the game. Hey on a side note they're trying to give this guy the death penalty so we might have to chill back on the memes just till we find out he's not gonna die. How am I talking about this? It's like I'm trying to get demonetized but what is wrong? He's gonna chill out bro. It looks like you got something from Magic Johnson. What is it? Oh no. Oh no. I'm not gonna laugh at that. That's not funny. That's a one out of 10 meme. Honestly when I saw this meme on Twitter I was mad. I didn't think of it because I thought of something similar but it wasn't this damn glorious. Alright man GTA 5. Here we go again. I think that San Andreas meme. 4 out of 10. Thanos with the green. Alright see here's the thing. You guys are gonna think I'm weird but I haven't watched any of the adventure movies. It's not because I don't think I'm gonna like them. It's because I like to save really good movies for important moments in my life. So like for example I watched Inception finally when I decided to leave university when I dropped out and I moved out here. So the final night I was there I watched Inception. So I'm saving all the adventure movies for a really good day. A very important day. And shout out to all you all trying to spoil. You're getting blocked. Alright shout out to you. So apparently when I ask for funny 2k memes they'll decided to say being verified on TikTok. Y'all playing with me. Alright listen the TikTok sponsorship is over but I'm being very serious. They're not even paying me no more. The app is actually somewhat decent. As the days go on there's less and less cringy content relative to funny content.  There was a lot of cringy stuff on Vine too. Alright so I uploaded a video on Twitter of me just spamming my controller basically making fun of lockdown defenders. It goes something like this. And because I was curious how it would perform on TikTok I also uploaded to TikTok and on TikTok look at this. It has over a hundred thousand views my guys. You guys think I'm playing but I wouldn't have suggested a TikTok thing if I didn't think it was actually a decent app. I'm just posting 10 second clips pulling a hundred thousand views.  There's a video of me just drifting in my jeep in the snow on some fast and furious and that pulled 67,000. Y'all playing if you don't think this app is serious. I'm just saying alright TikTok memes are dead. You're not going to clown me for being on TikTok no more because one of my videos passed a hundred thousand views on that. Alright so off. How to recognize a stroke, twisted mouth, arm paralysis, incoherent speech, light contest should go on. That is evil. Yo I realize we're very f***ed up like we're just some horrible human beings in this community boat because we could just casually make fun of strokes and then not a single person bats an eye. You mean I think he meant to say heavy contest because heavy contest shouldn't be going in. But a light contest just means they were kind of close by. When 2K makes you pass to the wrong person. I didn't do this. Y'all quit playing. Quit playing. I didn't do this stuff. This is not me. I'm fighting for my f***ing life. Jesus man. Alright that's a good meme. Listen bro. Very accurate, very funny. 7 out of 10. The 2K community. Shrek. The VC glitch. Is that a f***ing mermaid? The 2K developers is Fiona dragging the mermaid away.  Shrek what have you been up to man? Oh no. My childhood. This is just flat out weird. It's almost as weird as that Shrek is loving that was popular a few years ago or Shrek was just powing dudes. Let's not get into that. You know it will be a great change of pace 2K. 2K community. Shrek. And then instead of the mermaid being a VC glitch the mermaid is a great quality product. And the 2K developer actually no that makes no sense. Ignore what I just said.  Alright my memes are good. That's gonna be it for this video ladies and gentlemen if you enjoyed drop a like click on one of the videos on the screen. They're all solid. Hey click on this video actually the prime video right here because that one was demonetized and a lot of people didn't see it because there's a lot of swearing going on and I didn't censor it so yeah just click it.  I'm writing it.


Thanks, so I'm going to be talking about a solution I had to a problem I had at home So as he said I go to a bunch of conferences and once after an extended trip, which was mostly vacation I Came home after a heatwave It's very hot in my apartment. I didn't have a thermometer, but it felt like 45 Degrees out in the apartment and which I could believe because it was about Pushing 40 degrees and the windows were closed So I live in Poughkeepsie, New York Can't pronounce that don't worry about it That was Tuesday. I had to leave early to avoid that There's not a lot of heat problems. It's not like Singapore where it's hot all the time During the winter we get a lot of snow during the summer it gets hot, but not normally above 35 So the heatwave was a little bit strange Because of that my apartment, which this is the layout from my apartment complex website The furniture isn't where my furniture isn't where the furniture is here but The apartment didn't really wasn't really designed with cooling in mind because it's not really, you know It's not a tropical climate. So these two red bars on the bottom Those are in wall AC units and that's the only cooling I have in the apartment besides windows So during the middle of a heatwave when it's pushing 35 It's a little difficult to cool the apartment This is the window AC unit that's Very cheap very limited control you can see it's got a fan speed knob and then a Mode knob so top is off and then it's low cool high cool and then low fan and high fan So fan without the Compressor turned on And I don't own this it's included in my apartment rental So I was You know trying to figure out how can I avoid this where my apartment's on fire because I have a lot of computer equipment in my apartment because I'm a nerd and computers and Collecting things kind of go ahead and I didn't want you know to come home to that heat and potentially damage on any of my equipment So I was trying to think well, how would I solve this? Well, if I you know actually lived in a place where they cared about cooling They'd have an air conditioner with a thermostat almost every modern air conditioner I've ever seen has a thermostat whether it's rudimentary or you know something complicated, but I don't have that So I decided I'll build one So just start the process of building the thermostat You have to look at what it is and it's as basic of a closed-loop control device as you can think of it's You set a point You control the device and you sense the temperature and you just loop on that Pretty it pretty simple. So I needed to come up with an approach to do those two things check the temperature and Control the in this case my in wall AC unit So how would I control that AC unit? Well, I don't own it so I can't take it apart my first inclination Would be to rip it apart figure out how to control circuitry works splice in a wire and you know control it with Microcontroller, I don't own it. I think the apartment complex would not be too happy with me if they have when I move out whenever They come in and they see wires sticking out of the AC unit So it's not to do that. I also have no idea any information about that AC unit That picture Literally the only identifying mark on it is the GE logo. I have tried to rip the front cover off Which I accidentally ripped the unit out of the wall There's still there's no information anywhere about Specifically what model it is or how any of the internal electronics work So I had two ideas I can put a relay on the outlet and just turn it on and off that way and leave it on Leave the switch on and just have relay control power to it Or I could come up with some convoluted robotic arm thing to turn the knob I went with the relay As fun as robotics would be I don't think I'd be done If I tried doing that And because of the layout of my apartment, I don't want to be running control wires to that relay So having a wireless relay to control switching on and off the AC would be ideal So what I decided to use was Z wave Z wave is a popular home automation network framework That's run by a company on the other popular one in the space of Zigbee I've used Zigbee before mostly in college for my senior design project And I would have used that if I was building my own devices But because Z wave is sponsored by a company and has licensing around Access to the network protocol The devices that come out on it are much more Interoperable and compatible with each other and my issue with Zigbee in the past was all Of the devices that you buy it's a spec from the IEEE It's not It doesn't always work 100% and if I was building the device I'd want it to be open all the way down Z wave has open protocol specs and API specs for interacting with them But the actual hardware for the network communication is not open so that I Wish it was but it's not so but because of the compatibility. It's very Useful especially for buying things off the shelf instead of building Relays or whatever Z wave connected device and they've got hundreds or thousands of devices out there so it started to use Z wave and then I looked at how I would control that on a computer and There turns out there's a very Well built open source library for interacting with Z wave devices You can buy a little USB stick that has a Z wave transceiver in it and Well, you you use to set up the mesh network for all of the devices in your home And then open Z wave is a little C library with Python bindings that talks to it So I just use that and then I bought that switch Which was rated for the current of the AC unit which I had to measure because I have no idea how much current it actually draws and Then once I had that network setup. I could also use it to leverage more devices in the future So I could put sensors on it or other devices. They make doorbells locks all sorts of stuff So that's also what I did for the Temperature sensor in my living room. So if going back to this there are two AC units one in the bedroom and one in the living room So I needed to sense temperature and control in both I use two of these one for each AC unit and then for the living room temperature because of the way a living room is set up I needed a wireless sensor And because it's wireless I said, oh, I just built a Z wave network. I'll just buy a temperature sensor So I got this multi-sensor which has temperature humidity luminescence UV Motion and a bunch of other stuff. I use it for temperature and It you know it works pretty well In my bedroom Didn't want to do that. I had the Z wave set up But that multi-sensor is $60 60 US dollars. I don't it's whatever that is in Singapore dollars and Lot of money. I also wanted to sense two different temperatures in my bedroom. So going back to the layout The bedroom is here.  It's got about four or five computers in it and all my networking gear It also has clothes in it because it's a real closet So I wanted to sense the temperature in that closet separately from the bedroom because the bedroom one would be used to control the AC But also monitoring the temper differential between the bedroom in the closet is important because of all the equipment in there So I wanted to do two separate sensory two different sensors for that It also turns out I had a raspberry pi sitting in there. You can see two of them I use the bottom one for some cloud-based orchestration some software that I developed for my day job and then the top one Was just sitting there because I bought two because they're cheap So I said, okay, I'll use that raspberry pi Then I started googling how do what temperature sensors do people use with raspberry pi? And one of the popular ones was this DS 18 B 20 which is a Dallas one-wire temperature sensor so it's you know three pins power data and ground and It's actually I've actually played a lot with Dallas one wire when I was in college So it was a good choice for that. It was also like 50 cents. It's a lot cheaper than $60 And the way Dallas one wire is constructed you can have multiple devices all in parallel because they're individually addressed So it would solve my problem for having two at once because I just wired to in parallel Which is what that daughter board is it's just a little proto board that I wired everything in parallel up to two connectors And I've got two of those temperature sensors one is running through the closet into my bedroom And then the other one is just sitting there underneath the shelf in the closet So now I have all of the sensor and all the switching how am I going to control it I Looked out there for some home automation software a big thing for me was I wanted everything to run locally I didn't want anything to be dependent on the cloud or an external service This is controlling my AC at why do I need to go to someone's server in a data center to turn my AC on that's crazy I also am wary of all of the security involved with that and things and also, you know The recent s3 outage probably taught everyone that you don't want the internet You don't want your data center to go down and then you can't turn your AC off So I was looking at things that I could host locally Came across home assistant, which I have some friends who are very active on using and developing And then I there were some other ones out there But home assistant really spoke to me because it's written in Python and I do a lot of Python development It's fully open source and it supports like everything I mean right now there are over 600 components and that number keeps growing every release and because it's Python It's super easy to write a new component to control any random device or they even do cloud services So if you have a cloud service for home automation It can talk to that pretty easily and integrate it into your local home automation platform So I decided to use home assistant to control it Another advantage with home assistant is it also has really great z-wave support with open z-wave So I said, okay, how am I going to set up a thermostat and home assistant? Well, these are the ones they support today I don't have any of them because I'm building it myself. Most of these are like off-the-shelf things There's this generic thermostat Which I ended up using didn't use it at first though because home home assistant lets you write automation rules So I plugged in all of my sensors and all of my switches and I went about writing all of the rules for how an air conditioner thermostat would work and Tried to get it to do the thing and it turns out it didn't work because automation rules are edge triggered and AC is not So but it turns out someone had already had this problem and wrote a generic thermostat module Which I needed to massage to work for an air conditioner because it was designed for space heaters originally but after throwing some code and getting that merged upstream and Disabled can have a generic thermostat module which could control my AC. So you just define which pair of sensors and switches to control an AC and then it lets you set a temperature So this picture is a screenshot that I took yesterday from my home assistant set up at home This is the web interface For it and I just clicked the living room thermostat and it's I'm sorry. It's so small. I should have cropped it more So here is the set temperature of 25 C and you can see because The AC is off and it's also freezing cold and the heat is on in New York. It's not even coming close to 25 C But yeah, that's the basics of what that generic thermostat module gives you But the other thing it gives you is you know an interface a software interface to control it. Oh Sorry, I forgot my own slides This is out of order. I apologize. So the one thing was with these sensors I needed a way to integrate them into home assistant To get that because this raspberry pi is not running home assistant. It's running on a server That's underneath the shelf in that picture So I needed a way to get the Dallas one wire temperature sensors from the raspberry pi into home assistant so I wrote some software that Polls the sensor and pushes it over MQTT and home assistant can listen to an MQTT broker and Subscribe to messages and treat that as sensor data. So that's what I leveraged and I wrote the software Dallas MQTT Which lets you have an arbitrary number of sensors. It has a YAML file that you define which sensor addresses to use and then it just pushes those over MQTT with periodic polling that you set up and it's multi-threaded to handle Arbitrary number of sensors right now. It only supports one sensor type, which is the one wire thermal temperature Sensor from the Linux kernel driver That's because it just cats that file and pushes it on MQTT after decoding it But you it's written in a way where if I had other sensors in the future or anyone had other sensors in the future They could add on to it and that's also written in Python because it's really easy So One of the issues I had when I first set this up Was cycle time Something people don't really think about because when they buy a thermostat when they buy an AC unit the thermostats integrated and all of this is done Wasn't done for me. So I plugged in plugged everything in turned it on said, okay, let's set it to 25 C It's the middle of summer. It's really hot And this is what happened. You can see it's spiking like crazy The living room was on for four minutes off for two minutes and just going like that Bedroom is about the same a little bit smaller of a room. So it was Whatever Turns out AC is a really inefficient For about the first 10 or 15 minutes depends on the AC unit and since I don't have the data sheet for mine Just guesstimating That was a problem. So I had to introduce the concept of hysteresis to home assistant Push to patch and now it's a little bit more spread out still some work to do This was an earlier version the problem also with this presentation is it's in the middle of a snowstorm So I don't have any data from more recent patches Because the AC is turned off So this is from September and the other one is from August but it's so you know working it so that I'm integrating Efficiency of the AC into the software Right now it's done by hand in the future. I would like to use Real-time data from that scent from that switch which also measures power consumption to try to figure it out Because I could graph power consumption figure out efficiency curves based on that Just by analyzing the data, but for right now it was just I was able to solve it by introducing the concept of hysteresis to home assistants thermostat module So now that I had everything working I Wanted to see what else I could do So I started looking at the home automation rules and home assistant. This is a basic rule Most thermostats that you buy today have set points that you can set throughout the day So you know if it's after midnight you turn the AC off so you're not wasting power So I decided I started experimenting with automation with that so that's what this rule is I'm a night owl. So after 12 30 a.m Turn the AC to 30 degrees which won't ever turn on normally in New York and then After 9 30 ignore that rule that's all it says And see pretty straightforward YAML syntax to define that and that was a starting point for writing automation rules for figuring out Okay, what can I do with now that I have a computer controlling my AC? What else can I do with it? The first thing that popped my head was location tracking and geo-fencing So It's a computer. I've got a cell. I've got multiple computers on me all the time How could I write rules for it to control my AC based on where I am? Should I I can set the temperature higher when I'm not home? And I can pre-cool the apartment when I'm coming home. So I don't come home to a 45 degree apartment anymore I have a set point for you know static temperature. So things don't catch fire But you know I don't need to set it at 25 C when I'm not home But I'd like it to be 25 C when I get home. So I'm not sweating So I looked at what home assistant offered and they had a module for something called own tracks Which is an Android and iOS app that's open source that just reports your location over MQTT And you can push MQTT to a cloud service. I think a lot of the cloud providers have IOT things now That have just an MQTT broker or you can run your own and since I was conscious of not having services Have my data especially location data I said, okay, I'll just run an MQTT broker and I've got it encrypted and Locked off try to be secure And then it just you know it reports where I am I was looking at the map earlier today It knows I'm in Singapore it doesn't do anything because it's a snowstorm and the AC is off But I could write a rule based on that. So now that I have piped my location info into home assistant I can control how the AC functions based on my normal Schedule when I'm at home. So I work from home and to get out of my apartment So I actually talked to people I worked from Starbucks for a couple hours at least every day So I wrote a rule that says okay when my phone is at Starbucks and leaves Wait five minutes and then set my temperature to 26 so that the wait five minutes is because at the time it takes me to drive from my house to Starbucks and through experimentation how long it takes to cool off the apartment and then The temperature is so it's cool. So it pre-cools my apartment as soon as I leave Starbucks, which I think is pretty neat And I've started writing rules for this for other common locations that I go to like the airport So where am I going to go with this? well That location example taught me that with more sensors you can have more automation and even in combinations that you wouldn't have thought of So the thing I was talking about before with the adjustable hysteresis may be doing that automatically with Power usage collection, which is something that I need to fix on the z-wave sensor side You could do something there another thing is my parents have solar cells at their house I don't have them in my apartment, but they have solar cells in their house and that's fully metered you what if you could take the solar data and Control other electronics in your house So you run things that you wouldn't normally run when you're having excess power generation or You know a lot of people use the same platform for things like controlling lights and blinds when they watch TV or other stuff But there are these combinations of things It's where the real power is and in this kind of stuff and that's you know Simple things you don't even think about like a thermostat everyone has one But then you know what could you do with a thermostat if you could talk to all of the other things you have? And you don't have to do that in a way. That's you know crazy and scary and insecure like teddy bears that listen to parents You can do it all yourself in in your house in a way that it's all owned by you And that's that's what I really find interesting about this So I pushed some links up here and I'll go back to the title page all of the slides are on github So you can see the source on how I generated graphs and stuff, too But these are just some some of the things I used and a paper that I read from 1986 Which was the last time people studied air condition or cycle efficiency because that was one solid state electronics came out and The next slide is just questions, so I'll leave this up. Does anyone have any questions help my own time? Yeah, I had that's it just requires writing it that's Yeah, I had thought about that too So that's essentially what the hysteresis thing I introduced was it's Forgot what I call it because I didn't want to call it hysteresis because a lot of people use it aren't familiar with the term Think I called it minimum cycle wait time Yeah, so it's like so I have it set to like five or ten minutes right now And I've been adjusting it based on my power bill So and that's what this paper is actually about because PID controllers came out in the 80s People were putting them on a c-unit saying oh, it makes it better because it runs less Yeah, yeah Yeah, so I don't only a c-unit I mean it's it's a power relay so if the device doesn't like being power-cycled It's not gonna like it because I mean when I push the button on home assistant. I hear the relay click It's literally like I think it's a 20 amp relay So if the device you're using to control with that doesn't like to be switched on and off Probably don't do it. I don't know about this AC. I don't really care Yeah, they don't like it on and off too quickly which was the cycle time bug But you know, maybe other electronics won't have that problem Yeah It's it's really quick Yeah, I was surprised how quick it was because I mean I did Zigbee stuff It's probably like six or seven years ago now and it There were a lot of issues with communication and delay and I was surprised how good Z-Wave was So that's something that home assistant has support for Alexa and maybe a couple of other Ones I mean it's really easy. It's all Python someone actually did Alexa because it's cheap and easy to get one of the little echo things So, yeah, it has voice control through other devices or other APIs and it's integrated into home assistant So if I wanted that I could put it in Yes for that you do that home assistant doesn't care if the component you're using talks to the internet or not I do That's that's the distinction, but yeah, no they have got a lot of like if Well the big images like these I know for example the Honeywell thermostat Just screen scrapes from their website. So it just uses a that's not actually screen scraping It just does the HTTP request to the Honeywell cloud connected thermostat website and pulls the data down and sends commands that way just with raw HTTP But it you know it offs against their cloud service So, you know if their cloud service goes down then you can't control your thermostat except to go and touch it because it's an actual thermostat So I it's running on an unrelated server that I have sitting in the house, but people run it on raspberry pi They also have a pre-package distribution an SD card image. You can just stick in a pie Yeah Yeah, it's it's it's real simple to use I've been real happy with it Yeah, it's so the z-stick has to be on the same box as the home assistant because it uses open z-wave and it's just local USB connection Good on time Okay, thank you


Welcome to this session in the course of computer programming. In this session, we shall be discussing some more aspects of handling character strings. Last time, we had seen that the strings can be represented using arrays of type cap. We had also seen that C plus plus provides several useful library functions to handle strings. In fact, we had seen only two functions. In a separate write up accompanying this session, we will also list several other library functions and the processing with these functions achieved. What we propose to do in this session is to discuss some more problems requiring string processing. We start with the statement of two problems. One, we want to read a string which contains first name and last name of a person. There are two names, but these could be separated by one or more blank spaces. What we wish to achieve as a solution to this problem is that we want to separate these two first name and second name and store each part in a different array. So, there should be one array for storing first name another array to store the last name. The second problem is actually an extension of the first one. It says, read an input line containing multiple words separated by one or more blank spaces. Now, separate each word storing it in an appropriate array. Let us first concentrate on the simpler of the two problems. The first problem where we are given a string containing just two names, first name and the last name. Here are some sample names that people might give us when running our program. For example, Nandlal Sarna. Now, this has just one blank in between the first name and second name. Look at the second set, Varsha, blank, blank, blank, opte. So, there are more spaces between the first name and the second name. The third one is still very different. Dasthagi. It has no second name. So, the last line that is shown as a sample input contains only one name. We do not know whether it is first or last, but whatever it is, the sentence has, the line has only one name given. We obviously expect to write a program which will handle all these possible variations in the user input. We design our program by saying that first we will read and store the given line in some character array. Let us call this name string. We will choose the size 60 because we do not expect two parts of a name first name and last name together, including intermediate blanks to be more than 60 characters long. We have to separate out these two parts. So, we define two care arrays, one called first name and the other called last name. We have written the sizes as 60. This is of course excessive, but it guarantees that even if the given line contains a single name and that name is very long, it can still be accommodated in either this or this. Our strategy is simple. We will scan the name string array using an index i. I will start with 0. Keep on looking at each subsequent character in the name string array and we will go on up to the length of the name string. While we scan this array, we will first assemble and print the first name for which we will use an index j. We will search till a non-blank character because the first name will contain a name which will have non-blank characters. If we keep searching for it till the last non-blank character is read, once a blank character is seen, the word has ended. After that, we will skip any following blanks and then assemble and print the last name again reusing the index j. Here is a program. Note that here we have included both the libraries C string and CSTDIO which permits us to use both the functions that we have seen earlier. These are the definitions of the variables in arrays, name string, first name, last name. We have n care which we used to represent the total number of characters in the array name string and we have length f and length l to represent the length of the first name and length of the last name respectively. i and j are index variables which we will use as stated earlier. First we use get us function to read the name string and we calculate n care as simply equal to the string length of name string. We want to start the scan of this name string array, so we start with i equal to 0. We will now assemble and print the first name. Notice the iteration that we set up for this. For j equal to 0, i less than n care, i plus plus j plus plus. So, what we are doing is while assembling the first name, we start with j equal to 0 which will be the index into the first name array. This will be incremented by 1 as i will be incremented. Essentially, what we are doing is we are going to stuff consecutive non-blank characters inside the first name array. Notice that inside this loop, all that we do is if the character that we encounter is not blank, it is part of the current word. So, we insert that into the first name. Notice we pick up the ith character of name string and insert it into the jth character of first name because first name starts with j equal to 0. The moment we encounter a blank character, this if statement will not be valid. I will, this will not be equal to this. I will not execute this, but come to the else part which simply says break. So, this loop iteration is broken. The moment a blank character is encountered which means the first name has ended. We can now put j, the current value of j as the length of first name. Remember, j would have been incremented 1 beyond whatever are the characters that we have assembled. We can simply put at this point the backslash 0 or the terminator character in the first name string and print out the first name string. We have to now continue doing the same thing with the second string, but before that if we have any blank spaces which are consecutive, we need to ignore all of them. So, here is a small loop which keeps consecutive blanks while name string i equal equal blank i plus plus. All that it does is, it simply keeps on incrementing i as long as I keep encountering a blank space. What it means is that when this loop ends, I would have the first non blank character of the second name. Now, if I have already encountered the end of the string name string, please remember the last non blank character would be a backslash 0. If that is so, then I will say that I have reached end of the name string. There are no more names. I have so far collected only one name. So, I will print an exception given string contains only one name and I will return with a flag minus 1. Notice that this code permits me to handle all odd name like Dastagir that we saw in our sample to be properly processed. On the other hand, if I have two parts first name and last name as expected, then the last iteration would have taken care of consecutive blanks. I can now assemble and print the last name. This is done exactly in the same way in which the first name was assembled except that I look for the name string I not equal to blank and insert all non blank character into last name jth position. As usual, if I encounter a blank, I will go out of the loop using the break. I will set length L as j, put a backslash 0 as the last element and print the last name is so many characters and this is the value of the last name. Is it a good approach? Well, yes, we were told that there are two parts of the name and therefore, first name and last name we just assign them for two different arrays. But what if there are multiple parts as in the second problem? You remember second problem says given a sentence containing multiple words separated by each other from one or more spaces get them out into separate arrays or separate strings. Now, it will be very clumsy to keep defining different arrays to hold different words. Why not use a two-dimensional array or a matrix where each row can contain one word and the matrix will have many rows as many as are required to accommodate all words. We shall see this particular approach in another session. In this session, we have studied how to separate two words in a string. Thank you very much.


Welcome, this is Melissa Armo with a stock swash and reviewing the gap options newsletter and you know This is just another way for people to make money using the golden gap system The nice thing though about options is if you have a busy schedule over a full-time job and you can't be in the live Trading room daily. You can make money using my methodology trading options because the trades are just get emailed to you There's no prerequisites for this either which is positive and if you're looking to save money for the golden gap course Then this is something that Are away that can help you save for the class and then learn the method I've had a lot of people do that over the last few years since I've had this letter So this is navinia. Okay, and I'm showing you this here because I want to show you sometimes how How these move okay, and you got to be aware of this if we're gonna sign up for the letter So in the case of navinia stock close to your gap down. It was a good gap Okay, however, it didn't really make the move to the second day. So here we see it boom But it went well through the dream target. I'd called to buy navinia puts on that first day Okay, move was the second day though. 160 was the dream target look where it went Huge call when all the way down to 152 broke that So the cost of this again taking it the first day that called it and getting out the second day 420 was the cost Risk was 4200 for an advanced trader sold a 1090 profit $6,700 return investment 159% really nice trade really nice move if you're a beginner and you cannot risk 4200 Take one contract one contract was four hundred twenty dollars and again This is all has to do with how much you can risk could have taken to you could have taken three But the return and investment is a hundred fifty nine percent no matter if you take advanced or beginner risk So that's really positive. Okay, very good call. This was another navinia one This did not play out as expected dropped broke fell in here Felt a little bit the next day expected this to break didn't fall through Now while you could have gotten out of here with small profit Excuse me. I Wouldn't have advised anyone to do it because I really thought I was gonna go But if you scalped it you could have made money You could have made a little bit. So seven percent risk was thirty nine thirty four advanced risk ten contracts Could have made three hundred bucks. So I really don't think that that was worth it. But again It did have some profit in the train But then it did not follow through and if you held it you would have lost in this what you risk But again options as a protection the protection is you can't lose more than your risk by doing a trade Over night and you still get the advantage of the overnight move if it continues overnight like the video, okay? Which is very advantageous for something if you want a really big move Lulu was a once-and-go boom boom take it Get out again went well through the dream target and Just had a huge move. So this is take it on the dang it out high up here was around 145 strike was 140 Really nice move and again when you know if I call something where I expected to have a quick big move Which I did expect this you got to be aware of that this expired on the 18th called in the 14 So really big move one day you take it get out to 70 costs number contracts 20 risk 5400 as an advanced risk again sold six 6600 profit return and investment a hundred twenty two percent So whether you want to get out of that retreat at 50% if that's your goal by the end of the day But sometimes these have big moves you may want to say a hundred percent But you can't be so exact if something's up eighty five percent and it has a move. I said it's a good profit, okay? Netflix another really nice move. It's a bullish move bullish gap rated the gap called the trade boom boom took it Get out really big move three fifty two fifty strike went through it again Called it on a Tuesday expired on a Friday. You got to get out when you're up Classic contract ten bucks six contracts six thousand sold a 20 profit six thousand really nice move again by one That's all you can afford still what I made it would have risked a thousand bucks made a thousand bucks. It's profit It's a thousand bucks. Okay, everyone always wants to risk an advanced risk Hey money is money if it's a hundred dollars if it's two hundred dollars of a three hundred dollars, okay? Return investment hundred percent nice move in Netflix nice and fast Wednesday the 16th called 162 QQQs 125 was the expiration again This is a decent amount of time Okay called it in here boom shoot and It just pushed right on up and through and a really nice move in here on this QQQ trade so again You know to have something that just has this move in here just of this couple days You say well wait a minute look at the profit in this 233% you look at at the chart you would have never guessed it I'm so good at seeing where somebody's gonna go right away isn't getting at such a good price 60 cents Just dirt cheap a lot of people have had a short bias in the market I've had a bullish bias in the market very precise when I rate my gaps I'm a 26 point rating system you look at this and you and this is this is this period here people Isn't this this is this period and look what that trade did 233% return investment cost of contract 60 cents You could have loaded up 70 contracts 7,000 shares essentially risk is 4,200 sold it to profit $9,800 very very nice move. Okay Something like this if you look at the price if you bought it at 162 would have been over a million dollars in margin You would have needed to buy that equity trade and to hold it over I would have been extremely risky of anything at this cost or price point or the market just in general is Even when you're doing normal equity trades you're in and out during the day But options you get the protection and you don't have to worry about margin This would have cost so much to take 7,000 shares of this if you were looking at margin as an overnight Hold which also like I said would have been very risky and is risky to do because you don't have any protection if it goes against you You know when you're in an option if you do it overnight All you can ever lose is the amount of the cost of the contract show day trading when we do them on margin we're in and out very quickly flat every day by four and That requires margin options do not require margin, which is one of the reasons why people like to do options You can still make a lot of money doing options and you don't need margin. Okay You just have to be aware of what's happening in the train and make sure you get out and you're up Now this was cat cat dropped fell in the day Didn't really go the way I expected didn't drop down didn't follow through cat was a loser called the puts in this one twenty two one Twenty just didn't didn't go right if you held this one was a bust lost three two fifty again Rebents risk star backs was a winner. I call this the day I called us if this is gonna go over the high in the time I called the trade it was right another just really good read called this here So it's gonna go over the time I called the trade it went to Shall I call the 68 calls to wait here it was Called on the 25th really good read 70 cents was a cost of contracts for 16 was $4,200 80 you could have sold them out boom boom Take it get out this took a couple days, but well worth it call this up plenty of time profit 6,600 Return of investment 157% really nice move IBM this is still on as an exporter the 15th Again, you could have taken it got it out by now We'll see what this does this week. I'm watching okay cues another good one here called it Here's the shot up called it in here went boot You could have got out with a little profit or held it. That was the move. So I called the 163 calls It's went all the way up through 169 expiring January February 1st Class was to number contracts 30 with 6,000 so 575 went through that and again Really nice profit almost 200% return of investment 11,250 Just been reading the market so well So all these I'm showing you here and again, I think the video there's been no reason to get out of it So really was a total loser For the read I had on this here for me But either way this is just one two three four five six seven eight Trains where you could have made with advanced risk thirty nine thousand seven hundred seventy bucks and that includes two Losers because some trades will lose so six winners and two losers Okay, and when you are in your trades Say I call something in the morning before the open you can't take them until after the open But you have to watch them because sometimes like that Lulu poop They can just go right on the same day and if you're up a good amount you want to get out Like if I say the targets 140 and it goes 145 all common senses get out So when I'm doing these calls Other their calls are puts when I'm doing the trade calls I mean it's one strategy. I'm using to make these trade costs No margin required in an account to do options and the benefits of trading options versus equity trades or what? No margin requirements no day trading margin requirements only cost is the price you paid for the train You can make active money trading just like equity trades and you can make a good return on investment So options are a way to make money if you cannot be in the live trading room daily But some people can some people can't but you must take my golden gap course to join the live trading room So this is a way to save money for the golden gap class, which is six grand if you've been you know wanting to get involved Start trading make money move forward so many people want to wait till everything is lined up perfectly Sometimes it's just not that way get started. I said jump in. This is a whole year's worth of trades to lever It's absolutely worth it for the price. So the next class is February 23rd and 24th nine to five class of the class is 59 99 US dollars classes online can be anywhere in the world and take it You're just in signing up the email me at Melissa at the stocks wish calm Okay Trends course and the golden gap into a combo deal 64 99 You save if you do them both and pay for both together. It would be Saturday Sunday Monday February and the newsletter which I talked about here is five grand for the year totally worth it Totally worth it. No prerequisites required. You get all the options trades for an entire year Email me at Melissa at the stocks wish docked calm to sign up No prerequisites required and you will start to get involved in the gaps and Learn how we're seeing these gap moves. It will definitely prepare you for the class You'll start to make money doing these trades You can always email me if you have questions and looking forward to a great continuation follow-through here for the rest of 2019 in my Analysis of charts and specifically the market. Have a great day everyone


August 8 was International Cat Day. Cats may wake us up at 4 AM and barf at an alarming frequency, yet anywhere between 10-30% of us call ourselves cat people, not dog people, not even equal opportunity cat, and dog lovers. So why do we choose to bring these fluffballs into our homes, and spend over $1,000 per year on one who isn't genetically related to us and frankly seems ungrateful most of the time? The answer is obvious to me, and probably to all cat lovers out there, who need no scientific research to justify their fierce love. But scientists have studied it anyway and found that, while our feline friends may not be good for our furniture, they might make some contribution to our physical and mental health. Well-being. According to one Australian study, cat owners do have better psychological health than people without pets. On questionnaires, they claim to feel happier, more confident, and less nervous, and to sleep, focus and face problems in their lives better. Adopting a cat could be good for your kids, too, and a survey of more than 2,200 young Scots ages 11-15, kids who had a strong bond with their kitties had a higher quality of life. The more attached they were, the more they felt fit, energetic, attentive, and less sad and lonely, and the more they enjoyed their time alone, at leisure, and at school. With their gravity-defying antics and yoga-like sleeping postures, cats may also cajole us out of our bad moods. In one study, people with cats reported experiencing fewer negative emotions and feelings of seclusion than people without cats. In fact, singles with cats were in a bad mood less often than people with a cat and a partner. Your cat is never late for dinner, after all. Even internet cats can make us smile. People who watch cat videos online say that they feel less negative emotion afterward, less anxiety, annoyance, and sadness, and more positive feelings, more hope, happiness, and contentment. Admittedly, as the researchers found, this pleasure becomes a guilty one if we're doing it for the purpose of procrastination. But watching cats annoy their humans or get gift-trapped for Christmas does seem to help us feel less depleted and regain our energy for the day ahead. Stress In one study, researchers visited 120 married couples in their homes to observe how they would respond to stress, and whether cats were any help. Hooked up to heart rate and blood pressure monitors, people were put through a gondola of daunting tasks, subtracting three repeatedly from a four-digit number, and then holding their hand in ice water, below 40 degrees Fahrenheit, for two minutes. People either sat in a room alone, with their pet roaming around, with their spouse, who could offer moral support, or both. Before the stressful tasks began, the cat owners had a lower resting heart rate and blood pressure than people who didn't own any pets. And during the tasks, the cat owners also fared better. They were more likely to feel challenged than threatened, their heart rate and blood pressure were lower, and they even made fewer math errors. Out of all the various scenarios, cat owners looked the most calm and made the fewest errors when their cat was present. In general, cat owners also recovered faster physiologically. Cats won't judge us for our poor math skills or become overly distressed when we're distressed, which explains why cats were actually a more calming influence than significant others in some cases. As Karen Stambach and Dennis Turner of the University of Zurich explain, cats aren't simply small beings who are dependent on us. We also receive comfort from them — there's an entire scientific scale that measures how much emotional support you get from your cat, based on how likely you are to seek them out in different stressful situations. Cats offer a constant presence, unburdened by the cares of the world, that can make all our little worries and anxieties seem superfluous. As journalist Jane Pauley said, you cannot look at a sleeping cat and feel tense. Hello. This video is sponsored by Beemix Pets. Are you looking for high-quality cat collars at an affordable cost? Check out BeemixPets.com. Use coupon code Kittenlife to get 20% off. Relationships. Cats are beings we care for and who care for us, or at least we believe they do. And people who invest in this cross-species bonding may see benefits in their human-to-human relationships, as well. For example, research has found that cat owners are more socially sensitive, trust other people more, and like other people more than people who don't own pets. If you call yourself a cat person, you'll tend to think other people like you more compared to someone who is neither a cat nor dog person. Meanwhile, even people who watch cat videos feel more supported by others than people who aren't such big fans of feline digital media. While these correlations may seem perplexing, it makes sense if you consider cats just one note in your social network. Positive feelings about dogs slash cats may engender positive feelings about people, or vice versa, write Rose Perrine and Hannah Osborne of Eastern Kentucky University. When someone, human or animal, makes us feel good and connected, it builds up our capacity for kindness and generosity toward others. As that study of Scottish adolescents found, kids who communicate well with a best friend are more attached to their cats, probably because they spend time playing as a trio. Pets appear to act as social catalysts, inducing social contact between people, writes you. Okay, researcher for on Marcia Sambola and his colleagues. A pet can be accepting, openly affectionate, consistent, loyal, and honest characteristics that can fulfill a person's basic need to feel a sense of self-worth and love. Health. Finally, despite what you might have heard about catty to human brain parasites, there's a smattering of evidence that cats could be good for our health. In one study, researchers followed 4,435 people for 13 years. People who had owned cats in the past were less likely to die from a heart attack during that time than people who had never owned cats, even when accounting for other risk factors like blood pressure, cholesterol, smoking, and body mass index. This was true of people even if they didn't have cats currently, the researchers explain, which suggests that cats are more like preventative medicine than treatment for an ongoing disease. In another study, James Serpel of the University of Pennsylvania followed two dozen people who had just gotten a cat. They completed surveys within a day or two of bringing their cat home and then several times over the next 10 months. At the one month mark, people had reduced health complaints like headaches, back pain, and colds, although, on average, those benefits seemed to fade as time went on. As Serpel speculates, it's possible that people who form a good relationship with their cat continue to see benefits, and people who don't, well, don't. Much of this research on cats is correlational, which means we don't know if cats are actually beneficial or if cat people are just already a happy and well-adjusted group. But unfortunately for us cat lovers, a latter doesn't seem to be the case. Compared to dog lovers, at least, we do tend to be more open to new experiences. But we're also less extroverted, less warm and friendly, and more neurotic. On the bright side, that means it's more likely that cats actually do bring us as much delight and joy as we claim they do, although the research is far from conclusive. In fact, the vast majority of pet research focuses on dogs, partly because they're easier to train as therapy assistants. Cats have been left behind a bit by the research, says Serpel. Yet another bone to pick with our canine counterparts. Pet therapy is a guided interaction between a person and a trained animal. It also involves the animal's handler. The purpose of pet therapy is to help someone recover from or cope with a health problem or mental disorder. Pet therapy is also referred to as animal assisted therapy. Ad is sometimes confused with animal assisted activities, AAA. Ad is a formal, structured set of sessions that helps people reach specific goals in their treatment. AAA involves more casual meetings in which an animal and its handler interact with one or more people for comfort or recreation. If you enjoyed this video, kindly press the like button. Also don't forget to subscribe with notifications on so that you don't miss out on videos like this. Thank you for watching.


Africa has the fastest growing and youngest population in the world. It is a continent that is rich in innovations and technology, health, citizen activism, and approaches to solving disputes. Africa's participation, leadership, and engagement is critical to address global security challenges and opportunities for peace. But Africa also faces a complex combination of threats. These threats range from rising authoritarianism and coups, violent extremism, great power competition, and climate change. The United States Institute of Peace works directly with African citizens, including women and youth, to address communal grievances and curb violent extremism. We advise African political and civic leaders, as well as national and regional governments and organizations, to shape and redefine peace processes and ensure more sustainable solutions to violent conflict. USIP works across the continent, from Nigeria and coastal West Africa to the Sahel and Central Africa, to the Greater Horn and beyond. In 2019, in Nigeria, USIP-trained peace mediators helped the state government peace-building commissions in Kaduna and Plato States to initiate talks to end violence between Aten, Fulani, and Taqab communities in both states. A peace deal was signed December 2020, and USIP continues to support the state peace-building commissions to ensure that it holds. In the Central African Republic, USIP and our partners have identified hate speech as a major issue, particularly around elections. In the Horn of Africa, we collaborate with our Sudanese partners on ways to reduce violence and hold their leaders responsible for delivering services, security, and peace. USIP focuses on helping women and youth in areas that have experienced conflict. They are often the ones that are left out of decisions that impact their future. Some of this work helps women come together to create plans to make their communities and lives safer, and share those plans with security officials. This is something that would have been unheard of just a few years ago. USIP has been working with Sisters Without Borders, a network of women civil society leaders since 2014. These mothers, sisters, and daughters came together to strengthen their communities' resilience to violent extremism. The USIP Africa Center believes in the strength of citizens and institutions to design and lead effective solutions to manage conflict in Africa and make peace a part of its promise in future.