Let's move on to a next topic here, which is the GCP Cloud. I covered these two and in particular, GCP has some pretty cool stuff that we can play around with. Here's a function that I'll just talk us through real quick. Basically, this is a change machine. What it does is, it is a function that will return back the correct amount of change. I'm going to invoke this. I could basically very similar do the same thing on the AdaBoost Cloud, but I'll do this one in particular for the GCP Cloud. What I'll do here is open up GCP and let's go to their Cloud Functions. I'm going to log into the Console, go to the Console. To build out Cloud Functions pretty straightforward actually, you just go to a search bar here and type in Functions and they should pop up in a second once it fully refreshes here. There we go. Cloud Functions and inside of Cloud Functions, in order to create one, go ahead say Create Function. What I can do, well, that's annoying is I can say, new Function name, well, let's call this DevOpsChangeMachine or something like that and I would decide what region I want to do. Just like any other Cloud Function microservice, I could decide what the trigger would be. In this case, the trigger would be a HTTP web service and I then have a choice as well whether to use authentication or unauthenticated invocations. I think for demos unauthenticated is the way to go. I'll go ahead and say unauthenticated invocations. I'll go ahead and save that. Go to Next and notice that we have a choice here of Python 3.7, 3.8, Node.js, Java, go.net, all kinds of stuff. I'm going to select Python 3.8 here. In particular, you can see this is like a hello_world type template that they give you. But in our situation, I already have some code that I'm going to throw in there. What I'm going to do is, I'm going to go to this and I'm going to put in this payload here which is a fun little project. Well, what this does is it allows us to pass in adjacent payload that has the word amount in it and some coin amount or some raw amount like $1.34. Then what happens is, it gives us the correct change and it prints it out here. Notice that the entry point has to match. In this case, this is hello_world, hello_world. Also, I think this is an advantage that this interface has a little bit over the Lambda is you can put the installs right here, which is pretty nice. I'm going to go ahead and say, Deploy. What this will do is put this thing into production. That is really annoying feature of that window popping up a bunch. Basically, once this thing is been deployed, then I can actually start prototyping out this code here. The things to look out are testing. Under the testing window, it really wants that function thing to appear, under the testing window here, what I would do is put in my payload. The payload would look something like this. It would be amount. I'll make this a little bit bigger. This is like conspiring to reset, I don't know, stop popping up. We go here, we say "amount", we say "$1.34". In theory, there we go, it gives me a 134. It looks like it's valid JSON and if I say "Test", we can scroll down here, and there we go. You can see that it actually returns back the correct amount of change. If I want to change it to other things, I can go through here and give it, I don't know $10.44 and then test that out and see there's a bunch more quarters. We have a neat little service here to test out, but we can do a lot more as well and this really shows the power of these cloud-based development environments. If I click on this icon, Activate Cloud Shell, what I can do here is get into testing this function out via a command-like tool. Let's go ahead and take a look at this real quick. What I can do is look at this command and this command, in particular, allows me to invoke it via the Cloud Shell, which is pretty awesome. Let's say that I built some kind of a computer vision pipeline. I have it triggered inside of here, or I have some proprietary thing, I can again, just treat it like it's a piece of logic that's deployed, it's just waiting for me to run it whenever I want to run it and I can invoke it via command-line tool. To me, this is actually pretty awesome. I'm going to change this up here, and I'm going to type in DevOpsChangeMachine like this. What we can do is actually invoke this like this, and it will take a second and it's going to ask me to authenticate, which is fine, so I'll go through here and authenticate. Great. It's going to ask me to do this. I'll go ahead and authenticate. That's fine. Allow this copy. Now, if I go back here, I can enter this off code and what we'll do, is I can now go through and execute that Cloud Function. There we go. Now, I can just basically go through here and just start tweaking things around, and I can just run it as many times as I want. I think there's an awesome workflow that isn't intentionally simple application, but it shows how you could integrate this into a lot of different applications. Now, the other thing that we can do here is we can do more than just invoke it via passing a payload in, we can also invoke it as a web service because it's got that trigger built-in. If you look at this here, notice how this trigger right there is the URL. If I basically just copy this trigger here, and I say basically export URL equals this, like that. I could say echo dollar sign URL. There we go. We've got this URL stepped in here. Then if I go to a curl command, I can basically curl this and do some more tricky stuff to it. If I go back to my Cloud Shell, I can tear up this command. Let's see if we can get this working. I'm going to curl, I'm going to put in the amount 134, and then in terms of the actual URL, I'll just do this. I'll just say trigger. I'll just put in the dollar sign URL, just like that. In theory, this should work. There we go. Then I can actually put in different things. I guess I could be fancy here, and even let multiple things swap, create different variables. I guess I could try that real quick. What I could do, is I could say, Open editor here, and I could first grab this command, and I could make a little edit command in here to build invocation. Let's scroll this up a little bit here, and make this come up here and I could write a very simple shell command that allows me to, via Terminal, New Terminal. There we go. I can just say touch invoke.sh and then where's my invoke.sh command? I got lots of different projects open here. There we go. Invoke.sh. Let's just put this inside of there, and just tweak it a little bit. Basically, I could do a dollar sign here as well. I could say, dollar sign change or something like that. There we go. Change and if I just grab this, I could say export. Actually, I think this should be in my environmental already, echo. I have to go back to this Terminal, which is annoying, but I'll just say export dollar sign Change equals 1, 3, 4, like this. Oh, I don't need a dollar sign for there. There you go. Export. Set this variable up echo it just to make sure it looks right, Change. Now I might have to do quotes in there, like this. That looks right. Then if I put in this command like this, does that work? I screwed something up. I think it's because I need to do this. I need to swap those and say these are the inner quotes, or this I believe. Anyway, well, something similar, like getting into the basket team is less. The whole point here is that you can easily build out these invocations via web service or you can invoke it via command line, and it's a great way to interact with your Cloud Function. If you want to take a look at that, there's an example here that allows you to invoke this Cloud Function. Now, there is another one that I have as well that's inside of here that I can take a look at since I have some time, that allows me to do something a little more complex, and hopefully it works. I think I'd have to look at the last invocation here. I think there's a translation API here that I believe it's this one, that's a pretty good one, and inside of this, if we look at the source code, what it will do is a little bit more magic here. Let me just close this. This is a good example of a slightly more complex function that I install a library called Wikipedia and also install library called Google Cloud Translate, and if you look at the source code here, you'll notice that inside of this I can actually translate whatever's passed in, and then I have a request here that allows me to pass an entity in language. Basically, what website would I like to translate, or what web page in Wikipedia, and then also what language. I believe I can actually double check this by going back to here and going to Cloud Shell and looking at an example here. I can say history, grep G Cloud, and we can see here that there's, I think this is the one I call it earlier. Let's go ahead and try this. This would be a slightly more complex Cloud Function, and so it's going to ask me to do this again, so we'll go ahead and authenticate this real quick. Authenticate, sure. Allow, copy, paste it in, and if I run it again here. In theory, it should look something like this. Basically, you can go through and translate. There we go. You can see that in this particular function, I can pass in names into this function. I can say go to Google, go to Wikipedia, grab the Google page, grab 20 sentences and translate it to Spanish. We go here. Now maybe Google doesn't match something, so we'll have to do maybe another one like Amazon. Let's try Amazon. Maybe AWS or Oracle. That's a good one. There we go. Let's try Oracle. Yeah, so it doesn't necessarily have a ton of air-handling. Well, we know one of works. We know this one works. Then if I wanted to change to different languages, I could just look at the different versions of languages. I think maybe Italian, is that IT maybe? Let's see if that works. Okay, there we go. There's Italian. We can also see CN, I think is probably Chinese. No. Ru is maybe Russian. Just guessing. I don't know exactly the different languages. There we go.