Welcome back. Let's look at a scenario that you find at many universities. A lecture hall packed with several dozens or even hundreds of students. Normally, we would assume that they're all on the same degree program, let's say on a BA program English, and that they all have to satisfy the same class requirements. This, however, is in many cases the exception rather than the rule. Instead, we find courses where the students are part of different degree programs. And unlike in my schematic representation here, they are normally scattered all over the room. They will eventually receive different numbers of credit points, and to be awarded these different credits, they have to submit different tasks. In a traditional scenario where content delivery takes place within the classroom, the content is the same for all these different groups, despite their different study goals and requirements. My version here might be a bit exaggerated. Five groups within one class OK. That could be a bit too much. But two different groups within one class, that's not an exception at all. It is an enormous problem at our universities, especially after the implementation of the Bologna process. This problem can be defined as the target group problem. The teacher's role, for example, can be compared to a soccer coach who has to serve basketballers, volleyballers, and the like in his training sessions too, just because it's a ball they have to move about. So how can digitization help in all these cases? Well, with a digital teaching and learning model, we have no problem in target group differentiation. Since content delivery is now online, we can serve each target group with its specific content. Here is an example from our curriculum. In the course, phonetics and phonology, teacher students and BA students are served with different digital classes. These classes share content, but they also differ to some extent. In the digital phase, that's not a problem at all. But what about the in-class phase? Well, in the resulting inverted classroom scenario, this phase is now primarily dedicated to practicing and deepening, and we have all the time to take care of our students, even of different target groups. One option is that we serve all students in class with target group-specific practicing material. This option has successfully been used at our department since 2012. Another option is to reduce in class time. In week one, we would only have the BA students in class. In week two, we would take care of the teacher students. In week three of the BA students again, and so on. We have been referring to this concept of having two digital classes, but only one classroom, as the two in one concept. But remember, it only works with digital content, content delivery outside the classroom, and group differentiation within the classroom. After decades of target group mixing, we have thus succeeded to serve our students, not only with the content they require, but we can also apply extra attention to specific difficulties they encounter during in class time. And by the way, this concept may also reduce lecture hall capacity problems. Instead of having one overcrowded in class meeting every week, where students would have to stand, sit in the windows, or wouldn't even fit into that room, we now have lecture halls big enough for reduced crowds if we offer a two week rhythm of in class attendance. Our two in one concept has shown to be very successful and we have been applying it to several courses. However, and this should not be denied, apart from sophisticated digital content, it requires careful planning and concentration in class and well designed target group specific practical material. I hope that I could illustrate how we can provide tailored content for different groups and how we could thus help solving an essential problem of traditional teaching and learning by means of digitization. Thanks for your attention.


Hello people, I'm Ginny Metherill and I'm a fourth generation witch who practices traditional magic. Today I want to look at the incredibly pagan festival of Easter and why you should be celebrating it. Easter is one of the mainstream festivals throughout the current year that nobody can actually claim is Christian. It's just not. The name Easter comes from the goddess Easter. If this was truly a Christian festival it would have been called the Pasc or Pascal festival which is what the Christians used to call it. The Easter festivals that we celebrate were in honour of the spring goddess. Now spring goddesses abound a plenty at this time and each particular area of the UK and Europe had their own version of the spring goddesses and ours was mainly called Easter. The Germans called her Ostara and this is considered fact. The venerable bead in the veritable dark ages which is I think 600-700 in the common era wrote about the goddess Easter and how we as a nation would celebrate the festival of her at this time. Therefore Easter is pagan. The name has literally just been lifted by the Christian faith and they applied it to their own resurrection rebirth story which is exactly what Easter is about. So first of all when is Easter? Well it is a moon-based festival so it will be normally the first full moon after the equinox and that is a very traditional date for Easter and this year of course it falls upon the 6th of April the first full moon after the vernal equinox. However often this festival was also celebrated at the beginning of the new moon and the first new moon after the vernal equinox which in this case is on the 21st of April so it's you know six of one half a dozen of the other depending on how and when and where you want to celebrate. Easter itself is therefore a festival of rebirth and what is the most rebirth renewal thing that you can possibly find? Well of course it's an egg and eggs at this time are prolific there's hundreds of them that's why there's lots of games involving eggs you know rolling eggs down the hill decorating eggs giving them to your friends and as a practicing which I would definitely charm some eggs to give away to my friends and family on Easter simply boil some eggs coloring them appropriately and as you're stirring the eggs bless them with your charm for rebirth renewal, fecundity, abundance and wealth what more could you want? When the eggs are eaten because these are hard boiled eggs and make sure they are eaten waste not want not after all this will be the management of the spell. Having established very quickly the Easter is a festival about a spring goddess we're going to look quickly at what that festival means and how they would be celebrated. Well of course there is a very old tradition especially in the southern part of the UK and this is something that I definitely like to do on Easter which is to wake up extraordinarily early on Easter morning and before dawn you climb to the top of the highest hill it has to be the highest hill in your area because otherwise the sun will be obscured by the other hills luckily the highest hill for me is literally just around the corner so I've only got to go up the road a bit you know I probably could run there with the docks but I probably won't. When you're standing on the hill you are then able to see the Easter sun dance and watch the sunrise slowly come up and you should see the sun dancing in honour of this Easter morn. This is a very old tradition and the spring goddess was always just a generalised version of the rebirth of spring and it is her marriage to the green man that brings about this celebration of Easter and the rebirth and renewal of the land and traditionally it was celebrated as a flower festival so you would pick all the primroses and daffodils that are out there and put them on your altar in celebration of Easter which today is something that I still do. So where do we have the Easter bunny from? Well this is an old myth and there's several different versions of them. The goddess Easter's favourite form was as a hare and one day the goddess Easter was running in her hair form through the fields. The wild hunt is also out at this time because they mean to capture Easter in her hair form to prevent the spring coming. The wild hunt chases Easter in her hair form and therefore she changes into a bird in order to escape those slavering hounds. Whilst in her bird form of course she lays eggs but as her favourite form is as a hare she will change back to the hare but keep that egg laying capability. Hence why we have the Easter bunny laying her eggs and bring them to the children of the time. Beautiful willow trees as the first trees amongst us to green up at this time of year and therefore were ascribed as special status during Easter. The weeping willow was such not just because its branches hang down and its head weeping down towards the ground but because it was considered a tree of death and bereavement. Widows would wear wands of willow in their clothing or in their hats to signify their status at this time and in fact it is the time for witches to go out and cut their willow wands and what could be better than to go out on an Easter morn watch the sun dance then go to your local willow stand asking the trees permission and cut your willow wands for the year. Willow wands are very good for using with spells for rebirth and abundance and you don't need to do anything apart from ask the trees permission and dedicate that wand to your craft. But for the rest of us willows are at this time the perfect place to go and look for the fey. The Wind and the Willows by Kenneth Graham you remember that book with Badger and Mole and Ratty the Wind and the Willows is actually an old phrase meaning that this is where you heard the fey talking to you that wind in those trees is them speaking with us. So let us turn our attention now to what you might eat on your Easter morn and there's nothing quite as pagan as a hot cross bun. Now the hot cross bun everyone says oh well look it's going to cross with it so that's Christian. No no no no.  Bakers when they baked their bread and risen buns would put a cross in the top of them to give them protection also to help the rise in the bake but it was mostly to ward off evil spirits add protection and to ensure a good batch and the current day hot cross buns that we know and love are an amalgamation of previous pagan square cross buns now marked with the white flower paste which is quite revolting in my opinion by the Christians news as part of their celebrations however literally taken from us. Us traditional witches were eating hot cross buns before Christianity had even been invented. Northern England was also particularly keen on doing something called holly bussing. Now this is simply cutting down holly and taking it and decorating sacred stones with it on Easter morning in honor of the goddess and so for your altar I recommend a little bit of holly definitely a load of flowers and some eggs and this is a perfect way to celebrate your pagan Easter. If you've ever been to a church on Easter Sunday you'll notice that the altar that they have is decorated with lots of eggs flowers hot cross buns potentially and this is pretty much just a rip-off of what we would have been doing previously so us witches would have been having an altar to Easter incorporating all of these elements themselves. So my cover meeting is coming up in a couple of weeks do you go to www.patreon.com forward slash a Ginny mother all for all the details I'm not sure what we're doing I haven't written it yet but they are going from strength to strength and I really recommend if you're interested in learning witchcraft and joining with others it's great I love them otherwise I hope you enjoyed this video if you did give me a like and subscribe because I really need this to help this channel and keep doing these videos and I will see you in a few days


When the fire starts, the flames spread, and things start burning to the ground, you'll ask yourself how prepared or unprepared are you?  Did you clear a zone at least 30 feet from your home? It's best to work in unity with your entire community. Is your emergency supply kit packed? Are your documents safe? Does your family have a plan and know what to do? Because when the flames come your way, you need to be ready. Stay informed. Check for updates.  Don't dilly-dally or waste any time. Your life could be on the line. Now if the fire gets near, try not to panic. Don't be frantic.  Once the flames are out and the smoke disappears, do not go home until you hear the all clear. When it's time to clean up, put on some gloves, a mask, and long sleeves. It's a good idea, most definitely. So before the fire starts, the flames spread, and things start burning to the ground. Get prepared. Make a plan. Practice what you know, because a wildfire can happen anytime, anywhere, even close to home. Get started today. Go to ready.gov slash prepare.


I will talk about async.io above enhanced exception handling with task group in Python 3.11. This is my first time in plug. It's such a wonderful city. I want to thank the staff for this wonderful conference. Yes, hi. My name is Junya Fukuda from Nagano in Japan. And you can find me on Twitter on Junya FFF. In English, my name often gets confused with junior. But it's not junior, it's Junya. If it's hard to pronounce, feel free to call me Jun. Please feel free to take picture and tweet. I'm a software engineer at Groovex Inc. And I also write and translate English book. Currently, it's only available in Japanese. So it's an excellent choice for those wanting to learn Japanese. Well, today I would like to introduce a new future of async.io and new Hello-ish world. This is our goal for this talk. Introduce Python 3.11's new API async.io task group. Compare and explain the difference between Python 3.10 and Python 3.11. We can write exception this easily. So this is how cancellation works. I hope this talk will inspire you to give the new API async.io task group a try. I will guide you a reliable and safe way of writing with async.io task group. And I hope that together we can reach this new Hello-ish world. Why? I'm giving this talk you might ask. There are too many reasons. So I can cross that tweet by Python quad developer Yuri. He's one of my heroes and the author of the async awaitpep. When task group was merged, he kept tweeting with excitement. The first reason is that I wanted to understand what was so amazing. At first, I didn't understand why I was so excited. The second reason is this. There is my favorite book using async.io in Python published by O'Reilly. There was a code I didn't understand. This code is rather long for a quick start. I want to simply the code for the Hello world with available async.io. I found that async.io task group can do that. I'm giving this talk to share simple and powerful async.io with all of you. Our agenda for the discussion includes the following key points. First, we will explore the concept of capturing concurrent exceptions. We will then turn our attention to how we can cancel tasks when an exception arises. This is an important step in maintaining the smooth operation of our asynchronous code. Finally, I will try to reach async.io's new Hello world. Here's what I will be talking about today and what I want to be. What's that in my mind? Let's get started. I have a question for you all. Are any of you using async.io? If so, thank you very much. Many people that I accept are using it. We are all in this together. I apologize what I prepared is for the case where many people are not using it. Please listen with the mid-test of someone who hasn't used it yet. Let's quickly go over async.io. Async.io is Python's standard library for writing asynchronous code. It enables handling multiple tasks concurrently, especially effective when dealing with IO bound tasks such as database access or HTTP requests. With every new Python version, async.io continues to evolve. High-level APIs have become more and more solid and very user-friendly to write code for. Sure, with that in my mind, why don't we use it? It is really so. Let's think about it a bit. So I've given some thought to why we might not use async.io. Here's a quick run-down. Today, the focus is here. Async runs processing seems like it might behavior unpredictably. What will happen if you, exception, occur in this process? Have you mentioned or been asked this during a review? Seems like it might behave unpredictably. I'm concerned about the behavior of the code routine when it is executed. A new future that serves this issue. That's where async.io task group comes in, added in Python 3.11. The basic feature of async.io task group is multiple tasks and handle concurrently all at the same time. Similar functionally was available even before Python 3.10, such as async.io gather or async.wait.atc. Let's start with the official document. Here is sample code taken from the official documentation. Async.io task group use context manager to run multiple tasks at the same time. In this example, it's run the asynchronous function some color and another color at the same time. The task are finished when the context manager in existed. However, you can also do this with Python 3.10. I tried writing the same code using async.io gather. Actually, this looks simpler. So what makes async.io task group special? Task group has two major features. Capturing concurrent exception and cancelling tasks when exception occurs. This API when dealing with exception and cancellations. Let's look at each future one by one. First, capturing concurrent exceptions. When handling multiple tasks together, naturally, exceptions can also occur concurrently. Let's compare Python 3.11 and 3.10. Let's see how we could capture exception in version prior to Python 3.10. The async.io gather function has an option for exceptions called returns exceptions. Let's explain this. Today talk has a lot of code. It may also be a little hard to see. Check it out here. Let's get set up. Previous asynchronous function to run concurrently. The first is coroutine, color success, which returns success. The second is the coroutine, color value error, which writes value error. And the third is the coroutine, color type error, which writes that type error. Run this at the same time to see how they proceed, process. Please note that we have omitted await. Here for the sake of explanation. Let's take a look at the care when you specially force for this option. This is what the code look like. Execute the 3 async function, this discredited area at the same time. Let's execute this code. I will only handle value error and cannot catch type error. I will catch the first exception that occur like this. Next, let's take a look at the scenario when the return exception option is set to true. In the case when the return exception option is set to true, you will retrieve the result as a list after executing all the tasks. Therefore, you need to check the list for the result. This is what the code looks like. I will run tasks together using gather. The difference from before is that return exception set to true. Let's see how this is handled. The results will be returned as a list. Therefore, it is necessary to have a process to check the list. I will add a process to check the result list. The code is simple. The purpose is to check for errors. Now let's run the code again. The handle errors properly like this. It is necessary to perform check. When return exception is set to false, only the first exception can be called. All the occurred exception cannot be captured. When return exception is set to true, it is necessary to check the return list of values. All tasks must be performed before the result can be rigid. By setting return exception to true, you will receive a list of results that includes both the successful results and exceptions that occurred during the exception of the tasks. To handle error or process the results correctly, you need to iterate over the list and handle each item accordingly. Addictionary all tasks will be executed regardless of whether an exception occurred during their exceptions. For example, let's consider a scenario where you are making 10 HTTP requests concurrently. Suppose an exception occurs in the first tasks. In this case, you would need to wait until the remaining nine tasks, which might also fail, are completed. This means waiting for all 10 results, even if they all end up with the same error. The solution is async-io-task-group, and the new syntax accepts the syntax. I will execute the same async function as before. There are three async functions. We will modify async-defme. First, let's simply execute multiple tasks and receive the results in a list. It will look like this. Now, how should we write the exception handling? Add try, add accept star, value error, type error. Using accept star, we can catch each exception separately. Now, let's execute this code and see the result. You can see it catching both of the two exceptions, value errors and type error. It can catch exception occurring concurrently. It is written in a way that is easy to read, similar to synchronous processing. This is the first feature of async-io-task-group. The key here is accept star. This is a new syntax in Python 3.0. Let's take a look at accept star for a moment. Accept star is a new syntax in Python 3.11. Accepted in PEP 6154, exception group and accept star. Use when you need to write multiple and related exceptions. PEP 6154 lists five motivations. Among them, there are concurrent errors. It mentions the change of async-io-task-group, which does have a good way to handle exceptions thrown by multiple tasks. The C Python code for async-io-task-group. In the following data, I exist. It's boundaries of all errors and throws a base exception group. It is a content of the errors, only subclass of exceptions. The base exception group constructor returns an exception group. See this reference for the exception group. Next, cancelling tasks on exception. What happens to the remaining tasks being executed concurrently when an exception occurs? Depending on the situation, the remaining tasks may just continue to run. Let's look at an example of when async-io-task-group is used and tasks are left over. Async function, wait a bit. There are three functions. Async function called color long, async-io-slip and print. Execute three async functions in async-io-gather. We are done for clearly when it is executed. Now let's execute. Sorry. It will output barrier and then done. After that, there will be an output from the async function called long saying, color long task is still running. In async-io-gather, when an exception occurs, other tasks remain running. This make is difficult to predict behavior. You may want to stop or roll back what should do too. Cancellation comes into play here. In some case, the remaining tasks are executed as they are. Cancellation is not new future. You can also cancelation with async-io-gather. Let's modify the previous code. There are three points of modification. First, we add a post-processing to the color long async function that gets canceled. Next, we check for remaining tasks and instruct them to cancel. Finally, we wait for the compilation of the post-cancellation process. We use the task-cancel function to cancel a task. We send a cancellation request to the task. Then, an async-io-cancel error exception is sent to the cancelled task. Therefore, you need to catch the async-io-cancel error within the async function. Also, you need to send the async-io-cancel error back from within the async function. I'm a little confused. Let's try to implement it. Let's try to modify the async function color long. We need to catch the cancelled error. We will try to accept to catch the cancelled error. Next, we add the post-cancelation processing and then re-throw the cancelled error when re-throw the task will be treated as cancelled. When using async-io-cancel, it's necessary to check remaining tasks. Instruct them to cancel. And when wait for the processing to complete. For each of three, we use task-cancel, task-down, and async-io-cancel. Let's modify the code. Here's the code from earlier. Easy to check task status. The process is the same. Unfinished tasks with task-down. We run task-cancel for unfinished tasks. Then we wait for completion with async-io-cancel. The overall picture looks like this. Review beats the output in case a task remains. This is called before-modified-cancel. Other tasks will continue to execute when exception occurs. Here's the modified code. We should see the output column task was cancelled and the entire process should complete right. When cancelled, the async function gets the cancellation. This is the basic for cancellation. When using async-io-cancel, it was necessary to check remaining tasks. Tell them to cancel and wait for processing. Let's examine the case with async-io-task-group. With async-io-task-group, all remaining tasks get cancelled automatically when the context manager is exited. And it waits for the cancellation process to finish. Simply put, there's no extra work required. The tasks get cancelled on their own. Now, let's refactor the code we just wrote. Here is the code from earlier. Refactor here first. Turn off, gather, and review the task creation. Put the result in one of the gets result. Put answer next to the accept. Checking the task status and waiting for the cancellation process are not necessary, so we will remove them. It's the same as using the task-group normally. With this, we can cancel the tasks. Let's give it a run. The order of catching exceptions and processing after cancellation has been switched. This is because we are doing the cancellation process after catching exception before. Task-group properly manage the tasks within. Since everything is wrapped up within the task-group, each result is more productive behavior. Now, that we have seen in the future of async-io-task-group exception and cancellation has been simplified. Finally, write async-io code in reliable and safe way, the new standard hallowish world. First, we import async-io. Next, let's define our async-function. After that, we line up the async-function we want to process concurrent using a task-group. Oh, and don't forget to consider exceptions. We don't have to worry about cancellation here. It's handled automatically. Finally, we execute it with async-io-run. How about this for hallowish world at Python 3.11, considering cancellation and... Sorry, considering exceptions and cancellations. Quick start introduced first. It was checking the status of the task and waiting for the cancellation process. Some function and argument are deplicated, so if I went to do this in Python 3.11, I would probably do the following including exceptions. The book is excellent, please check it. Catching and cancelling exception with async-io-task-group was introduced. I'd be delighted if this talk serves as an opportunity for you to consider your current code or speak of interest in using async-io for the first time. Please enjoy a more comfortable async-io-life. Hello. Sorry. We have to stop now.


Okay. Hello everyone, I hope you all are doing great and for today's session we would be discussing about building operators like Ninja with Kubernetes operators. So let me just share my screen. Okay. Is my screen visible? Okay. Cool. So yeah. So this is the topic for today under the light and myself, my name is Avni Sharma and I am a software engineer at Red Hat and my day-to-day work revolves around Kubernetes, OpenShift and operators. I work in the developer tools team in OpenShift and along with me I have my colleague Akash who is a software engineer as well and we both together work together in the same project. So what is our goal here with the talk today? So our goal here is to help you all to build your very first operator. So it's a very beginners oriented session and we would take you from why we need an operator and when we should plan on adopting to use an operator and then Akash would be doing a live demo on building your operator. So what are operators? So at the very onset of the talk I would like to describe that when we say operator we should visualize a human being who is really adept and who has a very deep knowledge of the systems they are working on and they know how the systems behave and how to react if there are any problems. So when I say operator we should think about a human operator who does manual tasks day-to-day and that person is really skilled and he knows the application domain whatever he is working on. So operator is basically a pattern and this word was coined by CoreOS. So considering the stateless application scenario in Kubernetes today. So if we consider a typical 12-factor web app we can perform the following scenarios. So our pods can survive crashes and node failures which can be done through a replication controller and we can easily scale it up and down and we can internally load balanced traffic to instances via our services. So basically currently in Kubernetes the scenario of managing creating stateless application is really seamless and smooth. But what happens when we have a database or let's take it on a very broader spectrum what happens when we have something stateful it can be a database it can be a message queues anything like that and it can be caches as well anything which has state oriented to it and we can have some legit concerns around it and those concerns can be that instances need to stay with the data and scaling may not be as simple as we did for stateless applications on Kubernetes as we all know that special knowledge would be required to manage the database and it cannot be rescheduled on any host like stateless services so it is pretty cumbersome. So for a stateful application I have considered an example of an HCD database and it will perform the following four actions that is namely to create, destroy HCD cluster, resize, backup and upgrade. So on taking a recap of what we had discussed of a human operator image bringing it down into the Kubernetes world we can essentially say that an operator extends the Kubernetes API to create configure and manage instances of complex state application why why do we say it's complex state application because specific domain application knowledge is encapsulated in it and we build this operator upon the basic knowledge of Kubernetes resource and controllers so we would be using the concepts of Kubernetes resource and controllers and then building our logic for our complex state applications and this is known as an operator. So now I have divided the definition into three important parts so the first one is custom resource definitions so today when we do kubectl or kubectl as many people call it we can do kubectl get pods get deployments but I want to do kubectl get suppose hello anything arbitrary something that I have made and something that is not available in native Kubernetes out of the box so that is my resource that is a custom resource. So when I talk about custom resource I definitely talk about a controller because once we have our resource we need certain actions to be held against that resource and since it is our logic we call it a custom controller and of course the custom controller would have domain knowledge since it is custom and the domain knowledge can be like installing cleanup self-heal restore backup update anything. So when I say I need a custom resource it basically means that I need the whole configuration of my resource at one place I want to mention it in a declarative manner in one yaml and I want action happening upon that yaml. So before we discuss CRDs I would like to show how an api request looks like in a native Kubernetes resource so like I do kubectl get pods pods is a resource and typical api request would look like api slash core slash v1 slash pods and if I see pods is a resource v1 is version and core is group. So to make my custom api request I would definitely require a group and a version so there we go we need to come up with our group version and resource names and this is effectively how we are extending the Kubernetes api that is not necessarily available in a default Kubernetes installation. So as I discussed we we call CRDs as custom resource definitions and CRD is basically a way to define a format for telling Kubernetes that my custom resource is going to be of this format so CRD is basically a blueprint and custom resource would be an instance of that blueprint. So this is a snapshot of a CRD example and it does not cover the whole yaml file I have just taken a snap of it so we are as you can see I have taken a very arbitrary name which is hello and if you see under spec I have defined my group version and this is what I have given its custom to my needs and the kind is hello so like we have kind pod I have given kind hello and as you come beneath you can also see plural and singular so like you can do kubectl get pods that is plural and similarly I can do kubectl get hellos and I can register my custom api request in Kubernetes because of this very cool feature which is known as custom resource definition if you see the kind in the topmost second line you can see it's custom resource definition and it is in v1 beta one stage so this is a typical CRD yaml that would look like so we have the blueprint we have the format we now need to create an instance of that format so I have my group that had described earlier and I have my version and my CR name which is my instance name would be example hello so now if you see the spec so spec would specify the desired state of the cluster this is what I need and that is what you would define in your instance spec so just summarizing we have a CRD so it is very analogous to doing kubectl get pods I can do kubectl get hello and like I have an instance of a pods suppose example pod similarly I can have an instance of hello so now I have my instance there I apply it in my cluster but what happens now I have applied my instance and there's nothing happening around it so for that we need a controller and that controller has the domain knowledge that we imbibe in it and this whole scenario is a custom controller so a custom controller needs a it means that a custom resource needs a controller to act upon its presence inside the cluster and such controllers are called custom controllers so this is the current state of the cluster and we need to reach to a desired state that is the whole aim of the controller so this is a very basic loop that is there in Kubernetes and it works on these three major steps which is observe analyze and act so observe means to observe the current state of the cluster analyze is to compare the current state to the desired state desired state is something that our custom resource defines I showed you the spec that was according to our custom needs that I needed of size 3 of city blah blah and name yada yada and once I know what is my current state and where do I need to reach I can act upon it either I can spin up more parts delete parts anything and you see this is a loop so over here what is happening is that whenever there is any crowd event whether it's create whether it is kubectl edit whether it is kubectl delete there is an event happening and this is event driven this loop is event driven and that event would then trigger observe then analyze and act in a sequential manner so the events drive this whole loop and we have a nickname for this and we would be mentioning the nickname from now on and it's known as reconciled so went to opt for an operator so you should consider these points while thinking that it should you even think of building an operator so you should go ahead if these points have been did against so either you want application that uses declarative API you want top level support from kubectl and you want basic crud actions happening on your instances or custom resources and you need the whole reconcile loop happening which is typically build automation for watches and the whole event handling scenario and that event handling scenario is governed by your business logic that has been encapsulated in your custom controller while it might seem really tempting to just dive in and build an operator it can be really challenging because you have to write a lot of boilerplate code from scratch if you don't have a framework it can be really tedious you need to have advanced knowledge of informers good testing scaffolding a good repo organization and research related to tools interact with the API so it can be very cumbersome intimidating and we definitely need an easy way to create and manage operators so you might think it's time to freak out but sit hold in tight and we have a solution for that and that is effectively operator framework which is an open source project and operator framework has three important parts which is operator SDK operator lifecycle manager and operator metering so we would be touching upon operator SDK and operator SDK is a it's a framework which lets you build your operator and it is really easy to use operator SDK so today we would be concentrating just on building an operator and OLM or operator lifecycle manager is a way to distribute your operators and manage the lifecycle of it so like install upgrade update all of that is governed by OLM and operator metering is related to metrics and we won't be touching these two you can also refer the link that has been mentioned here in the slide so while building an operator we come across operator SDK and within operator SDK we can actually develop operators via three ways which is go ansible and help for today we would be going through building operators with go so this is the demo workflow over here I'm concentrating on the reconcile logic excuse me so first we have observed where we are watching over API requests and this is my custom resource I apply it and once I have applied it it's there in the cluster I'm analyzing it now so I'm checking the size and the version mentioned in the spec in my custom resource which is my desired state so current size currently I have nothing in the cluster so current size current version is none desired count is three desired version is also mentioned so now I see that current size since I have nothing it's less than the desired size and current version is not equal to my desired version so I've analyzed it now I act upon it so I can either scale up ports depending on the size scale down change image tags and advance custom logic would be to have each part in a separate node so this is all custom logic you can act however you feel like so the other thing can be cube cutl edit cube cutl delete so all of these events would eventually retrigger these steps so that is how the reconcile loop works so it's demo time and I would like to hand over the baton to Akash now hi everyone so Avni has given us the basically theoretical knowledge about how we can use operator SDK to perform the automation on our cluster so in this demo what we are going to do is we are going to create one sample at CD operator so what this operator would do this would help us to create basically to deploy at CD cluster on our Kubernetes inside our Kubernetes cluster we can scale up we can scale down and we can also destroy the cluster if you want so all these operations can be performed using operator itself so let's go ahead and start the operator so first thing is we need to create a repo we need to have a scaffolding so operator SDK provides a way so this is operator SDK and I have you can see operator SDK installed okay so we need to do operator SDK in new so this is a command to create a new operator so we need to pass two arguments one of them is the operator name the other one is the repo URL so this is where we actually provide our GitHub repo link so that the import path would be aligned so let's go ahead and create the operator okay I already have it so I'll just delete it and create it again using the same command so you should see it has already it's it's been creating some files go files some set of files which are required to run an operator so we can go ahead and and see into that okay so I can show you the tree so here we can see it has already created nine directories nine different directories some are related to the build some are related to the it has some yaml files which are required for Kubernetes to set up the set of our operator and some go files so right now we can see we don't have anything inside our package directory just empty APIs file and we don't have anything in in our controller as well so first thing as I only mentioned that we need to create we need to have our custom resource defined in our Kubernetes cluster so how we can do that we need to do operator SDK we need to add there is another command called add and we can provide the API and this is where we need we need to pass kind kind is nothing but the name of the custom resource the way we have in our Kubernetes like pod deployment or replica set so something like that we're creating our custom resource with this name and we're providing some version groups as soon as we do that let's go to create another couple of files let's go ahead and we can see it has called it has already created some files under the package directory and the deploy directory so let's go ahead and see the package directory so here we can see it has created this version and the actually types the the go equivalent of the custom resource which we are going to create so right now we have API but now we need a custom controller which acts based on the changes which we do on that on on the CR so basically if we create a CR if we update CR or maybe if we delete the CR our controller should get triggered so right now we don't have any controller defined so let's go ahead and create a controller so to create a controller again we need to add controller and to this we need to pass a parameters and the parameters are kind the same one which we passed in the previous command so this is where we pass the we say that we want to watch this particular resource in our Kubernetes cluster which has this version so operator SDK is going to generate a controller code base for us which which already watches these resources okay so here we can see it has already created some you know controller files with some boiler code so right now I will not go into the this created files because we still have to add our custom business logic to it and we also have to define our CR spec so in our CR here you can see in the notes here our CR will look something similar to this which which which I have here it has a spec size and the version so size is basically the number of parts we want to have for that HCD cluster and this is the version and this version is nothing but the HCD version which will get create the the parts will get created with this HCD version so as soon as the idea is as soon as we create this here we should have HCD cluster ready with this number of size number of parts so what we are going to do in the controller custom the custom controller we are going to create deployment based on the CR metadata values so let's so I'll just go ahead and open up the already created operator here and I'll open it I can show you guys the code base so first I'll go over the so these are the directories which you got generated by operator SDK so first thing I'll go into the APIs and you'll see the API here yeah so this is the API struct which we created so I in the spec I've already defined size and value so we want this to metadata inside our spec field so whenever we create this CR this field will get automatically mapped to the HCD this particular ghost truck so that it will be easier for our controller to face the values and build deployment YAML based on the values we provided in the CR and also we have something called status so status is something just it will return the status of the current CR so whenever we create a CR our controller will perform some operation and as output we should know that whether there are there are any errors or what is the status of the that particular CR operation so this is something API will look like after that I'll just go ahead and show you guys the code of controller itself yeah so this is the code so most of the code is auto generated so only the thing is first thing is we need to watch particular resource so that has been done in the add function here here we can see uh we can watch this in this particular resource watch this particular resource and we can we can already we can we can pass some kind of predicates whether we want to perform we want to trigger reconcile loop on create or on delete or some update fields so that's up to us so this this watch is completely customizable after that so whenever there are some changes detected by the operator it triggers the reconcile loop so this is the main backbone of custom controller we receive so um so we receive a CR in the reconcile function and we can perform the business logic what we want so um in our example we want to have deployments created for this specified size and versions that's what we are doing here if you see I'll just go ahead directly head to the code where we created deployments so this function will internally get called some somewhere in the reconcile loop I'll just go ahead and just go ahead and see the create yeah so this deployment so what we do is we simply create one deployment yaml equivalent ghost truck here and here are two values we are going to define specifically the one is the size so here instance is nothing but the CR which we get which we pass here to this function and we read the size value size is nothing but the port size and another one is we need to have a proper xcd image to deploy so this is something I'm getting the image xcd image from vietnam actually repo and I'm replacing the instance version so this is so whenever we pass like in this year we can see 3.4.9 so it's going to pull the image of vietnam hcd 3.4.9 so this is how it will do it will work and in reconcile we will create this will create this deployment and then yeah basically we'll create this deployment and we'll have extra business logic to perform what to do when there is an update what to do when there isn't deletion so in case of deletion we'll simply delete the deployment and in case of update we'll simply simply patch the deployment okay so this is all about the controller now let's get go ahead and let's begin now run this operator to run this operator locally we need to we'll first make sure that our cube CTL is pointing to the correct cluster so I'll just check if my nodes are up yeah so right now I have a 1.18.2 Kubernetes cluster to run the operator inside that cluster we need to do operator sdk run and local so what this will do this will basically start a process start a go process and the client go will basically be pointing to the cube CTL configs let's go ahead and start but before before starting this we need to make sure that we have CRDs registered because our cluster have no idea about a city cluster CR we can see inside the deploy in CRDs we have this particular yaml file generated by operator sdk it contains all the schema about our CRD what fields we have the then the open schema validation everything will be inside that so let's go ahead and create this CRD so now it's it will be registered we can see the creator now let's go ahead to the root and I'll do the operator sdk run local yeah so we should this we should run this this is now running the operator in our cluster so we should able to perform any operation which we just discussed like creation of cluster managing the cluster so let's I'll just go into the directory okay so right now we already have an example here I'll show you guys example of the CR example so what it has it specifies the epi version kind it's just ordinary yaml Kubernetes yaml but here we have the kind as it's a cluster and the these two specific specs which we defined in our in our epi so which one of them is size and version so this we have quality specified the default values three and this is the city version we want to have a cluster with we can simply go ahead so before that I'll just watch here the Kubernetes deployments because we should see that deployments are up the size and everything we can see here we can do this so right now we don't have any resources so let's go ahead and create create this example here okay so here we can see our reconcile loop got triggered as soon as we created this epi this year with the hd api and here we can see it has already created a deployment file and you can see right now the image should be pulling up yeah so you can also see parts the containers creating so you can see so right now what we what we have done is we have created a cr the simple cr simple cr with the particular metadata and it has created a hd cluster for us with that particular version so let's say now we want to scale up the cluster because we don't want only three nodes we want five nodes to be running for this cluster so all we need to do is we just need to edit that this particular cr so how we can do is we can do tl edit the hd clusters and the name so I'll just set my editor so it will be easier to edit I'll just go down straight to the spec fit now I don't want three I want let's say six and I'll save the file internally it'll look cute so it'll apply we should see if we see the pick and sell loop has been triggered and also the deployment size has been changed so it's easier to scale up or scale down so similar way we can scale it down back to the three again I'll head to the size instead of six let's have three only just apply it internally it'll apply it'll patch that yaml and we can see the deployment has been changed to three now we no longer want let's say we no longer want our cluster so all we need to do is we just need to delete a cr so now whenever we delete a cr the deployment will also will get deleted because we have set the owner reference of this deployment config to the cr which we created so as soon as we delete the cr all the dependent resources will get cleared up from the cluster let's go ahead and do that we're going to delete hd clusters and the example cluster cluster is deleted see here you can see the deployment is gone so our cluster is cleaned now so this is how we can use operator sdk to manage you know small application or any complex application it's up to us up to the business so we can have as much as complex business logic inside our reconcile loop or inside our custom controller yeah that this is all about the demo so Avni will just now give us a recap of what we did here so back to you Avni I hope my slides are visible yeah so a quick demo recap we have less time so I will just rush through it so that we can take questions so what we did with operator sdk was we got an awesome boilerplate code the other thing that we saw Akash doing was to mention the spec that is in the cr in a golang format and we can see it's very well mentioned hcd cluster spec and it is it is just that it is so easy to locate where to add and similarly the status part can be added there as well and this is the types.go file so defining apis is also pretty easy now and the other thing is defining custom logic in reconcile function we have the hcd cluster controller.go file under controller hcd cluster so we have it's like our life is sorted now everything with one framework and in a very seamless manner so I would just like to mention operator hub which is like an app store of operators it's a registry where even you all can contribute your operator or use any available operator which is already built there and it's out there in the community and operator hub can be installed in any kubernetes cluster so this is operator hub installed in open shift and you can see that there is an operator here for example a service binding operator you just click on it and you click install and there you go that's your operator there up and running in the cluster so at the end of the presentation I will I have mentioned some links in the pdf and it would be there on the sked as well I have uploaded the presentation so you all can take a look at all these relevant references and under demo example you would find the example that akash ran the hcd demo operator and you all can ask questions there via issues or drop us an email and you can just take a look at the example and there's a community support around it you can visit kubernetes workspace and kubernetes operators channel or you can hang out in google group discuss and yeah get your questions clarified as well so this is amazing now we can all build our own operator how cool is that so thank you all for attending today's session and we're open to questions and while we are taking questions I would urge you all to scan this QR code drop us a feedback and any questions that you feel that were not answered because we're running short of time so yeah that was it yeah yeah sure any questions yeah I think we have a couple of questions in the chat itself so yeah yeah so operator is demoed locally and the client is basically pointing to the remote kubernetes cluster so yeah it's not actually entirely deployed on the kubernetes cluster if you want to deploy there is a way operator sdk provides a way to you know put that whole operator in the offer image and then deploy it or there is something called operator hub that you can it's a kind of marketplace for operators you can have your operator and um on the operator hub and then you can basically install it on any cluster are there any plans to support other languages in the operator sdk besides school uh yeah I I think that there are I don't think so so we um so right now we support go entirely because all the kubernetes ecosystem uses the go so we have all the uh dependent packages um and it's very easy to write operator because most of the code is already being written but I think there are a couple of open source projects uh they're still trying to um trying to make use of you know the controller runtimes to have it in in different languages I think python is one of them if I'm not wrong yeah just to add to that I have come across a python client libraries like we have client go and some java client libraries so there are client libraries there to make custom controllers however I'm not sure about any framework around it so yeah we do have client libraries also you won't be deadlocked that uh due to any language constraints you can still go ahead but I'm not sure about the framework being built around it also we have a way to have the operator with the helm but again help using help we can only create different resources but having the business logic is kind of difficult using help so go is the better way if you won't write operator uh what are your use cases for using an operator um so in red hat we basically have um dev console operator we have a couple of operators so all the functionality uh which are required to be deep inside the open jib cluster we have operator for that for example um we have something called dev console where we can just provide a git url and as soon as we provide a git url our code should get deployed uh with without any issue so it should get compiled the images should get built and deployed to the where or any other docker registry and everything should work seamlessly so that is something we are working on in red hat and there are a couple of uh we also have a service binding operator uh I was currently working on that and so what a service binding operator does is that it takes applications and services services can be any backing service any db or any Kafka anything and it connects your application with that particular backing service and you would not come to know about it so that is something that happens in the background and that's an operator use case that we are taking to and yeah you can explore it on operator how about yeah and I uh to the only I can add few more points about service binding operator so so you can basically connect two different applications uh in kubernetes without doing any extra configuration like if you are like xd cluster and if you have another node this application which uses xd cluster you just have to create deployments for these two different uh applications or database and the application and they just create a service binding cr specify that you want to connect this xd cluster to this node just application and our service binding operator will basically handle that it to figure out all the um all the required metadata such as host URL username password and it will bind it into the node just pod so that is the use case we have I guess my uh my slides were not shared in the my screen was not shared in the end so you all can take a look at the ppt again I have uploaded it in uh shed as well yeah okay so there's one more uh unanswered question how does the status help in your reconciler uh so right now I think I did not uh show you the status so in in status when uh everything goes right we just print the message that the the xd cluster have been has been deployed with this number of pods or number of nodes and with this xd cluster version and if it fails we just append the error so that it's easier to debug um as a Kubernetes admin right and we have another question is your operator demoed running locally or within the kts cluster sorry which one is this is your operator demoed running locally or within the Kubernetes yeah I didn't answer that so I'll repeat that again so basically operator is running locally using the go process so it's demoed entirely on locally but when we run the operator code it actually uh connects to the remote Kubernetes cluster using the kubeconfig file or any auth mechanism which we have in our class in our local setup in our local system there's one more why do you choose to create an operator uh so we so we basically work on the uh most of the Kubernetes or containerization applications and there should be I think there should be a proper way to automate such a process because since Kubernetes is expanding more and more we need to have a proper mechanism to have our custom application to be deployed in Kubernetes and we should have with the custom controller we have entire control in our hand we can actually see the each like we can actually control the lifecycle of the CR I think that is something um it's very important when we build a Kubernetes application so I think operator SDK provides a better scaffolding it has a great support and you can do a lot of things with these but few commands commands you get the API code generated controller code generated so I think that is the reason we choose to create operator yeah I mean um if I can elaborate on that uh suppose in case of any sharded database suppose I know that I wanted to sharding on my database I want certain parts of my database in one node and the other in another and that is something that I know and nobody else will come and shard my data that is something really niche and something that only I operate so I would make such a custom logic that I put you know that I shard database on particular nodes that I know where to uh in a set manner and certain certain manual exercises you know like I want to do SSH to a server after this event happens or something anything that you do manually and you would be knowing it because you operate it and something that you think you operate it on a daily basis and can be automated you should go forward with an operator I mean of course if you have a very good configuration file or very good uh secret or config map you have uh the configuration is set you can have stateful sets as well uh but then then it becomes a whole orchestra of services stateful sets uh pvc volumes but I want the whole configuration in one yaml and I want to make it really convenient for me that I want I want this database and this stateful set and everything the whole configuration the whole desired state is at one place it becomes really easy I guess that's it and if you all have any other questions you all can reach out to us on slack or twitter yeah thank you for joining


What scares me the most is that my votes will not be counted. What is something that scares you about what's happening or what might happen? Well, I'm not going to say scared because I don't believe in the politics of fear. I'm fearful that we have become so entrenched in our viewpoints now and that we're so divided and everything is so bipartisan. The fear the most is reaching a point where the people no longer have any influence in their politics, in their government, in their own lives. How we can feed into the cult of personality more than we can feed into the cult of reality. We've made a lot of progress in this country and I don't want to see it go backwards in my lifetime. I want to see it move forwards. I don't want to see gay marriage rights have to go away. I don't want to see more black people being killed. We're fighting for everybody's rights. Our rights to a true democracy, how it should be. Because right now we're heading towards an oligarchy and we don't want to go there. It truly scares me for my daughter's future. I don't think you can look at this election and feel like it doesn't matter. Every vote matters. Florida approved that in 2000. This matters. This is a wild ride of people and it's high stakes. It's real. It's not reality TV. That's the only other thing I'd say. This can feel like entertainment, but it's deadly serious. I'm not scared of Bill Clinton being first gentleman. I think he'll be a quality first gentleman. Frankly, I think he can't wait to be first gentleman. Only on uprocks!


Alright you guys, what is going on? Welcome back to another video. In today's video, I am going to take the suggestion from one of my all-time greatest subscribers for seeing, he sent me like, he sent me I think six different NFL jerseys this guy Brandon Kay, I'm gonna call you. He is a sergeant in the US Air Force and he has requested no reactions to any of the players that he sent me jerseys for. He said look up Texas A&M and Texas A&M is a university that I haven't looked at before. Believe it or not, he said look at their half-time show and look up their traditions. I feel like he sent me this package before Texas A&M had that crazy seven overtime thriller game. So I feel like if that had happened before he sent this package, he would have included it in his letter for me to look at it. So today we're going to look at three things over three different videos. The first one is, well it's probably two different actually. The first one is going to be Texas A&M's half-time show. The second one is going to be their traditions. And the third one is going to be that crazy high scoring overtime game. So I've got three videos coming up. This is the first one, Texas A&M's half-time show. I'm going to roll the intro and see you in a second. Here we are, Texas A&M. Texas A&M, I don't even know what that stands for. What does it stand for? What does Texas A&M stand for? Agricultural and Mechanical. Okay, so they offer engineering degrees and science degrees. I don't know. Alright guys, what are we going to do? Half-time show, let's do this.  I'm not going to use the green screen for this one. This is back to the old roots, back to the old style, just having a little box like this, so that's what we're going to do. Texas A&M, half-time show. Whoa, what do we got here? Best Texas A&M... Fison Texas, 2008 game. Fison Texas Aggie Band. What is fighting Texas Aggie Band? Oh my God, look at it. It's like an army going to war. Let me just find out what this is. What is the Texas A&M band called? The Fightin' Texas...  What is the Texas A&M band called? The Fightin' Texas Aggie Band, also known as the Noble Men of Kyle, or just the Aggie Band, is the official marching band of Texas A&M University, composed of over 400 men and women from the school's corpse of cadets. It is the largest military marching band in the world. Well, all right then. It was about time I looked at some marching bands. Let's do that right now. Is this going to be good enough quality? Hopefully. I have heard that the best, probably even the average ones, but definitely the best of these marching bands can practice from 20 to 30 hours per week, which is insane. We're about to see the result of all that practice right now. Let's go. Let's go. I'll tell you right, it is mesmerizing, isn't it? It's absolutely mesmerizing, looking at their feet. Looking at the, um, synchronicity? Synch, synchronization? How did they do that? Someone falls over. I'm sure someone has to stuff up sometime. I'm actually thinking, shit, just walking in this formation would be bad enough, but you've actually got to play your instrument as well. Hmm. I think it looks a lot easier than what it would be. And it doesn't look easy. Do it for my brain. It's impressive. And it'd be much more impressive in person, I can tell. Definitely. I wonder what formation that is. It's amazing to watch. What's this they're creating? Like, where are they going to go? Like, what is this pattern? I'll tell you one thing. For a perfectionist like myself, I am a bit of a perfectionist, even though it might not seem like it sometimes. This is very satisfying. Very, very satisfying to watch. Yeah. How do they, like, 400 people? 400 people in the one band? Would you practice, like, in different groups? Like, groups of, like, 50?  You never know where they're going to go. But they fit in somehow. This is tea for taxes. We've got one man going through the middle. You're going against the grain, buddy. What are you doing? No, we're all going back. See, how they can pass through each other like that, that's where it's really impressive to me.  All right, let's watch this one. Why not? The best Texas Aggie Band halftime ever. The New Mexico game in 2017. The big trombones. I was like, okay, how do they, if they're going to swing around like this, they're going to hit everyone.  Okay, I got it. With each other like that, that's insane. Look at it, across, okay? It'd be one of the guys sitting there saying, no, don't get it on your phone, just appreciate it. Use your eyes, don't use your phone. But nah, technology has transcended the generations finally. I really would because this is insane.  Let's find out. Let's just watch one guy. Okay, this guy here. He's behind him, behind him. Oh, they've got to move. They've got to move to the left and right. Or trumpet. No, trumpet, trombone. What's the bugle? Geez, I don't even know. Bandcamp, then trumpets down. Something else. We're not finished. We ain't finished. We're winning 48-7 at halftime. That's pretty good. So that's all the cadets, and we saw the band first, which is about 400. So if that's 400 in the band, that's got to be another 48-16. It's got to be 2,000 people there, surely. 2,000 cadets. What is the cadet program at Texas A&M? Why are cadets at Texas A&M? I don't actually, I don't. Student Military Organization at Texas A&M University. So they're going for the military, but they're studying at Texas. Is that right? To be honest, like, so much respect. That's what it is. It's respect. Everyone started running the one way to be an absolute riot. Well, there you go, guys. There you go. That was, hopefully, a good enough look at the fightin' Texas Aggie Band. The Aggie Band. The greatest halftime show in all of American football, apparently. I hope you enjoyed that one. The next video, we're going to look at the traditions. Some of the traditions. Now, I'm doing this in three different videos, and I know this one's taken about 20 minutes, but, you know, Brandon, the fellow who sent me the package that I got, I don't know if you saw that video, but it was amazing, and he pretty much just doubled my collection of NFL jerseys. So I want to say thank you. I'm going to treasure them. Hopefully, I'll be able to wear them to a game of those teams one day, but man, I'm going to have way too many, honestly. I don't know what I'm going to do with them all. But yeah, it's amazing. I hope you enjoyed it, Brandon. I hope everyone else did. This is my first ever look at a proper marching band, and it was Texas A&M, and I believe it was probably the best one to start with. So if you have enjoyed this video, hit that like button. If you want to subscribe, please do, and I'll see you in the next one. Peace out.


And welcome, this video, I'm going to try to do a bunch of little short videos on this, showing different aspects of it, but we're going to be looking at doing like horizontal line breaks in your shell script. So basically, let's say you have some text and you want a little divider, kind of like in HTML you have the horizontal line divider, we're going for something like that. So let's go ahead and see, of course, with echo you can put whatever you want and we can say echo and we can do a little line divide like that. We can do the same thing with printf. The thing is, we want it to be the entire width of our screen. Now, we could use printf like this, we could do something like printf and then we'll do percent in the number, we'll say 10s backslash n for a new line at the end there, and then if we do that, we don't see anything. Basically, it gave us like 10 spaces. So what we're going to do now is we're going to use a command like tr. We're going to say tr is used to transform one character into another. So here we're saying, okay, take the output of this, which is 10 spaces, and then replace all those spaces in this case with a dash. So we get 10 dashes. We can do whatever character we want. We can do dollar sign, so there we go. So how does that help us? Well, you know, that way we don't have to draw out everything in there, but it's not really, it's not as easy to remember. So don't worry about that right now. We're going to get into that in a little bit. Clear the screen here. We're going to look really quick at another program. I've done videos on this in the past before called TPUT. So TPUT, it is an external program. You do need it installed. It should be in your repositories for most distributions. But TPUT gives you a lot of options on basically what's going on in your shell and getting measurements of stuff and placing stuff certain places. But if we say TPUT space calls for columns, it's going to tell you how many columns or how many characters with your shell currently is. So in my particular case here, it's 111. If I decrease my font, we should get a higher number. And if I increase my font, we should get a lower number. With that, we can use the output of that command to get our screen with and use it within that printf function. So we can say printf, just as we did before. Then in here, we're going to say percent. And normally, we'd give it the number there. But we can use dollar sign parentheses to run a command and use the output of that command. In this case, TPUT columns. We're going to give spaces and then finish that off with a new line character. If we do that again, now it just printed spaces all the way across screen. You can't see them, but we are now going to use TR to transform those into dashes. Boom. So now, if I resize my screen and run that command again, it puts dashes to full width. I can make it really small and that still puts dashes all the way across the screen. So now what the width of my screen is, every time I run that command, it will put whatever characters I want across the screen. Whoops, of course I have to give it some sort of character. Plus sign, equal sign, dash, underscore. So we can have all these different type of characters being printed, regardless of whether my font's big, small, I'm in a window that's resized. When we run that function, it's going to go ahead and fill in those characters the width of the screen. That's it, we're going to do more on this coming up in the next video. I hope that you are enjoying this and hope you continue to watch this series. Thanks for watching and I hope that you have a great day.


So you clicked on this video because you want to know exactly how to get the perfect 6IV Masuda Ditto. This is basically the strategy to do it. Now, I'm not just someone who is posting this thumbnail. I actually have a 6IV Ditto that I have from a raid, and I'm going to show you exactly how to get this. Also, I have a foreign 6IV Ditto here as well, so you can see both of them. What's the point of a 6IV Ditto? 6IV Dittos, when given a destiny knot and they start to breed with another parent that is 6IV, guarantees you perfect 5IV... That's not perfect. They guarantee you 5IV Pokemon, and there's a 1 out of 32 chance that when you take two parents that are 6IV, you get a chance at having a 6IV baby. And that is something really cool, and it makes your Pokemon really powerful, and that's why people really want 6IV Dittos. Luckily, they added bottle caps in this game, so if you're not someone who cares about the breeding aspect, you can just slap bottle caps on there, but just know that bottle cap stats of IVs do not pass down onto babies, and it's a lot more simpler just to hatch babies that have it than run to the store every time and throw your money at bottle caps. But that's up to you. Now, what is a 6IV Masuda Ditto? In your classes at school, in biology class, Jacques mentions that if you hatch eggs with Pokemon that is from another language, you'll get a higher chance of getting a Shiny Pokemon. When Pokemon tells you something in the game that involves Shiny hunting, you should probably follow it because it really means they're telling you this is the hint. You should probably do this. Let's talk about Shiny odds when it comes to Masuda Method. To hatch a Shiny egg, it's a 1 out of 4,096 chance. With the Shiny charm and hatching the egg, it is now a 1 out of 2,048 chance. If you are using the Masuda method, aka using a different language Ditto or any different language Pokemon, but in this case of the video, you're talking about Ditto, it's going to be a 1 out of 683 chance. That's very OP because this is not even using a Shiny charm and you're already under 1,000. You're literally sitting at about 680 chance here. It's one of the most OP ones. Masuda method plus the Shiny charm for hatching an egg is 1 out of 512 chance. So without the Shiny charm, you're doing pretty good alone by just doing the Masuda method. Now having a 6 IV Ditto that can pass on insane stats, plus the ability with the Masuda method to produce a Shiny Pokemon, even without a Shiny charm, is why everyone wants one. It's absolutely OP. Here is a fun clip of my friend Salt Queen hatching a Pokemon by using the Masuda method. I just really want to get my Shiny starters first. So right now our priority is to get all 3 starters Shiny. We have Quaxly, we have Spigatitas, so all we need is this guy. Oh my god! Look how cool that is. But don't worry, I'm going to be showing you how to get the 6 IV Ditto. Keep going with me here. In order to get a 6 IV Ditto, you're going to have to unlock 6 star raids. How do you do this exactly? One, you have to beat the whole entire game. Two, you have to beat the post-game Ace Tournament. Three, you have to beat a couple of 5 star raid dens. You can do it on multiplayer, single player, it doesn't really matter. Usually teaming up online with people is a really good strat to do this. And then finally you'll be able to get a call from Jacques, you'll just ping your phone, mentioning that there are some dangerous terror raid dens that are appearing on the map with black crystals and that's pretty much a signal that you have unlocked 6 star raids in the game and you can be really happy about that. This is when the fun stuff starts because all 6 star raids will always guarantee you a 5 IV Pokemon. Yes, all 5 IV Pokemon. And you have a 1 out of 32 chance of getting a 6 IV Pokemon from those 6 star raids. Now 6 star raids show up on your game maps really once a day. And the best way to keep refreshing this is by simply hitting X on your menu. You don't have to close out the game. Just hit open to the menu, hit X, change the date on your Nintendo Switch, move up a day. And when you come back into the game, you'll see that all the raid dens have switched over. This pretty much means that you can go ahead and check the next 6 star raid den and find out what the Pokemon is. And this is pretty much what we call resetting in order to get a ditto raid to show up under 6 stars. And this is what an entire community is trying to do. But don't worry, hit that subscribe button. We're getting more into the information here and it's going to help you a lot. And being subscribed will always give you the opportunities to jump into community stuff. So continuing on. What to not do in a 6 star ditto raid? If you are the host of a 6 star ditto raid or any ditto raid, do not ever bring a strong powerful Pokemon to the fight.  I made this huge mistake. Yes, I'm taking the L for this one. But I brought my roaring moon paradox Pokemon into the fight and the ditto then transformed into the roaring moon paradox Pokemon. We don't have paradox Pokemon raids, but this is a very good clip on what it would probably look like if you were to fight a paradox Pokemon. Anyway, that roaring moon was able to completely wipe out the whole entire party and destroy us. And I also noticed when I went online to do random terror raids on from the menu of random posts on the switch. I noticed that when I selected a 6 star ditto raid or even 5 star ditto raid people were playing as very powerful Pokemon as the host for no reason making these ditto fights completely complicated.  You can bring a magic harp or just be ditto itself. The correct ditto raid strategy is for the host to bring a ditto or a very weak Pokemon. If you bring a ditto and you're the host, then all the dittos will just turn into ditto and the only thing it can do is hit transform while the rest of your team just barrages it. So the host really doesn't do anything here. It's up to your three teammates to destroy the ditto completely. He should be absolutely the easiest 6 star raids of your life because the dittos do nothing and at the end screen you'll finally be able to see what ditto you got. If you have the judge feature unlocked, you can see if it's best in all 6 stats or if it's just best in 5 stats with that missing one and that's basically going to help you discover what is a 5 IV ditto versus what is a 6 IV ditto.  Just don't try to hit a ditto with something super unaffective like it has to be super effective or some really high level decent damage. Just do that. Okay. Thank you. Now, let me tell you about the community ditto strategy. Yes, this involves an entire community. I told you it's already very difficult for one person to constantly reset their game by doing the day skip and waiting for the raid to show up as a ditto. So what if you took thousands of people and put them together in one server and everyone is doing the reset at the same time? That means we have increased all of our chances in order to find a 6 IV ditto in these 6 star ditto raids a lot more higher. And the simple strategy is once the host finds it, everyone is going to join the host. Once everyone starts to destroy these dittos and see what they are at the end when they check their jugs feature to see what they are if they're 5 IV or 6 IV, it is then reported to everyone what the ditto was whether it was a 5 IV or 6 IV and what it was missing exactly in its stats and then we completely move on to the next one. Now, if the host does happen to find a very good ditto, for example, a 6 IV one which is how I was really able to get one, the host is basically going to let three players in.  The host will just be a very weak Pokemon. The fight finishes in less than a minute and then what the host will do at the end is make sure to just not auto save before the fight. But after the fight is done, the host will then just close the game, reopen the game and re-invite everyone. It's kind of a little bit of a broken loop, but this allows the community to start farming the dittos. Now, something interesting is how do you get the Masuda ditto because you need something in an foreign language? There's two options for that. One, you can make another account in another language and by account, I mean just make a new save file. You don't have to make a whole Nintendo Switch profile. You just have to have the game open on another account in another language. You just select the language, Spanish, French, Italian, I don't know, whatever you want and play the game in that. That is going to cause any Pokemon you find to be a different language Pokemon. Therefore, anything you catch in that game is now considered Masuda if you bring it over to your game or if you're in English and you take an English Pokemon and bring it to that game. That is considered a Masuda method. Now, we had someone in our raids that joined us every single time who was catching them in the Spanish language. And after that, that person was able to trade me their Spanish ditto that they got from the raid. So the English ditto I had is exactly the same as the Spanish ditto I had except the Spanish ditto was just traded over by somebody else and it was the exact same ditto raid. So if there's anyone out there that does play in different languages or if you guys are brave enough to make a second account and throw in a different language just for the sake of raiding and helping out the community and helping farm and spreading around the Masudas, this is a great option to do. Shout out to Jet and shout out to Lau for showing off how we can get 6IV Masuda dittos using Discord. Now, if you want to get in on the action, all you have to do to get in on these 6IV ditto rages is just click on the link in the description for the Discord or click the pinned comment down below. This is the best way to get the dittos from a community perspective, but if it helped in any other ways, please hit that like button and you can probably figure it out solo or with a group of friends just using this method. I hope this helped. This ditto strategy is very important. Make sure to check out this video to see what you can do with your 6IV ditto when it comes to breeding.