WEBVTT

00:00:00.001 --> 00:00:04.880
Even with solar panels on your roof, it's possible that your home is still being powered by fossil fuels.

00:00:04.880 --> 00:00:09.020
Climate innovator and Python developer Anna Schneider is trying to change that.

00:00:09.020 --> 00:00:13.940
At her company Wattime, consumers can source the cleanest energy available on the grid.

00:00:13.940 --> 00:00:19.240
In this episode of Talk Python To Me, I talk to Anna about how Python powers Wattime,

00:00:19.240 --> 00:00:23.100
some popular open source projects focused on renewable energy,

00:00:23.100 --> 00:00:26.380
and a few other Python-based renewable energy startups.

00:00:26.880 --> 00:00:32.640
This is Talk Python To Me, episode 76, recorded Monday, September 12, 2016.

00:00:53.760 --> 00:01:04.080
Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

00:01:04.080 --> 00:01:08.220
This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.

00:01:08.220 --> 00:01:14.700
Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.

00:01:16.020 --> 00:01:18.700
This episode is brought to you by Hired and SnapCI.

00:01:18.700 --> 00:01:25.460
Thank them for supporting the show on Twitter via at Hired underscore HQ and at Snap underscore CI.

00:01:25.460 --> 00:01:27.940
Anna, welcome to the show.

00:01:27.940 --> 00:01:29.320
Hi, Michael. Thanks for having me.

00:01:29.320 --> 00:01:35.120
Yeah, I'm really excited to have you on the show today and to talk about what you've been up to in Python

00:01:35.120 --> 00:01:39.860
and fighting climate change and working on renewable energy and all that good stuff.

00:01:39.860 --> 00:01:40.480
It's going to be great.

00:01:40.480 --> 00:01:41.540
Yeah, I'm excited.

00:01:41.880 --> 00:01:43.500
Yeah, it's very exciting.

00:01:43.500 --> 00:01:46.280
But before we get to that story, let's just start at the beginning.

00:01:46.280 --> 00:01:48.520
Like, how did you get into programming in the first place?

00:01:48.520 --> 00:01:51.800
Yeah, so I was a scientist for a long time.

00:01:51.800 --> 00:01:53.020
That's how I thought of myself.

00:01:53.020 --> 00:01:55.580
But I used code to do science.

00:01:55.580 --> 00:02:00.100
So in undergrad, I was working on protein folding and protein structure research.

00:02:00.100 --> 00:02:08.400
And so I would, that was my very first exposure to programming was doing some really simple bash stuff just to access the data that we were working with.

00:02:08.400 --> 00:02:10.700
And it progressed from there during grad school.

00:02:10.700 --> 00:02:14.280
Was that like the folding at home types data or was that other data?

00:02:14.280 --> 00:02:20.160
It was data that I collected from its method called NMR for figuring out what proteins look like.

00:02:20.160 --> 00:02:21.600
Okay, cool.

00:02:21.600 --> 00:02:22.680
Yeah.

00:02:22.780 --> 00:02:30.040
So you started programming that way, which I think a lot of people get into programming if they don't just go straight down the computer science track.

00:02:30.040 --> 00:02:35.180
They get into programming because they needed it to try to do what they were actually doing.

00:02:35.180 --> 00:02:42.780
And, you know, a lot of times I think people are like, wait, this is actually really more fun than the actual problem I started to solve.

00:02:43.640 --> 00:02:44.040
Exactly.

00:02:44.040 --> 00:02:45.900
That was how it worked for me, too.

00:02:45.900 --> 00:02:51.460
So I had thought about when I was deciding what to do during grad school, I did my PhD in biophysics.

00:02:51.460 --> 00:02:54.720
And so I was like, do I want to work in a laser lab?

00:02:54.720 --> 00:02:56.600
Do I want to work in a protein structure lab?

00:02:56.600 --> 00:03:01.080
Or do I want to study those problems but use code to do it instead of fancy equipment?

00:03:01.080 --> 00:03:08.640
And I ended up realizing that I'm just a lot more creative when I'm writing code than when I'm working with physical objects in the real world.

00:03:08.640 --> 00:03:12.100
And so that ended up being how I did my PhD.

00:03:12.100 --> 00:03:12.660
Cool.

00:03:12.800 --> 00:03:13.520
That makes sense to me.

00:03:13.520 --> 00:03:16.060
And so how did you get into Python then?

00:03:16.060 --> 00:03:18.900
So that was during my PhD when I started using Python.

00:03:18.900 --> 00:03:27.140
So I had been writing these big C++ simulations for how the molecules inside plants that do photosynthesis, how they move around.

00:03:27.140 --> 00:03:30.020
But then I needed something to analyze that data.

00:03:30.020 --> 00:03:32.180
And Python was way nicer for that.

00:03:32.180 --> 00:03:37.500
So I wrote a bunch of really crappy C++ code and then started writing some actually kind of okay Python.

00:03:37.500 --> 00:03:38.620
Oh, that's excellent.

00:03:39.060 --> 00:03:44.220
So you were studying how plants basically did photosynthesis and things like that?

00:03:44.220 --> 00:03:44.620
Yeah.

00:03:44.620 --> 00:03:44.980
Yeah.

00:03:44.980 --> 00:03:51.760
So the part of a plant that acts like a solar panel, I was studying the molecules inside that and how they move around to make plants more or less efficient.

00:03:51.760 --> 00:03:52.280
Interesting.

00:03:52.400 --> 00:03:59.080
So how did you go from studying nature photosynthesis to what we're trying to do with solar energy?

00:03:59.080 --> 00:03:59.880
Yeah, yeah.

00:03:59.880 --> 00:04:06.680
So I got into that project because I knew that I wanted to work on energy software and energy data long term.

00:04:07.720 --> 00:04:13.260
So at the end of undergrad, all my friends were either like pre-med or going to Google or something like that.

00:04:13.260 --> 00:04:14.920
And either of those paths felt right to me.

00:04:14.920 --> 00:04:18.540
So I was like, what do I care about as much as my friends care about medicine?

00:04:18.540 --> 00:04:22.000
And energy and sustainability ended up being the answer for me.

00:04:22.560 --> 00:04:34.560
So I deferred going to grad school and took a year to work at a tiny energy efficiency nonprofit and then at a place that does climate modeling for renewable energy projects.

00:04:34.560 --> 00:04:37.920
And so I've sort of been on this trajectory for a long time.

00:04:37.920 --> 00:04:38.680
Yeah, yeah.

00:04:38.680 --> 00:04:39.380
That's really cool.

00:04:39.880 --> 00:04:45.440
So did you do programming at those places or what kind of work do you do at like a climate nonprofit?

00:04:45.440 --> 00:04:50.560
At the climate modeling for renewable energy place, I was doing programming and data analysis there.

00:04:50.560 --> 00:05:00.400
So I worked with a bunch of atmospheric science PhDs and they would run big climate models when a wind developer would come to us and say like, I own this hill where should I put the turbines?

00:05:00.400 --> 00:05:06.880
And so we would figure out what the typical wind patterns are in that place and what's the most efficient way to build new turbines.

00:05:06.880 --> 00:05:08.700
So I learned Ruby there.

00:05:09.080 --> 00:05:09.480
Oh, okay.

00:05:09.480 --> 00:05:09.860
Interesting.

00:05:09.860 --> 00:05:10.060
Yeah.

00:05:10.060 --> 00:05:12.440
Like an optimization problem more or less, huh?

00:05:12.440 --> 00:05:12.780
Yeah.

00:05:12.780 --> 00:05:13.140
Yeah.

00:05:13.140 --> 00:05:13.740
Yeah.

00:05:13.740 --> 00:05:14.520
It's cool.

00:05:14.520 --> 00:05:23.080
I think, you know, a lot of us care about climate change and we think as programmers and technologists, there must be something we can do.

00:05:23.080 --> 00:05:30.980
I think certainly as programmers, we are in a better place to help in some way than a lot of the general public, right?

00:05:30.980 --> 00:05:34.140
We could actually write some of the technology that makes these things go.

00:05:34.400 --> 00:05:46.480
But at the same time, it also feels very much like this kind of stuff is the realm of giant companies that have deep seated interests that are not necessarily good for the world, but are good for them.

00:05:46.480 --> 00:05:47.740
Yep.

00:05:47.740 --> 00:05:48.220
Yeah.

00:05:48.220 --> 00:05:48.300
Yeah.

00:05:48.300 --> 00:05:54.420
And so you shared an article with me that's pretty interesting titled, What Can a Technologist Do About Climate Change?

00:05:54.420 --> 00:05:55.060
A Personal View?

00:05:55.060 --> 00:05:57.840
And that's at worrydream.com slash climate change.

00:05:58.080 --> 00:05:58.280
Yeah.

00:05:58.280 --> 00:06:02.140
So this was something put together by a guy called Brett Victor.

00:06:02.140 --> 00:06:16.360
And the idea is just exactly what he said going through and saying there's so many places within our global energy system where people who write code for a living can make a real contribution.

00:06:16.680 --> 00:06:26.340
So some of it is, he breaks it down by like funding, how energy is produced, how it's consumed, just the general tooling and simulation software.

00:06:26.340 --> 00:06:29.260
A lot of this is very research heavy.

00:06:29.260 --> 00:06:33.320
And so there's some really cool simulation methods that you can use.

00:06:33.320 --> 00:06:33.820
Okay.

00:06:33.820 --> 00:06:34.240
Nice.

00:06:34.240 --> 00:06:39.120
And would you say in the end it comes out more on the dream side or more on the worry side?

00:06:39.120 --> 00:06:47.300
I think it's a very optimistic piece that there's a lot of opportunities for people to get involved right now.

00:06:47.300 --> 00:07:02.620
And one reason that's the case is that around 2012, there was a sort of flip in our economics of renewable energy where wind and solar started being cheaper than coal or natural gas in a lot of parts of the country.

00:07:02.620 --> 00:07:04.780
I mean, increasingly in a lot of parts of the world too.

00:07:04.780 --> 00:07:08.620
And so it's actually better business to be working on renewables right now.

00:07:08.820 --> 00:07:15.080
And so funnily enough, there's a whole lot more companies working on it now that it's actually a really profitable business.

00:07:15.080 --> 00:07:15.180
Yeah.

00:07:15.180 --> 00:07:15.740
Surprise.

00:07:15.740 --> 00:07:20.760
Once it's purely a good choice just from a business side, then all of a sudden, yeah, absolutely.

00:07:20.760 --> 00:07:21.560
Yeah.

00:07:21.560 --> 00:07:30.360
So that's part of why renewables is such an exciting place to be right now is it's not a choice between like, oh, fantasy and like, oh, feeling guilty about it.

00:07:30.460 --> 00:07:38.820
It's actually like good business and good for the world and good for your technology career to move into this field.

00:07:38.820 --> 00:07:39.300
Yeah.

00:07:39.300 --> 00:07:52.360
I suspect the next 10 to 15 years are really going to transform a lot of the ways we think about energy and electricity and all sorts of second level effects of that as that really kicks into effect.

00:07:52.600 --> 00:07:52.800
Yeah.

00:07:52.800 --> 00:07:53.120
Yeah.

00:07:53.120 --> 00:07:53.160
Yeah.

00:07:53.160 --> 00:07:53.620
For sure.

00:07:53.620 --> 00:07:53.980
Nice.

00:07:53.980 --> 00:07:57.480
So when you think about like what, what can you do as a technologist?

00:07:57.860 --> 00:08:00.920
Some people can buy carbon offsets.

00:08:00.920 --> 00:08:08.740
I have in Portland, our electric company has this thing called Green Source where you can pay like extra for your bill.

00:08:08.740 --> 00:08:12.800
It will basically guarantee 100% of your energy comes from renewable energy.

00:08:12.800 --> 00:08:15.140
That probably offsets somebody who wouldn't pay that.

00:08:15.140 --> 00:08:16.620
And so maybe it's not that great of a deal.

00:08:16.620 --> 00:08:18.020
So we can make these little changes.

00:08:18.020 --> 00:08:22.040
Or you could do something like you've done, like start a whole company.

00:08:23.180 --> 00:08:24.320
Tell us about your company.

00:08:24.320 --> 00:08:24.760
Yeah.

00:08:24.760 --> 00:08:30.940
So I am the co-founder and CTO of a clean tech nonprofit called Watt Time.

00:08:30.940 --> 00:08:33.560
It's watt like energy, time like times.

00:08:33.560 --> 00:08:34.800
There's three T's in that.

00:08:34.800 --> 00:08:40.700
And so what we do is we figure out when energy is clean or dirty coming from the grid in real time.

00:08:40.700 --> 00:08:49.020
So if you think about flipping a light switch, is that turning on a coal plant right now or a windmill or solar or natural gas or something else?

00:08:49.400 --> 00:08:53.500
And that answer actually changes every five minutes as different power plants come on and off the grid.

00:08:53.500 --> 00:08:55.700
So we figure out that data in real time.

00:08:55.700 --> 00:08:58.660
And then we use it to control smart devices.

00:08:58.660 --> 00:09:11.460
So things like smart thermostats or electric vehicles or whole building automation systems so that they can turn on when electricity is a little bit cleaner and off when it's a little bit dirtier and save carbon from the grid overall.

00:09:11.460 --> 00:09:13.620
Yeah, that's really a great idea.

00:09:14.020 --> 00:09:18.240
So imagine I have some kind of thermostat and an air conditioner at my house.

00:09:18.240 --> 00:09:22.920
And I want to say I would much prefer to cool my house with renewable energy.

00:09:22.920 --> 00:09:33.220
And that thermostat could subscribe to your service and decide if I were to turn on now, what kind of source would this energy come from, basically?

00:09:33.220 --> 00:09:33.920
Exactly.

00:09:33.920 --> 00:09:34.500
Okay.

00:09:34.500 --> 00:09:34.900
Yeah.

00:09:34.900 --> 00:09:38.360
And so our algorithms try to do it.

00:09:38.360 --> 00:09:42.500
So your house will see more or less the same temperature all the time.

00:09:42.500 --> 00:09:50.900
But it's like if the air conditioner needs to fire for like 10 minutes out of the hour to keep your house the temperature you want it, it would choose the cleanest 10 minutes.

00:09:50.900 --> 00:09:51.460
Yeah.

00:09:51.460 --> 00:09:52.440
Oh, that's excellent.

00:09:52.440 --> 00:09:55.160
And what's the uptake like?

00:09:55.160 --> 00:09:58.500
Are there a lot of companies reaching out to you to work on this?

00:09:58.500 --> 00:09:59.520
Is this, how's it going?

00:09:59.880 --> 00:10:02.800
We have some pretty good partners in the pipeline right now.

00:10:02.800 --> 00:10:04.200
Yeah, it's pretty exciting.

00:10:04.200 --> 00:10:11.500
Part of the trick is that a lot of smart device companies like IoT, Internet of Things, is this like big business.

00:10:11.500 --> 00:10:14.560
It's really exciting, but it's not very standardized yet.

00:10:14.560 --> 00:10:22.860
And so a lot of what we're also coming up against is just the fact like, well, do we have to write a separate integration for every company?

00:10:22.860 --> 00:10:27.580
And as a nonprofit, it takes a lot of funding to get to the point where you have the manpower for that.

00:10:27.580 --> 00:10:28.480
I bet it does.

00:10:28.480 --> 00:10:29.140
I bet it does.

00:10:29.420 --> 00:10:34.960
Yeah, like there's not that many residential places that have that kind of connectivity, right?

00:10:34.960 --> 00:10:44.780
Like I have some crummy little twisty thermostat on my wall and, you know, I doubt that it, I know it doesn't care about any of those sorts of things and it has no capability.

00:10:44.780 --> 00:10:56.380
But so you're focusing more on large scale stuff, maybe like electric vehicle charging stations that are super intensive or a hospital air conditioner, things like that?

00:10:56.380 --> 00:10:56.900
Exactly.

00:10:56.900 --> 00:10:59.380
Although home thermostats is a really good market too.

00:10:59.380 --> 00:11:04.140
There's a 40% of US power demand comes from homes.

00:11:04.140 --> 00:11:06.100
And a lot of that is from heating and cooling.

00:11:06.100 --> 00:11:06.860
Sure.

00:11:06.860 --> 00:11:07.280
Absolutely.

00:11:07.280 --> 00:11:11.640
So could I go buy a thermostat that would integrate with you guys and plug it into my house?

00:11:11.640 --> 00:11:12.120
Yeah.

00:11:12.120 --> 00:11:20.080
So you can go to our website and we have a waiting list right now to sign up for our very first smart thermostat from our partner, Energate.

00:11:20.460 --> 00:11:21.120
How exciting.

00:11:21.120 --> 00:11:21.960
Yeah.

00:11:21.960 --> 00:11:22.140
Awesome.

00:11:22.140 --> 00:11:23.820
So tell us about your company.

00:11:23.820 --> 00:11:24.440
Where did it get started?

00:11:24.440 --> 00:11:28.540
So I met my co-founder when we were doing our PhDs at UC Berkeley.

00:11:28.540 --> 00:11:32.300
So like I said, I was doing biophysics, but I knew I wanted to do energy stuff.

00:11:32.300 --> 00:11:35.580
And he was doing energy economics and behavioral economics.

00:11:35.580 --> 00:11:43.180
And so he actually came up with the algorithms that are the foundation of lot time, sort of as an extension of his PhD.

00:11:43.740 --> 00:11:47.860
And so we just met at a hackathon, just a regular weekend thing.

00:11:47.860 --> 00:11:49.880
It was like, hey, you want to work on this thing?

00:11:49.880 --> 00:11:50.900
This sounds awesome.

00:11:50.900 --> 00:11:51.360
Cool.

00:11:51.360 --> 00:11:52.300
Let's do it.

00:11:52.300 --> 00:12:00.720
And then he's such an amazing volunteer organizer that he kept me around for the next few weeks, a month, and then years.

00:12:00.720 --> 00:12:03.280
And then ongoing, huh?

00:12:03.280 --> 00:12:03.760
Very cool.

00:12:03.760 --> 00:12:04.000
Yeah.

00:12:04.120 --> 00:12:05.220
What kind of hackathon was it?

00:12:05.220 --> 00:12:06.220
What was the theme?

00:12:06.220 --> 00:12:07.240
Or where was it hosted?

00:12:07.240 --> 00:12:07.840
Things like that.

00:12:07.840 --> 00:12:10.260
It was called the Berkeley Clean Web Hackathon.

00:12:10.260 --> 00:12:17.700
So there's a clean web initiative is an international network that hosts energy focused hackathons.

00:12:17.700 --> 00:12:18.300
Okay.

00:12:18.300 --> 00:12:21.240
So it was specifically energy focused to start with.

00:12:21.240 --> 00:12:21.840
I see.

00:12:21.840 --> 00:12:23.360
Yeah.

00:12:23.360 --> 00:12:23.900
Very nice.

00:12:23.900 --> 00:12:32.700
Now, you said it's actually pretty hard to predict whether this energy is going to be clean or not.

00:12:32.780 --> 00:12:35.120
And there's a lot of data science problems going on there, right?

00:12:35.120 --> 00:12:35.480
Yeah.

00:12:35.480 --> 00:12:35.820
Yeah.

00:12:35.820 --> 00:12:47.560
So part of the fundamental challenge with getting to 100% renewables on the grid is that wind and solar are completely dependent on the weather when they're actually produced.

00:12:47.560 --> 00:12:56.180
And so better prediction of that and better just use of that stochastic information is really interesting for data science.

00:12:56.600 --> 00:13:07.180
Now, one of the things that maybe not everyone knows is the older energy sources like coal, which is especially bad, are very hard to change their capacity, right?

00:13:07.180 --> 00:13:07.660
Yeah.

00:13:07.660 --> 00:13:08.040
Yeah.

00:13:08.180 --> 00:13:11.260
So the wind might blow hard for 10 minutes and then stop.

00:13:11.260 --> 00:13:13.080
And that'll generate way more energy.

00:13:13.080 --> 00:13:16.260
But you can't just necessarily pour that energy into the grid, right?

00:13:16.260 --> 00:13:19.820
That's another reason why this is such a hard problem is exactly what you said.

00:13:19.820 --> 00:13:21.520
That phenomenon is called curtailment.

00:13:22.200 --> 00:13:29.240
So the idea that if there is way too much wind being produced right now, maybe the utility would prefer to use that instead of coal.

00:13:29.240 --> 00:13:33.400
But it's so expensive to shut down a coal plant for just a few minutes.

00:13:33.400 --> 00:13:39.300
And so they'll actually call the wind farm and be like, dudes, you have to turn off your clean, free, renewable energy.

00:13:39.300 --> 00:13:41.380
That has to get wasted right now.

00:13:41.600 --> 00:13:41.700
Yeah.

00:13:41.700 --> 00:13:48.020
And what I think it's really especially unfortunate about that is that happens at the time when the most energy is being created, right?

00:13:48.020 --> 00:13:48.920
Exactly.

00:13:48.920 --> 00:13:49.340
Exactly.

00:13:49.340 --> 00:13:49.740
Yeah.

00:13:49.740 --> 00:13:52.840
It's like the, yeah, it gets punished for doing too well.

00:13:52.840 --> 00:13:53.580
Yeah.

00:13:53.580 --> 00:13:54.100
Exactly.

00:13:54.100 --> 00:13:56.960
Whereas coal gets rewarded for not doing as well.

00:13:56.960 --> 00:13:57.460
Wonderful.

00:13:57.460 --> 00:13:58.900
Yeah.

00:13:58.900 --> 00:14:00.760
You said you actually have.

00:14:00.760 --> 00:14:01.800
Optimistic.

00:14:01.800 --> 00:14:02.580
Really.

00:14:04.100 --> 00:14:08.100
Well, you know, maybe it's a sign of something like coal.

00:14:08.100 --> 00:14:13.020
It's, it's just doesn't really fit so well into the modern world where we have so many better answers, right?

00:14:13.020 --> 00:14:20.420
So in, in the longterm, maybe it's a, another negative for coal, but still in the short term, it's a problem that you guys, that, that is a challenge for you.

00:14:20.420 --> 00:14:21.720
Cause you can't just say, oh, it's a windy.

00:14:21.720 --> 00:14:22.740
So it must be good.

00:14:22.740 --> 00:14:23.640
Right.

00:14:23.640 --> 00:14:25.600
It could have actually been the worst case scenario.

00:14:25.600 --> 00:14:30.000
And you have two kinds of challenges that you're solving with Python.

00:14:30.000 --> 00:14:33.420
One is right now, what is the energy?

00:14:34.060 --> 00:14:36.240
Story for my air conditioner, right?

00:14:36.240 --> 00:14:42.080
If I turn on my air conditioner, it comes on immediately and it does its air conditioning and then it turns back off shortly.

00:14:42.080 --> 00:14:49.160
But if I had an electric car and I had it plugged in and I just said, look, I would like to drive to work at seven in the morning.

00:14:49.160 --> 00:14:50.560
It's 10 PM.

00:14:50.560 --> 00:14:55.800
You get my car charged as, you know, efficiently with renewable energy as possible.

00:14:55.800 --> 00:14:57.620
That's a different kind of problem.

00:14:57.620 --> 00:14:58.980
It's like a forecasting problem, right?

00:14:58.980 --> 00:14:59.720
Yeah.

00:14:59.720 --> 00:15:00.100
Yeah.

00:15:00.320 --> 00:15:08.420
So for both of those kinds of problems, how our model works right now is that we get open data about what's going on the power grid.

00:15:08.700 --> 00:15:15.540
So there's entities called balancing authorities that make sure that supply and demand are matched in real time for what's on the power grid.

00:15:15.540 --> 00:15:20.540
And they actually put a fair bit of open data online, which is the foundation of what we're able to do.

00:15:21.220 --> 00:15:26.240
So we pull in that open data both for what's happening in real time and what they think is going to happen for the next few hours.

00:15:26.240 --> 00:15:28.080
So it's interesting.

00:15:28.080 --> 00:15:32.940
Their forecasts have some systematic bias, which we're working to correct also.

00:15:32.940 --> 00:15:38.320
But as a start, like there, it's the forecast that the actual power grids are running on themselves.

00:15:38.320 --> 00:15:40.520
So it's a good starting point for our algorithms.

00:15:40.520 --> 00:15:41.260
Yeah, sure.

00:15:41.400 --> 00:15:43.200
Oh, it's nice that you have that to start with.

00:15:43.200 --> 00:15:45.580
You don't have to completely come up with the forecasting.

00:15:45.580 --> 00:15:46.820
Exactly.

00:15:46.820 --> 00:15:53.520
But the open data that we're based on isn't exactly the kind of data that we want to be using.

00:15:53.520 --> 00:16:00.500
It tells us like overall what's happening on the grid, but it doesn't tell us exactly what your personal effect would be.

00:16:00.500 --> 00:16:07.880
So if you think about like if you use a little bit more power right now, what power plant are you affecting most?

00:16:07.880 --> 00:16:10.400
That's where our sort of special sauce comes in.

00:16:10.660 --> 00:16:11.080
Yeah, sure.

00:16:11.080 --> 00:16:15.580
Now you can't talk about your special sauce, but we could talk a little bit about the architecture.

00:16:15.580 --> 00:16:21.300
So what technology do you use to build your API that these devices integrate with?

00:16:21.300 --> 00:16:23.660
So we are Python top to bottom.

00:16:23.660 --> 00:16:32.760
So it's a Django REST framework API that is pulling from the data from Postgres database and then serving it up.

00:16:32.760 --> 00:16:36.860
So it looks sort of like a weather API, just time series data.

00:16:36.860 --> 00:16:39.160
Yeah, it's got to be a lot of time series.

00:16:39.920 --> 00:16:44.580
You know, all this data of Internet of Things you're collecting and serving.

00:16:44.580 --> 00:16:47.880
You also use Panda for data analysis, right?

00:16:47.880 --> 00:16:48.460
Yeah.

00:16:48.460 --> 00:16:55.600
So on the back end, in order to collect all the open data about what's going on and then analyze it, Pandas is really big for that.

00:16:55.840 --> 00:17:07.620
And then we use Celery for all the periodic task management of scraping the data from the sources and then sending those on off control signals to all the smart devices that we're working with.

00:17:07.620 --> 00:17:15.640
You actually outlined this in a talk you gave at DjangoCon this year called Django for IoT from hackathon to production.

00:17:15.640 --> 00:17:17.180
Yeah, that was a cool talk.

00:17:17.180 --> 00:17:18.080
Really nicely done.

00:17:18.080 --> 00:17:18.640
Thank you.

00:17:18.640 --> 00:17:22.140
Yeah, it was such a treat to be able to speak at DjangoCon.

00:17:22.340 --> 00:17:22.960
Yeah, I'm sure.

00:17:22.960 --> 00:17:23.600
That's cool.

00:17:23.600 --> 00:17:32.160
So one of the things you talked about were design patterns and anti-patterns for building Internet of Things services.

00:17:32.160 --> 00:17:44.480
Yeah, so part of the basic premise of the talk was that you can, like, normally when we think of a Django, like, starter project, it might be a blog or a polls app or something.

00:17:45.020 --> 00:17:52.120
But I think that an IoT project can be just as good a starter project for people to get started on with Django and with Python.

00:17:52.120 --> 00:17:58.020
So one of the patterns there is that it really is all about time series data.

00:17:58.020 --> 00:18:08.480
And so some of your data management, you have to think a little bit more carefully about your indices and things like that because your data gets so huge so quickly when you're dealing with Internet of Things data.

00:18:08.560 --> 00:18:16.920
Yeah, if you have a thousand users and they have Internet of Things data putting time series in, that could be, you know, millions of records instead of thousands.

00:18:16.920 --> 00:18:17.620
Very interesting.

00:18:17.620 --> 00:18:18.020
Exactly.

00:18:18.020 --> 00:18:18.800
Yeah.

00:18:18.800 --> 00:18:25.440
So even just at a hackathon scale, like, if you're just doing a weekend project, you can still have a lot more data than you know what to do with, which is pretty fun.

00:18:25.440 --> 00:18:25.880
Sure.

00:18:25.880 --> 00:18:38.160
So one of the things I thought was interesting you talked about was you said normal Django apps are built around views and maybe a better way to think about it for APIs that work with Internet of Things devices.

00:18:38.160 --> 00:18:45.740
is to think about tasks instead of views necessarily because everything is more or less asynchronous, right?

00:18:45.740 --> 00:18:46.260
Right.

00:18:46.260 --> 00:18:46.660
Yeah.

00:18:46.660 --> 00:19:01.760
So that's the other big design pattern with IoT is that if you think about this is specifically for the use case where, say, you've bought some smart device and the company that made that thing has a server and they have an API.

00:19:02.240 --> 00:19:07.260
And all you can do is send, get, or post requests to that API.

00:19:07.260 --> 00:19:10.420
They won't send you anything unless you ask for it.

00:19:10.420 --> 00:19:17.200
And so it has to be all about the machine communication and you have to do the work of initiating everything.

00:19:17.200 --> 00:19:21.180
And so you can't wait for their server to send you a request.

00:19:21.180 --> 00:19:23.020
You have to be able to initiate those.

00:19:23.520 --> 00:19:27.960
And so that's a big part of where we use Celery for is running those periodic tasks.

00:19:27.960 --> 00:19:33.240
And so that means all your, like, the code that really matters can't be looking inside your views.

00:19:33.240 --> 00:19:37.940
It has to be in a similar kind of structure, but for machine-to-machine communication.

00:19:37.940 --> 00:19:47.060
You can't really just, like, make a call to some server that's going to go out to a thermostat and wait for the thermostat to respond, right?

00:19:47.260 --> 00:19:48.820
Your system would just lock up.

00:19:48.820 --> 00:19:59.220
So a lot of it is, you know, begin sending this message asynchronously, throw it onto a queue of some sort, and then say the message was sent and just wait for some kind of response later, right?

00:19:59.220 --> 00:19:59.820
Exactly.

00:19:59.820 --> 00:20:00.420
Yeah.

00:20:00.420 --> 00:20:09.840
So there's the whole other part of the architecture where the devices have to communicate with their maker's server and then their server has to communicate with yours.

00:20:10.920 --> 00:20:14.640
So everything's sort of set up in its own very special way.

00:20:14.640 --> 00:20:15.080
Sure.

00:20:15.080 --> 00:20:18.280
So every device that you play with is going to have a slightly different setup.

00:20:18.280 --> 00:20:18.900
Yeah.

00:20:18.900 --> 00:20:19.840
And they may be responsive.

00:20:19.840 --> 00:20:21.260
They may be high latency.

00:20:21.260 --> 00:20:22.320
They may be flaky.

00:20:22.320 --> 00:20:22.940
All right.

00:20:22.940 --> 00:20:25.700
You never know about these cheap little devices.

00:20:25.700 --> 00:20:26.660
Interesting.

00:20:26.660 --> 00:20:36.420
The other thing you talked about was that you maybe don't build just one application, but you might have a family of applications around some kind of project.

00:20:36.420 --> 00:20:45.460
So you might have one that talks to devices, one that receives observations, one for like a vendor portal, things like that, right?

00:20:45.460 --> 00:20:47.720
It might be a suite of web apps, if you will.

00:20:47.720 --> 00:20:48.260
Yeah.

00:20:48.260 --> 00:20:58.620
So every kind of application that you're doing, since there are so many users of an app like this, there is the human like in their home doing whatever.

00:20:58.620 --> 00:21:01.360
There is the company that you're working with.

00:21:01.760 --> 00:21:03.960
There is the physical devices.

00:21:03.960 --> 00:21:06.760
Each of these needs its own kind of user interface.

00:21:06.760 --> 00:21:11.000
So it's kind of fun thinking of thermostats as the user of your application.

00:21:11.000 --> 00:21:13.880
And what's a good user experience for the thermostat.

00:21:13.880 --> 00:21:14.260
Yeah.

00:21:14.260 --> 00:21:17.460
That is a funky visualization to think of the thermostats as your user.

00:21:17.460 --> 00:21:18.000
But yeah.

00:21:18.000 --> 00:21:18.280
Yeah.

00:21:18.280 --> 00:21:21.620
I guess that's the UX problem I spend a lot of my time solving.

00:21:21.620 --> 00:21:25.400
The thermostats are much happier if we implement it this way.

00:21:25.400 --> 00:21:27.640
It's kind of true.

00:21:27.640 --> 00:21:28.460
Oh, sure.

00:21:29.460 --> 00:21:48.020
The other thing you said is one of the challenges you can run into is you might have a, if you're trying to spin up a quick prototype, like at a hackathon, for your example, or just, you know, some quick proof of concept, you might have one way of implementing things, like especially the like the background tasks and stuff.

00:21:48.020 --> 00:21:52.020
And then if you're doing a production, it probably needs a lot more careful attention.

00:21:52.700 --> 00:21:56.280
I'm a big fan of Heroku, especially for hackathons.

00:21:56.280 --> 00:22:01.340
And so Heroku has one really nice feature called the Heroku scheduler.

00:22:01.340 --> 00:22:09.160
And that allows you to, for free, run periodic tasks every 10 minutes or every hour or once a day.

00:22:09.800 --> 00:22:12.660
And so that can be a really good first pass option.

00:22:12.660 --> 00:22:21.120
And if you want to do something really quick and easy at a hackathon where, like you've written the code to say, okay, I want to hit the thermostat API every 10 minutes.

00:22:21.360 --> 00:22:28.680
That's a free way to do it where you don't need all the pain and sort of extra structure of setting up Celery.

00:22:28.680 --> 00:22:38.880
But as soon as you need more reliability or more flexibility in terms of when you're running the tasks, then Celery is definitely the right option there.

00:22:39.540 --> 00:22:45.800
So if people aren't familiar with Celery, this is a distributed message queue framework for Python.

00:22:45.800 --> 00:22:49.940
So it's great for either running asynchronous tasks.

00:22:49.940 --> 00:22:58.820
So something like if someone signs up for your service and you want to send them a user signup email, you can send the email in the background while you return a view to them.

00:22:58.820 --> 00:23:01.520
But you can also use it for scheduling periodic tasks.

00:23:01.520 --> 00:23:03.360
So something like every five or 10 minutes.

00:23:03.360 --> 00:23:04.020
Sure.

00:23:04.020 --> 00:23:08.420
Yeah, I think it's thought of more often for long running things.

00:23:08.500 --> 00:23:11.620
I'm going to do some kind of report and it's going to take too long for the request.

00:23:11.620 --> 00:23:17.320
So we'll initiate it as a task and then pull for the response or something like this.

00:23:17.320 --> 00:23:20.660
But the scheduling aspect of it is cool too.

00:23:20.660 --> 00:23:21.380
Yeah.

00:23:21.380 --> 00:23:31.160
So it's like if you would normally do something with Cron on your laptop, this is the way that you can use a similar kind of way of thinking about things.

00:23:31.160 --> 00:23:35.840
But in a distributed environment, like where you're actually running your web apps.

00:23:37.460 --> 00:23:50.060
This portion of Talk Python is brought to you by Hired.

00:23:50.060 --> 00:23:53.100
Hired is the platform for top Python developer jobs.

00:23:53.100 --> 00:23:57.900
Create your profile and instantly get access to 3,500 companies who will work to compete with you.

00:23:57.900 --> 00:24:00.760
Take it from one of Hired's users who recently got a job and said,

00:24:00.820 --> 00:24:06.080
I had my first offer on Thursday after going live on Monday and I ended up getting eight offers in total.

00:24:06.080 --> 00:24:09.520
I've worked with recruiters in the past, but they've always been pretty hit and miss.

00:24:09.520 --> 00:24:12.360
I tried LinkedIn, but I found Hired to be the best.

00:24:12.360 --> 00:24:14.460
I really like knowing the salary up front.

00:24:14.460 --> 00:24:16.840
Privacy was also a huge seller for me.

00:24:16.840 --> 00:24:18.500
Sounds awesome, doesn't it?

00:24:18.500 --> 00:24:20.520
Well, wait until you hear about the sign-in bonus.

00:24:20.520 --> 00:24:23.920
Everyone who accepts a job from Hired gets $1,000 sign-in bonus.

00:24:24.160 --> 00:24:26.600
And as Talk Python listeners, it gets way sweeter.

00:24:26.600 --> 00:24:31.840
Use the link Hired.com slash Talk Python To Me and Hired will double the signing bonus to $2,000.

00:24:31.840 --> 00:24:33.620
Opportunities knocking.

00:24:33.620 --> 00:24:37.380
Visit Hired.com slash Talk Python To Me and answer the door.

00:24:44.940 --> 00:24:56.800
So one of the things that you talked about a lot is IoT and your service, your company is more focused around providing data for other people's things on the internet.

00:24:56.800 --> 00:25:07.360
But you said you end up building some every now and then as proof of concepts yourself because someone's got to show that this works before someone else will buy into it, right?

00:25:07.540 --> 00:25:07.900
Exactly.

00:25:07.900 --> 00:25:09.060
Yeah.

00:25:09.060 --> 00:25:25.100
So starting as just one step above a student project when we were just getting started, one of our first partnerships was University of California at Merced has all of these electric golf carts that the maintenance people use to drive around.

00:25:25.100 --> 00:25:31.540
So this is the simplest thing that's approximation of an electric vehicle charging system we could use.

00:25:31.540 --> 00:25:34.060
So we got these smart plugs.

00:25:34.060 --> 00:25:37.420
It's like something you plug into the wall and then you can plug anything else into that.

00:25:37.420 --> 00:25:43.980
And then we had all of the electric golf carts plug into those and then we would manage the charging from there.

00:25:43.980 --> 00:25:50.620
So there's a brand called ThinkEco that has an API that you can use to control these smart plugs.

00:25:50.620 --> 00:26:01.900
So we got those and we were able to write an app that does the full end-to-end integrations, everything from figuring out the best times to be charging, forecasting that for the next few hours,

00:26:01.900 --> 00:26:08.600
and then sending the signals all the way down to the charging system to say, okay, turn on now.

00:26:08.600 --> 00:26:09.700
Okay, turn off now.

00:26:09.700 --> 00:26:10.320
How interesting.

00:26:10.320 --> 00:26:12.400
So talk to me about the architecture a little bit.

00:26:12.400 --> 00:26:21.520
Did you have a Linux server on the same network as the smart plugs and something like this and they just kind of watch that?

00:26:21.520 --> 00:26:22.520
Or how did you put it together?

00:26:22.900 --> 00:26:28.240
Yeah, so for that part of the communication, there's a couple different models.

00:26:28.240 --> 00:26:34.500
So the one that we used for that project, there was a hub, so sort of like a local gateway.

00:26:34.500 --> 00:26:37.240
So there's a protocol called ZigBee.

00:26:37.240 --> 00:26:42.160
That's pretty common for Internet of Things communication between the device and then some central hub.

00:26:42.160 --> 00:26:48.140
And then you plug the hub into Ethernet and that's able to talk back out to a real server.

00:26:48.140 --> 00:26:48.700
Okay.

00:26:49.020 --> 00:26:52.480
Yeah, so the smart plugs could get out and check on what they're supposed to do.

00:26:52.480 --> 00:26:52.860
Exactly.

00:26:52.860 --> 00:26:53.460
Okay.

00:26:53.460 --> 00:26:54.320
Very cool.

00:26:54.320 --> 00:26:58.200
How much did one of those little plugs cost if like listeners are like, I'm going to build one of those?

00:26:58.200 --> 00:27:02.600
Is it a cheap thing that you can put in your house or is it kind of pricey?

00:27:02.600 --> 00:27:06.540
Different brands are anywhere between like 30 bucks and 100 bucks.

00:27:06.540 --> 00:27:07.240
Okay.

00:27:07.420 --> 00:27:11.680
There's a range of prices and there's some pretty cool things you can do with them.

00:27:11.680 --> 00:27:16.360
So one called BelkinWemo is on If This Then That.

00:27:16.360 --> 00:27:20.440
And so that's something where you barely have to write any code at all to start hacking around with it.

00:27:20.440 --> 00:27:21.520
Oh, wow.

00:27:21.520 --> 00:27:23.920
That is pretty cool that it's built on that.

00:27:23.920 --> 00:27:24.640
Yeah.

00:27:24.640 --> 00:27:25.100
Interesting.

00:27:25.300 --> 00:27:33.180
So you guys are writing a lot of Python code around renewable energy and whatnot.

00:27:33.180 --> 00:27:38.060
You've got some open source projects at github.com/watttime.

00:27:39.440 --> 00:27:45.660
And your most, I guess, generally applicable one, like you have your API code there and stuff like that.

00:27:45.660 --> 00:27:52.220
But one of them that's kind of general purpose is this thing called PyISO, P-Y-I-S-O.

00:27:52.220 --> 00:27:53.860
Want to tell us about that?

00:27:53.860 --> 00:28:04.280
PySO is a set of Python client libraries that we use for scraping data from different online sources about what's happening at the power grid.

00:28:04.900 --> 00:28:14.940
So one thing that we think is really cool and that other people like playing with, too, is what is the mix of generation sources that's on the grid at any given time?

00:28:14.940 --> 00:28:23.540
So maybe in California, we have some number of megawatts of natural wind, some number of coal, some number of solar, some number of wind.

00:28:23.540 --> 00:28:26.340
And that's going to be different in five minutes.

00:28:26.340 --> 00:28:28.000
And it's going to be different in the Midwest.

00:28:28.000 --> 00:28:30.220
And it's going to be different in New York.

00:28:30.800 --> 00:28:41.680
And so PySO is a set of libraries that anyone can use to start scraping some of that data and playing around with it yourself so that you can understand where your power comes from.

00:28:41.680 --> 00:28:47.580
So if you wanted to build a business like yours, this is some of the foundational data that you might need.

00:28:47.580 --> 00:28:48.300
Exactly.

00:28:48.300 --> 00:28:56.260
And it's been really fun to get open source requests from people at solar companies or people doing research on these systems.

00:28:56.860 --> 00:29:00.800
So there's a lot of users out there and very open to contributors.

00:29:00.800 --> 00:29:01.760
Yeah.

00:29:01.760 --> 00:29:02.400
Oh, excellent.

00:29:02.400 --> 00:29:02.620
Yeah.

00:29:02.620 --> 00:29:04.080
So if you want to help, check it out.

00:29:04.080 --> 00:29:06.080
I'll be sure to link to it in the show notes.

00:29:06.080 --> 00:29:06.440
Cool.

00:29:06.440 --> 00:29:07.020
Yeah.

00:29:07.020 --> 00:29:13.000
One specific thing that would be really cool to get help with is we have coverage for a lot of the United States right now.

00:29:13.380 --> 00:29:20.180
But there's also similar open data available in Canada and in Europe and Australia and other parts of the world.

00:29:20.180 --> 00:29:28.360
So if you're listening to this show and you're like, oh, everything she's talking about is in the U.S., like there's opportunities in the rest of the world to chip into.

00:29:28.360 --> 00:29:29.060
Okay.

00:29:29.380 --> 00:29:36.100
So you're taking this from some kind of governmental source in the U.S. or regulatory place that gets this data.

00:29:36.100 --> 00:29:38.720
What are the data sources of this library?

00:29:38.720 --> 00:29:40.480
So that's the annoying part.

00:29:40.480 --> 00:29:46.160
That's why they need a whole library for it is that I mentioned the balancing authorities a few minutes ago.

00:29:46.320 --> 00:29:48.160
So that's where we get the data from.

00:29:48.160 --> 00:29:51.620
But each balancing authority publishes data in a totally different format.

00:29:51.620 --> 00:29:55.200
So some are like zipped CSVs.

00:29:55.200 --> 00:29:56.080
Some are XML.

00:29:56.080 --> 00:29:59.060
Some is a nice JSON API.

00:29:59.060 --> 00:30:12.000
And so that's a big part of the point of PySO is to hide all that ugly stuff in the background and make it easy for you to just write one little Python line and have everything else to get taken care of.

00:30:12.000 --> 00:30:15.220
So that's a lot of pandas and beautiful soup in the background of that.

00:30:15.220 --> 00:30:15.560
Okay.

00:30:15.560 --> 00:30:16.300
And requests.

00:30:16.300 --> 00:30:16.980
Oh, yeah.

00:30:16.980 --> 00:30:18.100
That's a good combination.

00:30:18.100 --> 00:30:18.860
Yep.

00:30:18.860 --> 00:30:20.280
Pandas, beautiful soup, and requests.

00:30:20.280 --> 00:30:21.460
Yeah.

00:30:21.460 --> 00:30:24.780
So I've heard of a lot of variation in APIs.

00:30:24.780 --> 00:30:28.400
You know, maybe this is an HTTP JSON service.

00:30:28.400 --> 00:30:31.060
Maybe that's a SOAP web service.

00:30:31.060 --> 00:30:44.920
But I've never heard of it being so broad as we've got zipped CSV mixed with like some probably the beautiful soup is for like some kind of web scraping on some other service.

00:30:45.300 --> 00:30:45.640
Yeah.

00:30:45.640 --> 00:30:49.020
And then you've got like an actual API, right?

00:30:49.020 --> 00:30:49.240
Yeah.

00:30:49.240 --> 00:30:55.860
So different balancing authorities in different parts of the U.S. have just put their data online in different formats.

00:30:56.520 --> 00:31:00.500
So there hasn't been any real reason for them to standardize it.

00:31:00.500 --> 00:31:06.660
And a lot of them don't employ nice fancy Python developers to write a good service.

00:31:06.860 --> 00:31:09.460
So it's just whatever people have been able to throw together.

00:31:09.900 --> 00:31:17.080
I think of one of the challenges of getting renewable energy really working has to do with having a better power grid.

00:31:17.080 --> 00:31:17.940
Yes.

00:31:17.940 --> 00:31:23.600
But maybe that is obviously like an important physics problem.

00:31:24.120 --> 00:31:28.740
But I think maybe, you know, it sounds like there's even more fundamental things.

00:31:28.740 --> 00:31:36.420
Like if there's not some kind of standard API for even discussing what kind of energy is being used and so on.

00:31:36.460 --> 00:31:42.400
Like if it's down to a zipped CSV, that's probably not a system that in its mind is about real time.

00:31:42.400 --> 00:31:43.080
No.

00:31:43.080 --> 00:31:44.240
Yeah.

00:31:44.720 --> 00:31:46.060
I completely agree.

00:31:46.060 --> 00:31:52.920
And that's something that there's a lot of rhetoric in the community about like we're moving towards real time and everything's going to be real time.

00:31:52.920 --> 00:31:54.140
The future is going to be amazing.

00:31:54.140 --> 00:31:58.900
But it's we're still pretty early in the process of building that future.

00:31:58.900 --> 00:32:00.440
So there's a lot of opportunities.

00:32:00.440 --> 00:32:01.040
Sure.

00:32:01.040 --> 00:32:06.720
But it's cool at least that you have a library that means people don't have to live in that past.

00:32:06.720 --> 00:32:07.640
They can work in the future.

00:32:07.860 --> 00:32:14.880
And if that balancing authority comes up and says, all right, we actually have a real API now, they won't have to change their code, right?

00:32:14.880 --> 00:32:18.920
You guys just fix that open source library to use the new format and it's good to go.

00:32:18.920 --> 00:32:19.700
That's the idea.

00:32:19.700 --> 00:32:20.300
Yeah.

00:32:20.300 --> 00:32:22.840
And so keeping it up to date has been another fun challenge.

00:32:22.840 --> 00:32:33.940
At every daylight savings time transition, I have to wake up early on a Sunday and fix whatever bugs came up because there's also no standardized way of handling the daylight savings time of these data sets.

00:32:33.940 --> 00:32:34.560
Oh, yeah.

00:32:35.940 --> 00:32:55.340
So you said that there were actually quite a number of other open source projects and startups that were either open source projects focused on renewable energy or maybe they're even written in Python, as well as a number of renewable energy startups using Django and other Python web frameworks.

00:32:55.340 --> 00:32:55.940
Yeah.

00:32:55.940 --> 00:33:02.800
I sort of like to break down the field of what's happening in renewables into a few different categories.

00:33:03.640 --> 00:33:07.640
So sort of the lowest level is to just build more renewables.

00:33:07.640 --> 00:33:08.660
It doesn't matter what we build.

00:33:08.660 --> 00:33:09.840
We just want as much as possible.

00:33:09.840 --> 00:33:15.140
The next layer is to build the right renewables that produce energy at the right times.

00:33:15.140 --> 00:33:21.640
So like we were talking about before, if there is like too much wind, where there's also too much other kinds of energy being produced, it can't be useful.

00:33:21.640 --> 00:33:24.740
So getting that next level of optimization right matters.

00:33:25.020 --> 00:33:30.520
And then sort of the highest level is, okay, we have the constraint of what energy has been produced.

00:33:30.520 --> 00:33:32.300
How can we use it in the best way?

00:33:32.300 --> 00:33:32.800
Right.

00:33:32.800 --> 00:33:34.240
And that's kind of where you live a little bit.

00:33:34.240 --> 00:33:34.720
Exactly.

00:33:34.720 --> 00:33:37.920
But there is really cool work happening at all three of those levels.

00:33:37.920 --> 00:33:40.020
Well, and there's also efficiency, right?

00:33:40.020 --> 00:33:42.620
Just like build more efficient buildings.

00:33:42.620 --> 00:33:44.220
Use less energy, right?

00:33:44.220 --> 00:33:44.820
Use less.

00:33:44.820 --> 00:33:45.480
Yeah.

00:33:45.760 --> 00:33:48.200
So efficiency is sort of like step zero.

00:33:48.200 --> 00:33:49.580
Yeah, exactly.

00:33:49.580 --> 00:33:54.080
It's not as fun to talk about, but it matters at least as much as anything else.

00:33:54.080 --> 00:33:55.820
So turn off your lights.

00:33:55.820 --> 00:33:56.160
Yeah.

00:33:56.160 --> 00:33:57.500
I talk to my kids all the time.

00:33:57.500 --> 00:34:02.720
I'll go into their bathroom, my daughters, and we have like this, I don't know, like this lighting thing for the mirror.

00:34:02.720 --> 00:34:05.640
There's like six lights and they're all on while they're at school.

00:34:05.640 --> 00:34:09.440
I'm like, kids, how many lights you just left on when you left?

00:34:09.600 --> 00:34:11.980
So yeah, that definitely makes sense.

00:34:11.980 --> 00:34:15.760
And there's actually an open source project for that that you pointed out, right?

00:34:15.760 --> 00:34:16.600
Called what?

00:34:16.600 --> 00:34:17.280
Energy Plus?

00:34:17.280 --> 00:34:17.720
Yeah.

00:34:17.720 --> 00:34:26.400
So Energy Plus is a simulation program that's used by architects and engineers for building new energy efficient buildings.

00:34:26.400 --> 00:34:28.640
So doing some of that design work.

00:34:28.640 --> 00:34:38.320
So there's a lot of cool simulation work that's a part of that for like thermal modeling and energy flow and how like sunlight is hitting a building to make sure that part's efficient.

00:34:38.880 --> 00:34:42.140
So that project is mostly in C++ and Fortran, actually.

00:34:42.140 --> 00:34:52.080
I'm not sure if there's Python bindings for it, but that's a very active open source project maintained by the National Renewable Energy Lab in Colorado, NREL.

00:34:52.080 --> 00:34:52.620
Sure.

00:34:52.620 --> 00:34:56.220
So let's talk about some of the build more ones.

00:34:56.220 --> 00:34:59.060
Some of the Python startups are in that area, right?

00:34:59.060 --> 00:34:59.460
Yeah.

00:34:59.460 --> 00:35:00.120
Yeah.

00:35:00.120 --> 00:35:08.360
So that's an area where there's a lot of startups right now because the biggest challenge for building more renewables right now, especially in solar,

00:35:08.360 --> 00:35:12.920
is not the cost of the equipment itself, which is amazing that that's so cheap now.

00:35:12.920 --> 00:35:19.580
But so the bigger part of the cost that people are trying to work on is sort of the soft costs.

00:35:19.580 --> 00:35:29.060
So things like marketing and customer acquisition and making it easy to design systems quickly and get them installed quickly.

00:35:29.780 --> 00:35:34.540
So there's a whole bunch of Python based startups that are working in the sector.

00:35:34.540 --> 00:35:35.060
Sure.

00:35:35.300 --> 00:35:37.840
So one of them is utility API.

00:35:37.840 --> 00:35:43.420
Another one is Sighton, Fossum Labs, and EnergySage.

00:35:43.420 --> 00:35:45.520
So what are those guys doing with Python?

00:35:45.520 --> 00:35:47.580
What's their business model, each one of them?

00:35:47.580 --> 00:35:47.900
Yeah.

00:35:47.960 --> 00:35:51.000
So utility API is one of our friends in Oakland.

00:35:51.000 --> 00:35:52.540
There's a lot of this in California.

00:35:52.540 --> 00:36:00.660
And what they do is they do sort of the flip side of what PISO does, but for utility build data.

00:36:00.660 --> 00:36:07.400
So they say, like, utility builds are also in these, like, it'll be a PDF or some sort of, like, horrible, unscrapable format.

00:36:07.400 --> 00:36:20.560
And so they've written scrapers for a bunch of different utilities that either individuals can use, but really other solar companies can use to say, okay, this is what someone's power bill has looked like in the past.

00:36:20.560 --> 00:36:22.820
Maybe they're going to be a good solar customer.

00:36:22.820 --> 00:36:24.700
Maybe they're going to be not as good a solar customer.

00:36:24.700 --> 00:36:30.320
And so simply opening up that data access is a really foundational part of the pipeline.

00:36:30.320 --> 00:36:30.760
Right.

00:36:30.760 --> 00:36:34.160
Because our API is zipped CSV files.

00:36:34.160 --> 00:36:36.880
Gives you a sense of accessibility of the data, right?

00:36:36.980 --> 00:36:37.520
Yeah.

00:36:37.520 --> 00:36:39.540
It's like PDFs in this case.

00:36:39.540 --> 00:36:40.700
Exactly.

00:36:40.700 --> 00:36:41.640
Yeah.

00:36:41.640 --> 00:36:44.000
So they have a pretty hard problem.

00:36:44.000 --> 00:36:44.940
Yes, they do.

00:36:44.940 --> 00:36:45.940
Wow.

00:36:45.940 --> 00:36:57.680
So if, like, for example, if I want to add solar energy to my house or some kind of renewable energy and I went to some solar energy company and I said, hey, what could you guys do for me?

00:36:57.680 --> 00:37:06.960
They have this huge problem of, like, well, go and download the last year of your data and zip it up and send it to us or something crazy like that.

00:37:06.960 --> 00:37:15.860
And this utility API basically reverses that and makes it possible to go have a look at what my actual data is in an API form.

00:37:15.860 --> 00:37:16.660
Exactly.

00:37:16.660 --> 00:37:17.980
Yeah.

00:37:17.980 --> 00:37:18.180
Okay.

00:37:18.180 --> 00:37:19.720
So they've been growing really quickly.

00:37:19.720 --> 00:37:20.960
Nice.

00:37:20.960 --> 00:37:22.300
And they're using Django as well?

00:37:22.300 --> 00:37:22.740
Yeah.

00:37:22.740 --> 00:37:25.640
So they have Django and they're more Python on the back end, too.

00:37:25.640 --> 00:37:28.620
So lots of regular expressions and other scraping packages.

00:37:28.620 --> 00:37:29.280
Yeah.

00:37:29.280 --> 00:37:29.880
I can imagine.

00:37:29.880 --> 00:37:30.840
Cool.

00:37:30.920 --> 00:37:32.820
And then Citan.io?

00:37:32.820 --> 00:37:47.440
Citan and Folsom Labs are two of the Python-based energy startups that focus on designing the systems for actually getting the solar panels on roofs.

00:37:47.700 --> 00:37:54.920
So another challenge that solar developers want to be solving quickly is what's the angle of your rooftop?

00:37:54.920 --> 00:37:58.420
What is the right number of panels to put on your roof?

00:37:58.420 --> 00:38:01.880
What's the best way to hook all the modules up together?

00:38:01.880 --> 00:38:06.380
And so Citan and Folsom Labs both handle different parts of that problem.

00:38:06.600 --> 00:38:15.100
Yeah, because otherwise you're using something like AutoCAD and you're just starting entirely from scratch and there's nothing about solar energy or any of these types of things, right?

00:38:15.100 --> 00:38:20.640
So this is a much quicker, like a rad design tool for your physical deployment of solar.

00:38:20.640 --> 00:38:21.520
Interesting.

00:38:21.520 --> 00:38:21.740
Exactly.

00:38:21.740 --> 00:38:22.560
Yeah.

00:38:22.560 --> 00:38:29.420
And so those are kind of fun because there is both the physics modeling to make sure that the electrons are flowing in all the right places.

00:38:29.920 --> 00:38:40.980
And also some of the financial modeling to see, like, is this going to produce the right cash flow both for the customer and for the company who's actually installing the panels?

00:38:40.980 --> 00:38:41.440
Sure.

00:38:41.440 --> 00:38:41.880
Sure.

00:38:41.880 --> 00:38:45.200
And then Energy Sage is about getting quotes.

00:38:45.200 --> 00:38:49.300
It's like Expedia for renewable energy, right?

00:38:49.300 --> 00:38:49.800
Yeah.

00:38:49.800 --> 00:39:00.620
So there's several of these different services where you can go and say, like, there's so many tiny solar companies in different parts of the country, just mom and pop shops.

00:39:00.620 --> 00:39:07.180
And so it can be really hard as, like, if you're just a regular person and you want to put solar on your roof, you don't know who to call.

00:39:07.180 --> 00:39:14.800
And so Energy Sage is one of the startups that is trying to make it easy for, not for companies to find you, but for you to find companies.

00:39:14.800 --> 00:39:16.780
So there's people going both ways.

00:39:16.780 --> 00:39:36.900
We all want to ship our software faster, respond to user requests quicker, and build an edge on the competition.

00:39:36.900 --> 00:39:41.940
But the faster you go, the more likely a bug or issue will slip by and cause your users grief.

00:39:41.940 --> 00:39:45.180
I have the same trade-offs with my Talk Python websites and infrastructure.

00:39:45.500 --> 00:39:46.880
That's why I use SnapCI.

00:39:46.880 --> 00:39:50.460
Every time I check in at GitHub, SnapCI springs into action.

00:39:50.460 --> 00:39:52.760
A clean copy of code is pulled from GitHub.

00:39:52.760 --> 00:39:54.800
A Python 3 virtual environment is created.

00:39:54.800 --> 00:39:56.940
All the packages and dependencies are installed.

00:39:56.940 --> 00:39:58.240
The unit tests are run.

00:39:58.240 --> 00:40:02.020
Finally, I'm notified in Slack and a menu bar on my Mac about the outcome.

00:40:02.020 --> 00:40:05.640
That way, I know it's safe to ship a shiny new version of my web app.

00:40:05.640 --> 00:40:11.020
Ship your software faster with a 30-day free trial at snap.ci slash Talk Python.

00:40:11.020 --> 00:40:22.000
Let's talk about building the right renewables.

00:40:22.000 --> 00:40:25.120
So right amount of energy, right time, that kind of thing.

00:40:25.120 --> 00:40:28.560
In this space, there's this problem called the duck curve.

00:40:28.560 --> 00:40:30.180
What's the duck curve?

00:40:30.760 --> 00:40:33.640
It's a kind of weird name for a kind of cool graph.

00:40:33.640 --> 00:40:49.280
So if you Google duck curve, you will find these graphs that show right now in some parts of the world, the amount of renewables that's being put on the grid is sort of balancing the other things that's being produced.

00:40:49.580 --> 00:40:52.100
So there is not really a problem.

00:40:52.100 --> 00:41:04.400
But as more and more solar in particular is put on the grid, that will mean that sometimes there can actually be more solar production in the middle of the day than there is demand.

00:41:04.400 --> 00:41:16.420
So this is a huge problem because that means that if we're just spending money on building new solar panels willy-nilly, that's not actually solving the real problem.

00:41:16.960 --> 00:41:18.960
And so there's a problem with how to...

00:41:18.960 --> 00:41:19.140
Right.

00:41:19.140 --> 00:41:24.700
Because like the coal plants have to stay online, so you just have to dump that energy anyway.

00:41:24.700 --> 00:41:25.340
Exactly.

00:41:25.340 --> 00:41:32.500
Or like even if we were able to turn off the coal plants, there might still be too much solar, which is a kind of fun problem to have.

00:41:32.500 --> 00:41:35.560
But that really is the future that we're moving towards.

00:41:35.560 --> 00:41:45.740
And so building the right mix of energy in the right places is something that is mostly a sort of research and policy problem at this point.

00:41:45.740 --> 00:41:55.220
So there's a lot of cool work going on at research labs, including some of the national DOE labs on this part of the work.

00:41:55.220 --> 00:41:55.820
Excellent.

00:41:55.820 --> 00:41:56.080
Yeah.

00:41:56.080 --> 00:41:57.760
And that was kind of your first job, right?

00:41:58.160 --> 00:41:58.340
Yeah.

00:41:58.340 --> 00:42:02.880
So there's also some work going on at like consulting companies like what I was at.

00:42:02.880 --> 00:42:12.560
And also the big solar and wind companies will have in-house groups that do some of this work to be like, okay, we need to get this project permitted to put on the grid.

00:42:12.880 --> 00:42:19.220
How can we simulate exactly how much energy our wind farms or solar farms are going to be producing in 10 years?

00:42:19.220 --> 00:42:19.660
Okay.

00:42:19.660 --> 00:42:20.180
Yeah.

00:42:20.180 --> 00:42:22.860
So there's a lot of interesting open source.

00:42:22.860 --> 00:42:30.100
There's a couple of popular open source Python related projects trying to help answer this question, right?

00:42:30.100 --> 00:42:30.780
Mm-hmm.

00:42:30.780 --> 00:42:31.460
Yeah.

00:42:31.460 --> 00:42:36.520
So there's one for wind called wind ML, ML like machine learning.

00:42:37.220 --> 00:42:42.920
And there's a similar one called PVLib, and that has a Python binding.

00:42:42.920 --> 00:42:52.660
So both of these are Python projects that for the first one, it can help you collect data about what your wind farm might do and analyze that data.

00:42:52.660 --> 00:42:57.600
And for the second one, it does the same thing for, but for calculating a solar PV output.

00:42:57.600 --> 00:43:04.100
So if you have solar, like photovoltaic panels, what kind of power are they going to be producing when?

00:43:04.100 --> 00:43:05.440
And so you can plan around that.

00:43:05.440 --> 00:43:05.920
Mm-hmm.

00:43:05.920 --> 00:43:12.800
And if you wanted to treat this like a data science problem, are there like cool data sets and stuff that you can use?

00:43:12.800 --> 00:43:13.360
Yeah.

00:43:13.360 --> 00:43:16.120
So both of those will give you access to data sets.

00:43:16.120 --> 00:43:21.640
And then the National Renewable Energy Lab also hosts a similar data set called PVWants.

00:43:21.640 --> 00:43:27.060
So that's something that like there's been a lot of effort put into developing these data sets.

00:43:27.060 --> 00:43:32.940
But that one's kind of interesting is that I wasn't able to find good Python bindings for it or a good Python client.

00:43:32.940 --> 00:43:37.940
So that's an opportunity for someone to start a new open source project and see if it catches on.

00:43:37.940 --> 00:43:45.140
And then the last part, the third category you said was using the right energy when it's available.

00:43:45.140 --> 00:43:47.320
And that's what Wattime works on.

00:43:47.320 --> 00:43:50.060
That's what PyISO, your project works on.

00:43:50.060 --> 00:43:51.500
What else is going on around there?

00:43:52.160 --> 00:43:57.940
Part of why this is so hard is that this isn't something that the good operators can really just do by themselves.

00:43:57.940 --> 00:44:00.560
You can't just plan for it and then have it work.

00:44:01.480 --> 00:44:03.920
Because at the end of the day, it's a behavioral problem.

00:44:03.920 --> 00:44:06.880
It's happening at the user's side of the equation.

00:44:06.880 --> 00:44:19.280
So almost every energy hackathon that I've been at, someone is super excited to be like, oh, if people could just see where their energy is coming from, then they'll take all the right actions.

00:44:20.000 --> 00:44:22.220
And you can make some really fun graphs that way.

00:44:22.220 --> 00:44:24.960
But unfortunately, none of them have ever really caught on.

00:44:24.960 --> 00:44:29.620
Like Google and Apple and Microsoft have all tried these two.

00:44:29.620 --> 00:44:34.680
And unfortunately, it's just like a really hard behavioral problem to get people to pay attention to where their energy comes from.

00:44:34.680 --> 00:44:36.600
Yeah, they don't really seem to catch on.

00:44:36.600 --> 00:44:37.300
Yeah.

00:44:37.500 --> 00:44:43.420
You put an interesting factoid up here that says people spend less than 10 minutes a year thinking about their power bill.

00:44:43.420 --> 00:44:44.180
Yeah.

00:44:44.180 --> 00:44:45.000
Yeah.

00:44:45.000 --> 00:44:47.120
So it's true.

00:44:47.120 --> 00:44:50.840
Like people don't really care even though they think they do and even though they want to.

00:44:50.840 --> 00:45:02.260
And so that's why technology can be so impactful in this part of the problem is because it's all about automation and smart devices and the Internet of Things in order to really solve the problem in a way that sticks.

00:45:02.260 --> 00:45:02.900
Yeah.

00:45:02.900 --> 00:45:05.700
You almost have to take the person out of the loop, right?

00:45:05.700 --> 00:45:19.400
If the thing that controls the house is connected back to another place that cares about how this works and the person still spends maybe 12 minutes now because they have some blinky lights to look at thinking about this per year, it's still like if it does the right thing, that's way better.

00:45:19.400 --> 00:45:20.420
Yeah, exactly.

00:45:20.420 --> 00:45:22.880
So what we do at WattTime is part of that.

00:45:22.880 --> 00:45:33.600
Another project that is in some ways related is the sort of category of ways of dealing with the energy problem is called demand response.

00:45:34.080 --> 00:45:38.060
Making the power demand be responsive to what's happening on the power grid.

00:45:38.060 --> 00:45:45.340
And so one open source project is there's something called the OpenADR, which is Open Automated Demand Response.

00:45:45.340 --> 00:45:54.020
And so this is a standard or like a protocol for developing implementations for smart devices that will actually turn on and off at the right times.

00:45:54.020 --> 00:45:55.160
Oh, that's pretty neat.

00:45:55.280 --> 00:45:55.420
Yeah.

00:45:55.420 --> 00:45:55.740
Yeah.

00:45:55.740 --> 00:46:00.100
So there's a few different open source implementations of this protocol.

00:46:00.580 --> 00:46:15.520
And those are something that are a real opportunity for people to get involved and develop those more fully because it's sort of a pain if the first thing you have to do in order to be able to work with a bunch of different devices is to re-implement a standard every time.

00:46:15.520 --> 00:46:16.360
Yeah, absolutely.

00:46:16.560 --> 00:46:19.320
So that's a really impactful place where people could jump in.

00:46:20.100 --> 00:46:27.060
And then another area around here, it seems to me, is if you know there's excess energy, if you could somehow store it.

00:46:27.060 --> 00:46:31.480
And there's a lot of interesting ways that I learned that you can store energy.

00:46:31.480 --> 00:46:40.800
Like you could pump water uphill and then let it back out and use it almost as like water power when there's less energy and things like that.

00:46:40.860 --> 00:46:47.580
But probably the biggest one that's affecting residential areas, at least, I would say, is probably the Tesla Powerwall, right?

00:46:47.580 --> 00:46:47.900
Yeah.

00:46:47.900 --> 00:46:48.240
Yeah.

00:46:48.240 --> 00:46:52.640
So that's definitely the sort of sexiest option out there right now.

00:46:52.640 --> 00:46:53.000
Yeah, for sure.

00:46:53.000 --> 00:46:55.060
And maybe not everyone knows what it is.

00:46:55.060 --> 00:46:56.760
Maybe you could just tell us what is the Powerwall.

00:46:56.760 --> 00:46:57.280
Yeah.

00:46:57.280 --> 00:47:06.780
So that is battery that you can stick on the wall in your garage and you can buy it from Tesla and you can feel fancy because you bought the thing from Tesla even though you couldn't afford a car.

00:47:06.780 --> 00:47:08.620
Essentially.

00:47:10.040 --> 00:47:15.940
And it can talk to Tesla servers and turn on and off at different times that you can be.

00:47:15.940 --> 00:47:24.620
I'm not sure exactly what features they've built out so far in terms of what different kinds of grid events it can respond to.

00:47:24.620 --> 00:47:25.000
Right.

00:47:25.000 --> 00:47:31.720
Maybe it is paying attention to price or maybe it's paying attention to renewable energy or not.

00:47:31.720 --> 00:47:32.440
Something like that.

00:47:32.440 --> 00:47:32.780
Who knows?

00:47:32.780 --> 00:47:33.080
Yeah.

00:47:33.080 --> 00:47:34.460
I don't have one either.

00:47:34.460 --> 00:47:37.360
But there's a lot of possibilities it could trigger on you.

00:47:37.360 --> 00:47:38.140
Yeah.

00:47:38.140 --> 00:47:47.460
And so there is also other similar things where like you can get used electric vehicle batteries and use those for the same thing.

00:47:47.460 --> 00:47:50.280
So it doesn't it's like recycling electric vehicle batteries.

00:47:50.280 --> 00:47:53.880
There's a secondary market where you can stick them in your garage and have them be useful.

00:47:53.880 --> 00:47:55.140
Oh, that's really interesting.

00:47:55.140 --> 00:47:56.360
That I had not heard of.

00:47:56.360 --> 00:47:56.940
Yeah.

00:47:56.940 --> 00:47:57.380
Cool.

00:47:57.380 --> 00:48:01.560
You'll have to give us some links to something like that so I can put on the show notes.

00:48:01.560 --> 00:48:01.960
Sure.

00:48:01.960 --> 00:48:08.620
You know, maybe some people out there listening are getting excited about like, hey, maybe I could participate in this.

00:48:08.620 --> 00:48:13.020
There actually are a bunch of energy focused startup incubators.

00:48:13.020 --> 00:48:16.180
Kind of like YC, but for energy, right?

00:48:16.420 --> 00:48:16.600
Yeah.

00:48:16.600 --> 00:48:27.080
So that's a these are great places to start if you have your own idea for an energy project or you just want to meet people who are involved and maybe get hired at an existing startup.

00:48:27.080 --> 00:48:29.440
So there's a bunch of these in different cities.

00:48:29.440 --> 00:48:33.560
One, two blocks from my office in Oakland, California is called Powerhouse.

00:48:33.560 --> 00:48:36.660
There's another called Acre in New York City.

00:48:36.660 --> 00:48:38.700
Greentown Labs in Boston.

00:48:38.700 --> 00:48:40.880
Energy Foundry in Chicago.

00:48:41.600 --> 00:48:42.740
1976 in D.C.

00:48:42.740 --> 00:48:46.300
So there's ones all over the U.S. and I'm sure some in other countries, too.

00:48:46.300 --> 00:48:49.380
Is the process pretty similar to going to Y Combinator?

00:48:49.380 --> 00:48:50.400
You come in with an idea.

00:48:50.400 --> 00:48:53.040
They help you grow it, turn it into a company.

00:48:53.040 --> 00:48:56.300
But it's really just got this mission around energy.

00:48:56.300 --> 00:48:56.920
Exactly.

00:48:56.920 --> 00:48:57.920
Yeah.

00:48:57.920 --> 00:49:01.060
So each one has a slightly different model, but a lot of them also have meetups.

00:49:01.060 --> 00:49:09.800
So even if you aren't ready to make this your full time job yet, you can still go to some of their public community events and learn more about what's going on.

00:49:09.800 --> 00:49:10.360
Okay.

00:49:10.360 --> 00:49:10.820
That's great.

00:49:11.280 --> 00:49:11.400
Yeah.

00:49:11.400 --> 00:49:12.540
Too bad there's not a Portland one.

00:49:12.540 --> 00:49:13.640
Maybe someday.

00:49:13.640 --> 00:49:15.440
Oh, someone could start one.

00:49:15.440 --> 00:49:17.260
That's true.

00:49:17.260 --> 00:49:18.200
They sure could.

00:49:18.200 --> 00:49:19.620
All right.

00:49:19.620 --> 00:49:22.260
Well, this has been a really interesting conversation.

00:49:22.260 --> 00:49:27.300
And before we wrap it up, let me ask you two questions I always ask of all my guests.

00:49:27.300 --> 00:49:32.520
One is, if you're going to write some code, Python code in particular, what editor do you open up?

00:49:32.520 --> 00:49:34.820
I like Sublime these days.

00:49:34.820 --> 00:49:35.760
Sublime.

00:49:35.760 --> 00:49:36.400
Very nice.

00:49:36.400 --> 00:49:36.820
Yep.

00:49:37.000 --> 00:49:40.780
Although in grad school, there's something called Spider with a Y.

00:49:40.780 --> 00:49:44.520
And that's sort of like an R studio or a MATLAB clone, but for Python.

00:49:44.520 --> 00:49:45.520
Yeah.

00:49:45.520 --> 00:49:49.180
That one comes with the Anaconda distribution, right?

00:49:49.260 --> 00:49:51.100
I think from the Continuum guys.

00:49:51.100 --> 00:49:52.360
So you can get it that way.

00:49:52.360 --> 00:49:52.720
That's cool.

00:49:52.720 --> 00:49:52.980
Yeah.

00:49:52.980 --> 00:49:54.680
But if I'm writing Django, I like Sublime.

00:49:54.680 --> 00:49:55.080
Yeah.

00:49:55.080 --> 00:49:55.360
Right.

00:49:55.360 --> 00:49:55.560
Yeah.

00:49:55.560 --> 00:49:58.280
If you're doing data science, maybe Spider is pretty awesome.

00:49:58.280 --> 00:49:59.800
But if you're doing Django, yeah, Sublime.

00:49:59.800 --> 00:50:00.340
Okay, cool.

00:50:01.200 --> 00:50:05.960
I saw the other day there's 88,000 plus packages on PyPI.io.

00:50:05.960 --> 00:50:06.580
Whoa.

00:50:06.580 --> 00:50:08.060
It's crazy.

00:50:08.060 --> 00:50:09.980
I mean, that's why it's so great to work in Python, right?

00:50:09.980 --> 00:50:12.880
Just mostly what you need is already out there.

00:50:12.880 --> 00:50:14.960
What one's your favorite these days?

00:50:14.960 --> 00:50:17.580
One I heard about recently is called retrying.

00:50:18.260 --> 00:50:22.740
So since a lot of what we've talked about is like all these different IoT data sources

00:50:22.740 --> 00:50:24.620
and grid data sources are really flaky.

00:50:24.620 --> 00:50:30.480
So retrying is something that makes it a lot easier to be like, okay, this rub request,

00:50:30.480 --> 00:50:32.920
this HTTP request failed, but let's try it again.

00:50:32.920 --> 00:50:35.720
So there's a nice little decorator that just retry.

00:50:35.720 --> 00:50:36.640
Wow.

00:50:36.640 --> 00:50:41.120
Can you say like retry like 10 times with some kind of like backup level or like what's it

00:50:41.120 --> 00:50:41.520
look like?

00:50:41.520 --> 00:50:41.900
Yeah.

00:50:41.900 --> 00:50:42.920
Nice.

00:50:42.920 --> 00:50:42.940
Yeah.

00:50:42.940 --> 00:50:43.900
So you can figure out all of that.

00:50:43.900 --> 00:50:44.440
Awesome.

00:50:44.440 --> 00:50:47.400
If people want to get involved, what can they do?

00:50:47.400 --> 00:50:52.080
How do they work with Wattime or what other advice or call to action can you give them?

00:50:52.080 --> 00:50:52.500
Yeah.

00:50:52.500 --> 00:50:57.020
So if you want to get involved in helping with PYSO, that's P-Y-I-S-O.

00:50:57.020 --> 00:51:04.840
And you can check out our GitHub page and or just email me or chat me up on Twitter and

00:51:04.840 --> 00:51:06.480
we can find a way to start working together.

00:51:06.480 --> 00:51:12.120
So my personal Twitter is windsupanna and Wattime is on Twitter at Wattime.

00:51:12.120 --> 00:51:12.860
Excellent.

00:51:12.860 --> 00:51:13.080
Yeah.

00:51:13.080 --> 00:51:14.440
And I'll put those in the links, of course.

00:51:14.440 --> 00:51:14.740
Great.

00:51:14.740 --> 00:51:20.120
And if you want to get on the waiting list for some of our smart devices, there's a

00:51:20.120 --> 00:51:24.180
smart thermostat that you can sign up for or an electric vehicle charging station.

00:51:24.180 --> 00:51:29.560
Or if you have like if you actually manage commercial building, we have a lot of other services that

00:51:29.560 --> 00:51:30.800
we can hook you up with also.

00:51:30.800 --> 00:51:31.780
That's awesome.

00:51:31.780 --> 00:51:36.360
And it won't be just renewable energy doing good, but you'll have the warm feeling that

00:51:36.360 --> 00:51:39.280
Python is in the back end making it go, right?

00:51:39.640 --> 00:51:40.040
Exactly.

00:51:40.040 --> 00:51:42.500
The real positive motivation there.

00:51:42.500 --> 00:51:44.300
Not saving the world, just saving Python.

00:51:44.300 --> 00:51:45.240
That's right.

00:51:45.240 --> 00:51:46.600
Saving the world with Python.

00:51:46.600 --> 00:51:47.000
Yep.

00:51:47.000 --> 00:51:47.480
All right.

00:51:47.480 --> 00:51:48.620
Well, let's leave it at that.

00:51:48.620 --> 00:51:53.420
Anna, thanks so much for being on the show and sharing the story about what you're doing

00:51:53.420 --> 00:51:54.400
around renewable energy.

00:51:54.400 --> 00:51:55.260
It's inspiring.

00:51:55.260 --> 00:51:55.860
Thank you.

00:51:55.860 --> 00:51:56.700
This is really fun.

00:51:56.700 --> 00:51:57.080
Yep.

00:51:57.080 --> 00:51:57.360
You bet.

00:51:57.360 --> 00:51:57.880
Talk to you later.

00:51:57.880 --> 00:51:58.600
Talk to you.

00:51:58.600 --> 00:51:58.840
Bye.

00:51:59.100 --> 00:52:03.520
This has been another episode of Talk Python To Me.

00:52:03.520 --> 00:52:08.880
Today's guest has been Anna Schneider, and this episode has been sponsored by Hired and

00:52:08.880 --> 00:52:09.500
SnapCI.

00:52:09.500 --> 00:52:11.620
Thank you both for supporting the show.

00:52:11.620 --> 00:52:14.740
Hired wants to help you find your next big thing.

00:52:14.740 --> 00:52:19.460
Visit Hired.com slash Talk Python To Me to get five or more offers with salary and equity

00:52:19.460 --> 00:52:23.240
presented right up front and a special listener signing bonus of $2,000.

00:52:23.240 --> 00:52:27.560
SnapCI is modern, continuous integration and delivery.

00:52:27.940 --> 00:52:31.820
Build, test, and deploy your code directly from GitHub, all in your browser with debugging,

00:52:31.820 --> 00:52:33.440
Docker, and parallels included.

00:52:33.440 --> 00:52:36.480
Try them for free at snap.ci slash Talk Python.

00:52:36.480 --> 00:52:39.560
Are you or a colleague trying to learn Python?

00:52:39.560 --> 00:52:44.200
Have you tried books and videos that just left you bored by covering topics point by point?

00:52:44.200 --> 00:52:49.520
Well, check out my online course, Python Jumpstart by Building 10 Apps at talkpython.fm

00:52:49.520 --> 00:52:52.840
slash course to experience a more engaging way to learn Python.

00:52:52.840 --> 00:52:57.600
And if you're looking for something a little more advanced, try my Write Pythonic Code course

00:52:57.600 --> 00:53:00.160
at talkpython.fm/Pythonic.

00:53:00.160 --> 00:53:07.560
You can find the links from this episode at talkpython.fm/episodes slash show slash 76.

00:53:07.560 --> 00:53:10.160
Be sure to subscribe to the show.

00:53:10.160 --> 00:53:12.360
Open your favorite podcatcher and search for Python.

00:53:12.360 --> 00:53:13.600
We should be right at the top.

00:53:13.980 --> 00:53:22.900
You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.

00:53:22.900 --> 00:53:28.020
Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.

00:53:28.020 --> 00:53:34.700
Corey just recently started selling his tracks on iTunes, so I recommend you check it out at talkpython.fm/music.

00:53:34.900 --> 00:53:40.080
You can browse his tracks he has for sale on iTunes and listen to the full-length version of the theme song.

00:53:40.080 --> 00:53:42.140
This is your host, Michael Kennedy.

00:53:42.140 --> 00:53:43.420
Thanks so much for listening.

00:53:43.420 --> 00:53:44.600
I really appreciate it.

00:53:44.600 --> 00:53:46.740
Smix, let's get out of here.

00:53:46.740 --> 00:54:08.260
Outro Music.

00:54:08.260 --> 00:54:09.020
Don't forget.

00:54:09.020 --> 00:54:39.000
Thank you.

