Hello, my name is Hans van der Quest, lecturer at IHE Delft Institute for Water Education. In this video I'm going to explain how streams and catchments can be delineated from a digital elevation model using GIS. After this lecture you'll be able to define what is a catchment, to describe the generic GIS procedure to delineate streams and catchments from a digital elevation model, to explain how slopes are calculated in GIS from digital elevation models, to explain corrections that have to be made to use a DEM for hydrological applications, and to explain the Strahler order method. There is some confusion in the terminology of the word catchment in English. In British English the word catchment refers to the surface area for which all the water drains to one outlet. This is also called a drainage basin. The term watershed refers to the drainage divide, which is indicated with a red dotted line in the picture. In US English this is a bit different. Watershed refers to the area for which all the water drains to one outlet, and the red dotted line is called the drainage divide. A drainage basin, which is used in both British and US English, can be defined as an area of land where all the water that originates from different kinds of precipitation converges to one single outlet, and this can be another river, a bigger river, or it can be a lake, a reservoir, or a wetland, or the sea, or the ocean. Because a lot of GIS software is in US English you will often see the word watershed in the tools for what we would call catchments in British English. Here we see a catchment, this is the Vestra catchment in Belgium, and the size of a catchment depends much on the ruggedness of the area, the elevations. Here we exaggerated a bit the elevations, and so in British English we would call the area inside the red polygon the catchment, and we call the red line itself the watershed. So how do we derive streams and catchments from a digital elevation model using GIS? On this slide I'm going to show you the general workflow that's applicable to many GIS desktop software. In the next slide I'm going into detail of every step in the procedure. First we need to acquire the DEM tiles, then we need to mosaic the DEM tiles if our study area is spread over different tiles. We need to re-project the DEM, we need to subset, then if necessary interpolate the voids, we need to fill the sinks and remove the spikes, we need to burn in the stream network if we have a stream network available, we calculate the flow direction map, we derive the streams, define the outlet of the catchment and then derive the catchment, and in the end we can convert the dataset to the format that our hydrological model needs. The first step is to download the DEM, normally it comes in tiles and if we don't have access to local data because of the cost or the unavailability we can use global open access data as explained in another video. So most of the time we will use the SRTM 1 arc second global product, which is around 30 meters on the equator. There are also some other products, the SRTM Voidfield product, it's around 30 meters for the USA and 90 meters globally, and there's the experimental Aster global DEM or GDEM product which is also around 30 meters spatial resolution. You have to keep in mind that resolution is not the same as accuracy, these terms should not be confused. Not the higher the resolution, the higher the accuracy, it is a different concept so you can have a very high spatial resolution but then even the error per pixel can be also very high. And it's also not the case that you always need the highest resolution for each purpose. So for catchment modeling, generally the SRTM 1 arc second global product is fine, but if you want to plan a DEM in a river, you probably need very high spatial resolution. In both cases you need a good accuracy. You can download the SRTM DEM from the USGS Earth Explorer website or you can use a plugin in QGIS, the SRTM download plugin. Then usually your study area is not located nicely in the center of a tile but is spread over two or more tiles. So the next step is to mosaic the DEM tiles, which means that you simply merge them. The next step is to re-project the DEM. This is necessary because the global data sets are usually in the geographic coordinate system, latitude, longitude, and the units are in degrees. For DEM analysis we need to use a metric projection, so we need to re-project to another coordinate system. If we cannot use the local projection of a country because the area is too large, it's a trans-boundary catchment, then we can use another more global projection such as the UTM. Now I'm going to show you how slope is calculated and why it does matter that the units are in meters instead of degrees like we have in latitude-longitude coordinates. In this graph we see on the x-axis the distance and on the y-axis the elevation. The graph shows how the elevation changes with the distance. If we want to know the slope at this point, we know from mathematics that we have to draw the tangent, and then the slope can be calculated as delta z over delta x, and if we take the arc tangent then we have it in degrees. You can imagine with this equation if the x coordinates are in degrees and the z coordinates in meters, the software will still calculate the slope by applying this equation, but the result does not make sense. The z units need to be the same as the x and the y units. Now this is for our graph, but how do we calculate the slope in a raster? Therefore we need to use a so-called moving window because we need to calculate the slope to the surrounding pixels. So we consider the pixel in the middle of a 3x3 moving window and we assign the steepest slope to the pixel that we consider. Then we move the window to the next pixel and we calculate again the slopes to all the directions and we assign the steepest slope every time to the center pixel that we consider. So this is a focal operation that we discussed in another video. Now there's one problem with this method. You can think of what would happen to the first row and column and the last row and column. There's not enough information to calculate the slope in a kernel or in a window and that will result in no data at the borders. So if you want to calculate slopes of a study area, be sure that you make your study area a little bit larger than strictly your area of interest because otherwise you will lose the borders. The next step is to subset the DEM. Subsetting is a technical term for clipping. Remember that in the previous steps we mosaic the different tiles, but our study area is often not covering the whole mosaic, but only part of it. The consequence is that if we keep all the pixels of the mosaic in the calculations that the calculation times will be too long and sometimes even your computer will run out of memory. So it's better to subset the area to your study area, but it should also not be too small because then it will cut off the boundaries of your catchment in the delineation. So a good way is to understand a little bit the elevation differences in your area of interest to determine where the outlet is and to determine where the source areas are and where the divide could be by looking at the elevations. And then you make it a little bit larger to have a safety margin. The next step is to interpolate the voids. Voids are no data pixels in your DEM which can be a result of the acquisition procedure. DEM procedures don't handle well areas that are covered by snow or that are in the shade of other mountains and therefore we need to use the surrounding information to interpolate these areas. And this is then the result. We can never create the real data, but we can make it possible to continue with the data set after interpolation of the voids. The next step is to fill the sinks. We should not be confused with the voids. Voids are no data and sinks are depressions, artificial depressions in the landscape that are caused by the DEM creation process. So it's one or more cells which don't have a downstream cell around it. So the water is not able to escape to the outlet. And we can remove those using functionality in GIS software which is called fill sink algorithms. If the landscape contains real sinks such as lakes or other depressions they need to be added after the removal of the sinks and sinks are also called pits. Here we see a digital elevation model where water is trapped in the center cell which is much lower than the surrounding cells. So there is no possibility to drain towards the outlet. The fill sinks algorithm will either fill up those depressions or cut through.  And the outlet is downstream of the flow direction. And the algorithm can either increase the surface of the depression or decrease the surface after the depression so the water is routed to the outlet. Use its necessary to burn in the stream network to force the water to follow the real rivers. This can only be done of course when the river network layer exists. The next step is to calculate the flow direction. Most often we use the D8 algorithm. Similar to the slope algorithm it will look in a 3 by 3 window and will calculate the slope to all the directions around the cell that we consider. And instead of assigning the slope it will assign the direction of the steepest slope. An alternative is the D-infinite algorithm which uses not the eight surrounding cells but it will use continuous directions. Of course that is more calculation intensive and it will not always result in better results. Let's have a closer look how to calculate the flow directions using the D8 algorithm. On the left side we see the elevations. Each pixel has the elevation in meters and we are looking at the center cell and we need the information of the surrounding cells because it's a focal operation like with the slope calculation. The spatial resolution is 30 meters so the pixels are 30 by 30 meters. Now the question is which direction are we going to assign to the center pixel. We know that we can calculate the slope by evaluating the surrounding pixels of the center pixel by calculating the delta z over delta x, the drop divided by the distance. And for the D8 algorithm we assign then the direction of the steepest slope. So you need to look at this and select one of the direction values that are displayed on the right side of this slide. Let's do the calculation. If you would consider the cell to the south, so direction number 4, the calculation will be 67 minus 52 divided by the distance 30 equals 0.5. If you would consider the diagonal, the drop will be 67 minus 48 but the distance is not anymore 30 because we have to apply Pythagoras. The diagonal distance is longer than horizontal or vertical distance therefore we use 30 square root 2 and this results in 0.45. So the correct answer of the flow direction was number 4, it's the direction to the south. So we do that for every cell. And then we can link the lines that flow in the same direction and in this way we can construct the stream network. The map on the right side is called the stream link map. Now the stream links are for every pixel but not every pixel contributes to a river. Not all water that falls on a pixel becomes a river so we have two methods to derive the stream. We can look at the flow accumulation or we can look at the strahler order. Let's have a closer look at the flow accumulation. In this map we see the amount of precipitation in each cell. We can superimpose the stream link that has been derived in the previous step. The stream link determines based on the flow direction how the amount of precipitation is moving through the catchment. When the precipitation follows the stream link towards the outlet the flow is accumulating and we can define a threshold above which we consider the accumulated flow as being part of a river. Let's assume that we consider 10 units as the threshold in this case. So that means that everything that accumulates larger than 10 is considered a river and this is the way that the stream network can be derived. To determine this threshold value is a bit difficult and it needs a bit of trial and error. There is no rule of thumb and it depends on other properties of your catchment. So here on the left we see the example if we have 500 units as a threshold and on the right side we see 1000. So we see if we make the threshold lower it results in more tributaries and subcatchments than if we make it higher. The second method to derive streams is to use the strahler order. This method orders the reaches and we can set the threshold for which we consider it as a stream. It starts with the smallest ones and they are ordered with number one. When two of the same order join it increases the order so two of one join into order two. When two of order two join it becomes order three. However, when a lower order joins a higher order the order is not changed so here it remains three. Then two of order three become four and when we have order one joining again it stays order four. Based on this ordering we can determine a threshold value for which we consider the reaches as being part of a river. For example all the orders larger than three. To determine this threshold we need to do a calibration. We can use a satellite image or an existing map and see which threshold value fits best with the knowledge we have of the area. Of course this will not always be a perfect fit because we filled the DEM which makes the DEM a model and there can be a lot of human influences such as mining or urbanization or channels. The next step is to define the outflow point of our catchment. We need to define this on the delineated river so we cannot use a background map where a river has been defined in a different way because our DEM and the delineated streams are now part of a model. And if we don't define the outlet on the model it will not result in the catchment. Now what can we define as an outlet that is a location in a river where we have discharge measurements or the outlet of a tributary. So here we define the red cell as the outlet and the algorithm can then define the catchment based on the flow direction, the stream link. So the blue area is the catchment area and orange the drainage divide and all the water that falls within that area drains towards the outlet to the red cell. So you've just learned the general procedure for catchment and stream delineation which consists of downloading the DEM tiles to Mosa Icta tiles. If your study area is spread over multiple tiles then we project the DEM to subset the DEM, interpolate the voids if necessary, fill the things and remove the spikes, burn the stream network if you find it necessary and if you have a stream network available, calculate the flow direction map, derive the streams, define the outflow point and then derive the catchment. And in the end this normally feeds into your model so it needs to be converted to your model or your tool for which you want to use this data. There are some limitations to this method. The methods are based on elevation differences. So in areas that are flat this does not work. Also in areas where there's no gravity, natural gravity flow but are more human controlled this does not work. So for the Netherlands this doesn't work because we don't have much elevation difference and also the flow is very much human controlled in a large part of the country where we pump up the water to keep us dry. So keep that in mind when you use this method. Eventually you will use this data for hydrological modeling together with other GIS data. So the catchment delineation procedure provides very important inputs to catchment models. The delineation of the study area, the streams and the flow direction can be used.


Okay, so the next talk is about SQL Alchemy by Yash Merotra Okay, so first of all, I'm gonna start with a show of hands How many of you work with relational databases? Okay, that's awfully lot Okay, and out of those how many of you use Django and am I right to assume that you use the Django RM? I think I'm anybody who doesn't anybody who has heard of SQL Alchemy by the way, okay, that's cool So anyway for those who don't know It's a no RM. I'm Yash Merotra. I'm a student open source evangelist So today, I'm just gonna tell you about a little bit about SQL Alchemy How does it work? Why many people find it better than the Django RM and Why many people consider the best RM out there? So what is a SQL Alchemy? It's basically a toolkit and I know RM it provide this is basically from the website. So It doesn't really you can read it But what it basically means is if you use a relational database and you're writing Roy's hill queries. It's time for a change It is more secure it you don't have to manually escape characters to prevent injections and it's more pythonic and Orem is an object relational matter mapper. It basically creates a You can basically create a DDL in your code like a class and then the table name and then you can write the columns in your class I'll show you the code snippets later How does it work and So it extra basically one thing which SQL Alchemy does better than Django is it Excesses more layers of the Django of the SQL SQL compared to Django I think Django RM just accesses the top layer and you can't do many customizable many you can't customize many things with it But with SQL Alchemy you get a bit more power.  I think many of you must have used a post-save signal and Has anybody tried to overwrite the safe method in Django RM? Yeah, so some people have so it's a good way and many people and in stagal You'll find it the first answer, but I don't consider it very pythonic So SQL Alchemy has event listeners. You can add event listeners for a table pre-insert after insert It's works like triggers so Yeah, that's more it it's more also it's Syntax is consistent like an SQL Alchemy if you are doing a query You just write session dot query than the table name and then you write filter Like say you have to see which persons Get a list of people whose age is greater than 30. So you can write this filter user dot age greater than equal to 30 Something like that and it's similar everywhere But in Django for that you have to write like underscore underscore gte or underscore underscore gte And if you're working with multiple foreign keys, it's like underscore underscore Then the table name underscore underscore. So it really is Crumbles it doesn't look nice So if you are interested in SQL Alchemy, it's very simple to start just pip install SQL Alchemy and Okay, so the first imports you can leave that This engine part is basically you it works with by the way, it works with all the RDS oracle SQL light Postgres mysql Okay, and now I'm just going to give you an example here like a class user And it has a table name user three columns id name email and when I do base dot meta dot create all engine so imagine I have multiple classes like this and This command basically creates all the tables in whatever in whatever database you specify here So it's very clean and it's much more easy to handle This is the SQL Alchemy API say I have created three users and I added them Actually, this was going to be a livedom of the code but due to some problem with HDMI port I couldn't give it so querying is simply easy session dot query table name and If you want to do something specific you can session dot query filter and double equal to you can search by email So for update basically what I did is if I need to update my name to my full name So I took that object I changed its name and then I added it to the session and I committed it so it's pretty simple and If you are working with Django RM you can shift it shift to SQL Alchemy There's a tool called algemy ALT JEM Y if you want it and then Similarly, you can delete Delete with the session and basically you can do a lot of things so I Don't know how many of you will try it, but I do suggest like Just give SQL Alchemy a try for those who do complex SQL operations Inner joints lots of outer joints or who may be facing some scaling problems due to relational databases In their Django websites. I highly suggest them to try SQL Alchemy and that's it. Thank you any questions for me Okay, thank you


Hi everyone Sean with jaspys case breaks comm here doing 2020 absolute baseball blaster one box break random team number 10 Thanks to my nice little drawing skills there the way this works 30 spots everyone gets a random team at nlb no vet commons ship at the end of the break will randomize all 30 customers names number One through six each win a spot in the baseball mixer. So There's only one more filler in the store now pack 11 or Box 11 that will sell out the mixer. So get your spots Here is the list of customers from Brian Hayes down to Jason wainer last spot mojo times five and Diamondbacks down to the Washington Nationals dice roll here. This is just the dice roll for the break and randomizer for the break itself We will do a separate dice form randomizer at the end to give away those six spots six and a five eleven times on the names 11 final time Ryan down to Matt 11 times there and 11 times on the dice Now 11 times again on the dice and on the teams From the Yankees down to the Diamondbacks 11 times and 11 times So I'm not gonna read through everyone on the list But we'll do some highlights and make sure it's all on screen So where are white socks? Lubab Jack Vos Magin Dodgers Gavin Luxe Ryan Carlson blue jays bobechette Matt Lieber There you go some Highlights there So let's print and rip There is our blaster So get one auto or men card for box Kettle Marta foil for the Diamondbacks Matt Lieber Beiber and a Clevenger for the Indians Colin Smith Ari Stettis Aquino nice two-color patch on top dual relic 85 out of 99 for the Reds Matt Lieber Jimmy Fox for the Red Sox Jack Flaherty for the Cardinals and there you go So that's the break but now let's give away those spots Like we said top six names six spots given away So here's the original list from Brian back down to Jason new dice roll Three and a six nine times good luck ninth and final time So nine times on the randomizer nine times on the dice and from spots seven down to 30 thank you guys very much for getting on this and Hopefully I can do better for you next time. There is one more filler in the store So one more chance to get in at a fraction of the cost, but congratulations Ryan Carlson Ryan Carlson Matt Medlin Colin Smith Matt Lieber and Ryan Carlson Those six names are gonna be added to the list They just got spots in the baseball mixer. Hopefully coming up later on tonight That was 2020 absolute baseball blaster one box break random team number 10 from jaspys case breaks calm I'm Sean. Thanks for hanging out and I'll see you next time


Welcome everyone. I imagine we'll have a few folks starting to trickle over from the main stage to this session, so we'll get going here in just a moment. I hope you all have had the opportunity to enjoy the morning and afternoon depending on what times on your end. Sessions and then the great session just now, the great keynote by Burr Sutter. Really interesting talk from Burr as always. I would like to welcome you to our next session in the track today, the Intelligent Applications, The Red Hat Way. My name is Mike Ward and I'll be your moderator for this session. It's my pleasure to introduce our speaker for today, Marion Fentes, who is a Principal Product Manager for OpenShift AI. She's been working with customers on automation projects and intelligent applications and previously held positions of solution architect for customers and partners in North America. First, a few comments on logistics before we get started. If you have questions during the sessions, please submit them into the comments area and we'll take those and address those as they go along. So we'll be monitoring for your questions and take those as they come up. If we're not able to address your question for some reason during the session, we'll make sure to log that and take a point to follow up with you as long as we have your contact information and can do so. Also, a recording of this session and all the other sessions throughout today's event will be available on the Red Hat Developer YouTube channel. We'll take it probably a couple days or so to get those uploaded and posted into YouTube, but you'll certainly have the opportunity and benefit to go back and watch all the great information being shared today. We also then as a reminder, of course, just coming out of the keynote session in the live chat, but as a reminder, as you stay through us at the end of this block, we welcome you back to the main stage for a general open Q&A session if you have questions to chat with Red Headers. So with that, let me turn it over to Miriam and we'll get going. Thanks so much. Thank you very much, Mike. And thank you everybody for watching this session. And the topic for today is how to build applications powered by AI, the Red Hat way. So what we will discuss is, you know, what are some of the basic principles when you are building AI powered applications. And we will start with just a real quick level setting explanation of what is an intelligent application. An intelligent application is somewhere, it's an application where part of the code was written by a human in any language after liking. And using the platforms and the tools that they already been using since the beginning of the days. And then the other part, it's called that it was created and put into a model trained with data. So there are two, this intelligence that you put in the model is what makes now the applications intelligent. What are some of the examples of these type of applications? Well, recommendation engines, virtual assistants. It's very useful in things like fraud detection, money laundering, and any type of activity where you can leverage large amounts of data to discover patterns and to learn from past experience. So pattern detection, text analysis, summarization, now with chat GPT and all of these LLMs, the use of AI into everyday and everyday activities becoming very popular. But what are some of the challenges that you get when you are trying to build this type of applications? This is a forum for developers. I'm sure that you are eager to learn. Well, I already developed application. What else do I need to develop an intelligent application? So things are a little bit different on this room. The first one is that there are different personas involved on this development cycle. So you have on one side the application developer and on the other side, you don't have a developer. You have a data scientist. So each one of these different personas have their own tools and they do very different things. The data scientist mainly works with data that needs to be sanitized, that needs to be gathered, that needs to be plugged in, and then once they feel confident, they use that data to conduct experiments to be able to produce a model that's trained with a certain level of confidence. The application developer, well, they have requirements, they code them, they test them. And once they are confident that the requirement was met, well, then you deploy them and then you operate and monitor. From here, we can see that one of the main differences is that the path, even if an application developer is using agile methodologies or they are iterating over their code is more like a straightforward path because you have a requirement and you have multiple ways to meet it, but you choose one, you implement it and that's it. For a data scientist, it's really a scientific process where you need to experiment to find the optimal answer. You never have the right one. And then the next challenge is that it's not only two personas, sometimes there are more different streams, there are different streams of work with even more personas. So when you are building an intelligent application, it's more of a multidisciplinary team that you need. So maybe you need a data engineer, the other two that you already had, data scientist, application developer, and again, each one of these personas have their own tools and their own environments that they work in. But at the end, they need to produce just one output, the intelligent application. And to add a little bit more complexity, well, you have a myriad of tools to mix and match to solve or to do each one of the tasks that we saw for the different personas. And I mean, all of these tools have different degrees of maturity. They are open source, some are closer, some are from vendors. So there is a lot of choice out there. OpenShift.ai is a platform that gives you all the tools to manage the end-to-end lifecycle, but we do it in a pluggable way. So if there is a tool that you already use or that you prefer using, you can just plug it into the platform to have a cohesive way and a cohesive platform for managing all of the application lifecycle. And another difference between regular development and intelligent application development is that, well, there are more variables.  That's where you... Those are the things that you need to version. You may be using things like source control repository. With an intelligent application, you have more variables. So you have the data that you use to train your model. You have the code of the model itself. You have the application code. You have the model that it's now trained. You have the configuration of the application. So all of these things are more and more variables that you need to handle. So when something goes wrong, like when you find a bug, you need to control each one of them to know what change in what produce that bug. And then the other thing that is also very different is that with a regular application, if you have bugs when you go into production, it's because that bug was there from the beginning. You didn't test properly or whatever happened that bug made it to production and then you know that you have to figure out a way to fix it and that's it. With intelligent application, the model is only as good as the data that you use to train it. And the data comes from the real world and the real world is not a static, so it's constantly changing. So that means that the premises that you use to train your model are constantly changing too. So you know that at some point, sometime, your model is no longer going to be valid or it's going to be defective. So you will have to do the whole process again. So if with regular applications, it's important to have the ability and the agility to deploy fast, to fail fast and to iterate over rapidly based on the feedback you receive. Well, an intelligent application is even more important because you know that they are going to fail because you know that the environment and the data that is trained on it's constantly changing. So having that process down, it's super important to produce some value. So to help with that and to build that muscle memory of constantly deploying applications, we're going to see what are the principles for ML DevOps or MLOps. But before I continue, I would like to make a pause to see if there are any comments or questions. Okay, perfect. So, sorry. So, okay, we'll see what are those principles. The first one is automate. If you want to be able to measure the progress that you are making, you have to be able to measure each one of those steps on that process. So when you're building models or when you're building applications that use models, you have different activities that you need to do to get an end product. The first one is gather and prepare data and develop the model. These two things that are part of training and happen before you actually deploy the model and the model starts serving and making inference, those are called inner loop. And then you have the last two steps, which is deploy the model into an application and monitor and management of that model once it's deployed into the application out there. And that is called an outer loop. All of these is sustained or supported by a hybrid or multi-cloud platform where you can do computer acceleration depending on the model that you are using or the algorithms that you're using. You may need something like GPUs if you are doing some sort of computer vision or neural networks. So all of that is our services that support all of this process. But the important thing is that all of these steps need to be automated and they need to be measurable. The second step is that you need to have control over all of the variables of your model at all times. So to be able to reproduce the results, you have to track and version the code, training data, the artifacts that you produce and not only the artifacts itself but the lineage, which means how do those artifacts change while you traverse this continuum? And remember, with intelligent applications, this continuum is really a continuum. So you are never done developing the application. There are a lot of places where I've seen that there are apps that even the developers don't even have the source code anymore because it's working so well that people are left and there are static applications. Well, that will never happen with here when you have a model and an intelligent app. So you have to be able to accurately tell what happened with each one of these artifacts that you are generating. And to be able to do that, there is a very nice solution that we can find in Open Data Hub or Rodes, the product, which is a pipeline that will help you automate and integrate all of the different components of the model lifecycle because as we remember, some of these activities are done by different personas. So the data preparation could be a data engineer and they can be using tools like feature stores or data curation tooling to train the model. It's a data scientist, so he works in Jupyter notebooks. So to be able to connect all of that into one cohesive process that is repeatable, we use Data Science Pipelines. Red Hat OpenShift Data Science Pipelines, they are based on Kubeflow, which is an open source project that includes a lot of components. So just be aware that right now we are not using all of the available components to do a lot of other things, not just the orchestration, but we are mainly using the Kubeflow Pipelines and the Pipeline Storage. So in Red Hat, we are using a version that is different from the Kubeflow open source. We are not using ArgoCity for the underlying workflow engine. We are using Tecton because we support Tecton, so you will have a fully supported platform to automate the process of building applications. And the main pieces of this solution for the principles are well. First of all, you have IUI to access all of your pipelines. So here you can see the process that you follow to train a model and to deploy that model and to put it into production. And you can see it graphically and you can see all of the information associated with it. So this is your automation engine for that end-to-end lifecycle. And then the other piece that you have is the data and metadata storage. And here it's very important because as you experiment and you do all of these different runs of the process to continuously enhance the performance of the model and get better results, all of that is tracked and is stored in this metadata storage. Afterwards, let's say that you are training a model to identify if a person is a man or a woman based on his or her personal information. And this is a real-life scenario. So in this model, when someone had the title of doctor before the name, the model assumed immediately that that person was a man because he was biased against women and the degree of education that they have. So when you have a problem like that, how can you go back and say, okay, I use this data set to train models? How do I know now which models were trained with a bias in it? So for OpenShift Data Science Pipelines, both the data set and the pipeline, the execution and the model, these are all artifacts. And you can clearly see all of the different relationships between them. So you can't see, for example, which models were trained using this artifact, which is this data set. And that will leave you to know exactly what models are biased and that you need to retrain or regroup. So if you are a data scientist that is producing hundreds of models and all of the sudden you see that one of them is biased, you can go back here and look at the lineage of that model and remember what was the process that you followed by looking at it graphically. So what are some of the data that you store to track the lineage of your model? Well, as you remember, we saw that intelligent applications have a lot of variables. And then here we can see that for every workspace, which is your sandbox, you have runs. A run is an execution of your pipeline where you are training and deploying your model. And then each run is associated with an experiment because maybe you're experimenting with a certain algorithm and you have to rerun it several times until you get the optimal performance. So out of all of these preconditions, the data that you store is the description of the data set. So what happened with the data? What was the name? Who was the owner? All of the information about the model, the description, the name, the version, the type, the training framework, the hyperparameters that you use in case you change them and any specialized labels. And then you also have the metrics. So what was the result? What was your confusion matrix? Where were the values? What was the model ID? So all of these will help you track what happened to the model and to the execution. And it will make your life easier as a data scientist. Another good thing of data science pipelines is that, well, it's really a workflow for data scientists and there are a lot of other tools to do workflows. Tecton is one of them and that's something that's supported by Red Hat. So why do you need something on top of Tecton? And the response is because if you use Red Hat data science pipelines, you don't have to deal with all of the codes of Tecton. You don't have to be an expert in YAML to define each one of these steps. You don't have to understand the insight of custom resources in Kubernetes. You don't have to containerize each one of these steps because thanks to the pipeline server, each one of these steps spins up a container that will run this particular step of your process of training a model. So you don't have to worry about any of that. The only thing that you have to define is drag and drop each one of the steps. If you're a data scientist, you can do it inside of Jupyter notebooks using Python. And once you have the Python definition of your pipeline, there is something called Kubeflow SDK that we saw here. This is the SDK, which you can just drop there the Python code that defines your pipeline. And this will give you the definition in YAML that then the pipeline server will ingest to do your runs. There are other options. So there are extensions like Lyra, if you want to work only with Jupyter notebooks. And there are also SDKs for things like Java and other languages. So it gives a lot of flexibility to meet the developer where he or she is. This is, again, the pipeline is defined in YAML.  You just stay with the tools that you know. And also, the workflows are very portable. So you can spin up a Jupyter notebook in your own laptop and do runs and experiments locally. And then when you're sure that everything is working, then you can upload that exact same pipeline into our cluster and OpenShift running in any cloud provider and take advantage of the inside GPUs, distributed training, and containers, the scalability of the cloud providers. So without having to redo all of the work that you have done locally. So what are some of the benefits of applying these two principles, automating and tracing? Well, you will have reproducible and reliable software release. So your data scientist and the rest of the team won't dread having to iterate and experiment. You can have software release at any time. So it's very important that you can deliver production great models and software at any time because they don't bring any value to the business until they are actually deployed. And especially for any application, it's very important to have short adaptation cycles, but for intelligent applications even more because the reality and the data that depicts that reality changes very fast. So you need to be able to adapt very fast to some of these changes. So if you want to try Red Hat OpenShift Data Science Pipelines, you just need an OpenShift cluster, the Red Hat Data Science Operator, the Pipelines Operator. You need a project to define your pipelines and then just configure your pipeline server, mainly the storage where we saw that you will keep track of all of the different variables and the lineage. And that's it. Then you create a new pipeline. So with that, I'm going to show you real fast how the pipeline, how they look like. Okay, just give me one second. So here we are. And this is Red Hat OpenShift Data Science. If we go to Pipelines, we can see that we have to the best pipeline ever in a new pipeline. If we go to the best pipeline ever, we can see the different steps. This is just a very dummy pipeline, but if you click on each one of the steps, you can see the arguments because that's also important. Remember that each one of these steps may be a container. So the pipeline server also takes care of passing arguments from one container to another. For example, the result of this execution could be the input for the next step on the process. The image that you use, so you can use different images for different steps again, because this is a multi-disciplinary process. And then here you can see the YAML that configures those pipelines if you want, or if you feel more confident with the YAML. Here are the runs. So the runs are the actual executions of your pipeline. You have two types of runs, so you can schedule one. Let's say if you know that you will have more compute resources at a certain time of the day, let's say midnight, you can schedule your pipelines to run that day at that time, or you can just trigger some ad hoc runs. So here you have track of all of the experiments and all the runs that you have done. And as you see, each run is configured on a default experiment. If you go into the runs, you see that everything went well. You can see the details, the output of the run. And you can clone it, delete it, or stop it. So with that, I hope that you guys try the pipelines and automate the process of delivering intelligent applications. Thank you. Great. Well, thanks, Miriam, for that great presentation. We hope you all enjoyed this session, and as a reminder, this will be available on our YouTube channel in probably a few days if you'd like to recap this or again to catch other sessions that you weren't able to that happened earlier or later throughout the day. Certainly be sure to hang out here for our next session, optimizing Apache Kafka with cruise control. We're going to do a quick disconnect and reconnect to swap our speakers and go into the next session here in about three minutes at the top of the hour. So if you're not able to stay with us, we hope you have a great day. Again, Miriam, thanks for your time and presentation today. Thanks, everybody. Bye.


Hey everybody, this is Brian and I am back from summer vacation. I had a great summer, but it's simply time to start recording again. So this video is going to pick up where the series left off, but we're going to jump right into the scary deep end. We're going to talk about the redding. So this video is an introduction to threading. If you already understand the concept of threads and threading, use the buffer bar below to skip ahead to the section you want to see. We're going to cover what is a thread, why do we use threads, how Qt uses threads, and we're going to wrap this up with a very simple threaded example. I have to stress it's going to be a simple threaded example because threading can get very complex and the next few videos we're going to dive into that complexity. Let's take a look. So what are threads? Well, prepare to be very, very confused because this is computer science 101. If you are a newbie computer person or a newbie programmer, you may have some questions. We're going to turn to Wikipedia and we're going to look at the simple thread in terms of computing. You can read this very straightforward, at least to me it is, document, but you're still going to be very confused. So fortunately they have this graphic and well, this is also confusing, but let's break it down here. So you have a program. This is what we as developers create, the actual program. Now this is the binary that exists on the hard drive. When the operating system runs your program, it creates an instance of it in memory. So what does that really mean? Well, your program can be created and run in memory multiple times. We call those processes. So each process is a copy of your program. Now each process or each copy of your program can have multiple threads and this is really what we're talking about in these videos. What is a thread? Well, you notice these numbers. Number one, two, three, four. Well, you have instructions one, two, three, four. When you see the term instruction, think of that as like lines or blocks of code. So for example, you could run instruction one, instruction two, three and four on different threads one, two, three and four. Now these don't line up one for one. That's the confusing part. Just because you have instruction two doesn't mean it's on thread number two. The operating system really determines where things run. So to rewind, you have a program. It is on the disk. It gets loaded into a RAM as a process. That process will talk to the scheduler usually in the form of creating what's called a thread class, which talks to the actual operating system. And what the scheduler here does is it says, oh, you want to run these threads, these threads line up with some instructions, I'll figure out the best place for them in the CPU and run them for you. Meaning we have very little control over this part right here. All we do as a developer is we create the instructions, decide how we want them threaded and then ask the scheduler, pretty please, thread them for us. Now, if all of that seemed overly simple, there is a lot of complexity to threads that we're going to talk about in future videos. You're going to hear some very confusing terms like semaphores, mutexes, mutex lockers, things like that. Don't worry about those yet. We're going to cover those in future videos. At its core, really what we're talking about is taking a block of code, running it through the scheduler and putting it on the CPU. Now, modern CPUs are very, very powerful. I'll give you an example. I'm going to look at system monitor, I'm on Linux, but virtually every operating system has something like this. I have one physical CPU and that CPU has eight cores. So I can have eight instructions running simultaneously. Actually I can have many more than that based off how the scheduler works. Remember, this happens very, very quickly. So even if I only had just this one CPU, the scheduler will say run instruction one, stop it and run instruction two, but it does it so fast it appears they're running at the same time. This is incredibly powerful and honestly, the more cores you have and the better performing OS you have, the faster your program is going to run. One question you may be asking is why even use threads? This sounds super, super complicated and it can be, to be brutally honest, why even bother with it? Well, the answer is very simple. A process with two threads of execution running on one processor. This little image here is beautiful because you have a process in instance of your application with multiple threads running at the same time, meaning you can do more than one thing at a time. You ever have to do that like in life at school or at a job where you have to do multiple things at once like type and talk on the phone? That's exactly what we're telling our process to do. Let's take a look here. We have a physical CPU and we have some instruction, a piece of code here. Now, typically what we've done and let's just make a couple of these is we've got different instructions, instruction one, two and three. Now, these are just blocks of code or functions, whatever you want. They would just go in order, one, then two, then three, very, very slow, right? Because two's not going to run until one's done and three's not going to run until one and two are done, so it takes time to get there. Yeah, no, we don't have time for any of that nonsense. We're in threading lands, so what we're going to do here is we're going to thread these and here is our CPU. Now inside, I shouldn't say inside, but also including this is the scheduler, so we're not talking directly to the hardware, we're talking to the operating system, so let's just say OS slash CPU. And then we're going to say, hey, let's put it here, we're going to run this one, we're going to run this one, and we're going to run this one. Pretty cool, right? So now we can run multiple things at the same time. Now, if you remember, you may have more than one CPU. For example, I have one physical CPU, but I have eight cores. Well, let's just take this and what we're going to do here is just represent a core. Let's shrink him down. This is where the complexity gets a little bit weird, so the operating system is going to figure out the best place for these. We don't really get to say, you're not going to say run this on core too, it just simply doesn't work that way. You just say, I want to run some instructions, I want them multi-threaded, the operating system figures out where they need to go, and it puts it on, you guessed it, the right area here. So this is a very high level of what we're talking about. You can do multiple things at once. The operating system is powerful enough to talk to the underlying hardware and figure out how to do those multiple things at once. The end result is your program can be multiple times faster, and I am not even joking. I have seen programs, once you switch to a threaded model, will go from, say, one to two minutes down to a second, or they'll go from an hour down to maybe ten seconds. I mean, literally you can have that kind of speed boost if you design your applications appropriately. As you might have guessed, this can get very confusing very quickly. CUTE, however, makes this very, very simple. So we're going to take this, and we're going to modify it a bit. We have multiple instructions inside of our application, and then I'm going to take this, and we're going to say, this is CUTE, and what CUTE does is it allows us to take all of this code, put it right through CUTE, and we're going to use a class called CUTE THREAD. Now CUTE THREAD is a bit mysterious. What does CUTE THREAD really do? Well, you can take different classes like CAT, DOG, BIRD, that have all sets of instructions in them, and say, I want to move this to the THREAD. So we're going to take him, and we're going to grab him, and say, move that right to a THREAD, and then the THREAD, and talk to the operating system and the scheduler. Now, unfortunately, the confusing bit is you're going to think, I am going to move all these two, but when you do that, they all run on the same THREAD, so you don't want to add them all to the same THREAD. Typically, what you would do is have multiple THREADs, something like this, so you'd say, I want CAT and BIRD to be on different THREADs than the DOG, and then they would, of course, under the hood, talk to the operating system and the CPU. So this is really what we're going to be doing, and then this example that we're about to do, we're just going to take one class and move it to a THREAD, and then run it in a multi-threaded fashion, so you can see how it actually flows. Just bear in mind that if you don't do it like this, like if you were to just get rid of these, do something like this, what's going to happen? Well, let's say you have a CAT doing, well, what CATs do, and dogs doing what dogs do, and birds doing what they do, they're all going to run one at a time on the same THREAD, so you want to avoid this type of situation here. Let's take a look at a very simple example. Again, I have to stress, this is the simplest example I could probably think of, so I'm going to start this from scratch, but in future videos, we're all going to start with a program that's open and ready. So I'm going to make a console application, and let's call this cute six episode 21. Next, when you see, make is the build system, and whatever kit you have, I realize there's a newer one out, I haven't installed it yet, doesn't really matter. There's not a lot of changes. All right, let's go ahead and there'll be a little bit of copy and paste in this video, but I'm going to plop in some notes real quick. All right, so we're going to create a QTHREAD, we're going to move an instance of a class to it, and it cannot have a parent. It's very important that if you remember anything from this video, when you move a class to a thread, it cannot have a parent. There's a reason for that.  This is going to be a Q object, so it has signals and slots and all that goodness baked right into it. Next, and finish. Now we need to, of course, update CMake, and because I'm coming back from summer vacation, I'm a bit rusty on the typing, so forgive any misspellings. All right, now we've got our worker here. We're going to do two things right up front. We're going to put in QTHREAD and QTOBUG, and QTHREAD is built right into QtCore, so don't worry about that, but what QTHREAD does is it provides a platform-independent way to manage threads. Yes, I am aware that C++, specific versions of it, have this baked into it, but we're talking about Qt and how Qt does threading. You can use the standard library thread model if you want, but obviously in this video, we're going to cover the Qt threads. So we've got our worker, and we're going to do two very specific things here. We're going to make a deconstructor and a public slot called run. The premise here is when we move our object to the thread, it's not running yet, we have to tell it to run, but the worker won't magically know when the thread starts, so we're going to connect these two with signals and slots. When the thread starts, it's going to call our run slot, so let's flesh these out real quick. So inside the worker, this becomes very, very simple, and I'm going to just copy and paste a little snippet here. So we're going to say Q info, and we're going to print out this current object, and we're saying constructed, and then this little bit of magic here, Q thread, and we want to get the current thread, so we're just going to print that out. Under the hood, the current thread is just simply a Q thread, which is also a Q object, so it has signals and slots baked right into it. And we're going to say deconstructed. Now, what we're going to do later on is we're going to name that thread, so you can see on the screen the difference between the main thread and the worker thread that we're about to create. Now, in this run function, when this thread actually runs, we're going to do something a little different. I'm going to say four and I, and let's just go up to 10, and we're going to go ahead and increment I, very simple little loop here. Now I'm going to just grab this to save a smidge of typing, and we're going to say this working, and then we want the integer here. So let's go ahead and say, we're going to convert that I into a Q string, and then we're going to print out the current thread. We can, if we want to get rid of that right there. So very simply, just going to say working, and then the number that we're on, and then our current thread that we're running on. Notice I said of the current thread that we're running on, because we could run this on any thread we felt like. Now I want to slow things down because computers are much faster than we are. I'm going to say Q thread, I'm going to say current thread, MS sleep. Now what this is going to do is tell it to put the thread to sleep or stop executing for a certain number of milliseconds. And I'm going to say 500, which is half of a second. So it's still fairly snappy. Now I'm going to put something in here right now, but it's not going to make sense probably till towards the end of the video. Let's say this, delete later. What this is going to do is delete this object out of memory, but again, it's not going to make sense just yet. Let's flip over to our main here. Now we could, if we wanted to, create our worker and run it on the main thread. And let's go ahead and demonstrate that. We're going to include Q thread, Q bug, Q worker. So I'm going to just say a little bit of copy and paste action here. We are going to name our main thread. Notice we're in our main function and we're saying the current thread is main thread. Now let's go ahead and do some work here. So we're going to say Q info starting and then our current thread and then let's go ahead and say finished. And then in here somewhere, we're going to say doing stuff seems rather simple at this point, right? It is. Now what we're going to do is we're going to show you how a non-threaded application works and we've done this before. So it's going to look very familiar. I'm just going to call that slot directly. And what does the output look like? Anybody? It's going to say starting, doing stuff. The worker is going to run. So it's going to go in here and do this loop. And then when it's finished, it'll come back here and say finished. This is not threaded. Let's save all and wait for it to build. There we go. So this is boring. This is not what we want at all. This is all running on the main thread. You see working on main thread. So this is important to remember when you get into GUI programming, the main thread is something you never want to lock up because look at what just happened. Our entire application stops and does things one at a time, not fast at all. We don't want that. So let's fix this and turn this into a multi-threaded application. Now, spoiler alert, this will work just fine because there's no parent, but we're going to demonstrate a slight issue here. Let's say we got a pointer. So I'm going to say worker. Let's actually turn this into a pointer. Again, I did say I was a bit rusty because this is a Q object. We could give it a parent. But if we do that, we're going to get an error saying, you know, cannot move object to a thread that has a parent. So it cannot have a parent at all. So bear that in mind. If you tried to move something over there, it's just simply not going to work. Now, we don't want to do this because, well, we want to move that worker to a thread. So first thing we're going to do here is say Q thread. And then let's go ahead and name this. I'm going to say thread and we're going to set the object name to worker thread. It doesn't have to be name worker thread. You can call it anything you want. You can call it fuzzy kitten if you felt like it. But notice we have two very distinctly different objects here. We have a worker and we have a Q thread. And it's already saying value stores is initialized and then potential memory leaks. So now this thing is freaking out. But don't worry, we're not going to have a memory leak. We're going to take this thread and this worker and we're going to smash them together. Or more appropriately, what we're going to do is we're going to say worker dot move to thread. This is the confusing bit because you'd think you'd want like thread move object. But no, we're going to say worker move to thread. And then we define what thread we actually want to move it to. But we're just going to simply move it to that thread.  We have two other problems. First, we need to start our worker when the thread starts. Because if we just run this as is, guess what? We've moved the worker, but the worker doesn't know what to do. It doesn't know when to start. And we can't start the worker on the main thread. So we need to tell the worker when the thread starts. This is very, very simple. What we're going to do is we're going to say Q object, we're going to connect. And we're going to connect our thread. I'm going to say Q thread and we want the started. And we're going to connect that to our worker. And we're going to connect that to the run slot. This really is the power of Q right here is you have this ability to connect things and it's just going to automatically know what to do. So when the thread is started, the worker is going to call the run function which is going to kick off. You guessed it. This little loop right here. This is going to be that hopefully light bulb moment. This delete later. Flip back to our main. What have we done? We've created a pointer. This is an unmanaged pointer and we're going to have a bad time. There are multiple ways of doing this. We could use auto pointers, but a very simple way of doing it is just saying you know what? Delete later when we're done with it. So it's just going to get rid of it all together and we don't have to worry about it. Again, there are better ways of doing that and we will cover those in future videos. But right now, if you're super worried about this little example having a memory leak, simply call this delete later and it will schedule this object for deletion inside of Qt. All right. Now the final moment of truth here. What I'm going to do is I'm going to say red start. So we're going to start that thread up, which is going to run our worker. Let's go ahead and run this and see what it looks like. Now it seems a little confusing at first because it says starting, doing, and then finished. Wait a minute. Finished, but our worker is still going and then the worker is finally deconstructed. So let's really illustrate this a little bit better. Notice that we are starting doing stuff on the main thread and now we're working on the worker thread. So we've successfully moved it over to another thread and we've deconstructed that object. I'm going to add in a little bit of code here just to illustrate and you don't really need it. It's just for illustration purposes. All right. So we've got doing stuff and let's get rid of this guy here. And we're simply going to do a loop. It's almost identical code to the worker thread here and we're just going to say working and then whatever number on the current thread and we're going to sleep for 500 milliseconds. So now we have two threads at the same time running and this will be a little more clear just how powerful this is. Run and now you can see we are working on the worker thread, working on the main thread, working on the main worker and it just kind of as the scheduler sees fit it's going to do its thing. This is what I mean by this is how powerful threading is. This simple little example we can now work on multiple threads with ease and we can clean up when we're finished. I hope you enjoyed this video. You can find the source code out on github.com. If you need additional help myself and thousands of other developers are hanging out in the Voidromes Facebook group. This is a large group with lots of developers and we talk about everything technology related not just the technology that you just watched. And if you want official training I do develop courses out on udemy.com. This is official classroom style training. If you go out there and the course you're looking for is just simply not there drop me a note. I'm either working on it or I will actually develop it. I will put a link down below for all three of those. And as always help me help you smash that like and subscribe button. The more popular these videos become the more I'll create and publish out on YouTube. Thank you for watching.


Good day fellow investors. We are continuing with the analysis of interesting Chinese stock picks. China is a great market to invest in growth. There are some risks but nevertheless in the long term should bring very very relatively safe rewards. Especially if you find stocks that have a margin of safety and huge upsides. And that's what I am looking for. Today I'll discuss NOAA Holdings which is a wealth management company in China. They have high network clients and they find investing products for them. They are in the intermediary, they make money out of fees and commissions. I'll discuss expected future earnings, describe the business, analyze the fundamentals, analyze the margin of safety and analyze expected future returns in relation to the risks. Always focus on the risks. So the company overview as I said wealth and asset management services provider in China mostly focused on fixed income 205 branches in China. Almost 165,000 clients, number is still growing at staggering rate. Shares outstanding, American depository shares 60 million. They are branching out in wealth management, asset management and internet financial services. Generating income as I said from commission and fees. What's good about the company SAP Global gave it an investment rating. So it's not a junk Chinese stock. It's rated very well. Long-term rating is stable, very low financial leverage, rapidly growing management business. Small assets under management present a risk, but also opportunity. As assets under management are small, they can grow easier to higher level. So higher revenue and concentration in wealth management, of course, they are still starting the environment. The businesses, they're still just starting. We still have to see a Wall Street in China being built. So there's plenty of time. NOAA owns Gopher asset management, but it manages only $19 billion for now. So if that sector explodes in China, it will be a benefit for NOAA. Quick look at revenues, staggering growth, five-fold growth in the last five years. This is Reminbi. Income from operations, four-fold growth. Net income, also four-fold growth. Basic earnings went up four, four-point something times. So very good company, good margins, stable margins. They are a service, so they take their fees on what they're doing. They are not owning what they're selling. Thus, the risk should be very low. Whatever happens, even if the situation in China deteriorates, they will be stuck with general and administrative expenses, which are around 10% of the company. So they have really a margin of safety in. If things go wrong in China, we can still operate. Our cost will be much, much lower. Thus, there is a margin of safety in the company. Balance sheet, total equity has been constantly growing. So that's why also the good rating. The book value per share is $8.47, which is much lower than $31. So the margin of safety in the book value is pretty far away from the stock price. So we have to focus on growth and cash flows. On the growth side, they have showed growth of 8.5% in the last quarter. However, on a year-to-year basis, the growth is much, much bigger. Nevertheless, for conservative reasons, we will take that NOAAG continues to grow as the market will grow. Expected market growth, wealth management growth in China is expected to grow at about 15% to 20% as the number of high-network individuals increases in China. So future earnings grow, trading earnings per share, 1.58, price of annexation, 19.62. Expected growth of 15% per year. So we can expect earnings to double in five years. And that's the minimum expectations. If the internet businesses they have, the wealth management explodes like it has been the case for the wealth management part and selling fixed income products mostly to form real estate investment, but they are lowering that, then we can expect higher growth. So I think this is the minimum I am looking at. Of course, always look at the safety and the risk first. Let's look at the risk. Growth per year was 46% last year. 15% in the last quarter, 8%. So I think it will be variable, but we can expect higher growth rates than the 15%. But let's say 15% and will be good. So the risks are early stage wealth management market, early stage. So the risks are high, but opportunities are huge. Fixed products related to real estate, those are declining for NOAA, 51% in 2014, 31% and now around 30% in 2016. Biggest risk if there is slowdown in the global or Chinese economy, this stock will get hammered despite the margin of safety in the flexibility of costs. So read the 20F report risk part, it's 20 pages before investing to know exactly what you are going into. There is some part on the financial statement that I don't really like. Government subsidies are 25 million dollars per year or 0.4% per share. That's 25% of earnings. That's very important. If government removes those subsidies, as those companies are making more and more money, we see a hit on earnings. So a risk. Then we have a dual shareholder structure, class A, one vote, class B, the management, four votes. So there is always a possibility for a buyout from the management if things go really well and there you should expect a premium of 40%. So that's always the question. Is the premium, the management buyout risk, like the management had done with previous companies, is it worth the risk? Quick comparison to UPI Holdings, NOAA, 15% growth, UPI 40%, price to book better at UPI dividend, better at UPI margin of safety from book value is better and UPI valuation is better and UPI. Given the risks of a crash in China financial system, I prefer to invest in companies that give me immediate return and where the growth is extremely high. So in this case, when comparing NOAA and UPI, I know NOAA is bigger, but UPI is also growing and perhaps the smaller thing will be an advantage for the growth. So to conclude on NOAA, it is a very good business. It's a very interesting business. It has huge potential. However, on the risk side, I don't know if it's worth it. The risks are of course a slowdown in China, negative sentiment towards such companies. The risk of a management buyout at a smaller premium. So you might want to think about the exposure there. The returns I expected to double in the next five years if the valuation stays the same. The rest for the valuation, I don't know how it will be valued. If it goes up, then the returns will be higher. If it goes down to 10 or 8 where UPI is, then you can expect flat-ish returns over the next 10 years. That depends on government regulations, subsidies, competition. Commercial banks are entering the field. Perhaps they will acquire the companies because a lot of commercial banks in China don't have a wealth management and internet presence. So it's a very interesting, there will be very positive developments as the environment grows. So very interesting company to see, to look at and be exposed if that is your thing. Just a quick comparison with other companies that we have discussed. I'll make this stable for more and more companies. I have just started to discuss a little bit and we can see that NOAA is not that good in comparison to other companies because the risk is pretty high. The book value doesn't mitigate the risk like it does in other companies that I have discussed. Nefzone, Amira. The return is there. However, the risk is a little bit higher. Dig deeper into what's going on in China. If the volatility of NOAA's new customers that was low, the 8% growth over the last quarter returns to 30-40%, that positivity could really push up NOAA's stock price. So very interesting volatile company for traders, for longer-term investors. I would prefer other investments. Thank you for watching. Leave your comments below. Tell me where I'm wrong with NOAA. Do you have some additional info that could add value to this analysis? I'm happy to hear your comments and discuss with you the stock and the environment, wealth environment in China. Thank you for watching. I wish you a great day and I'll see you in the next video.


So we're here at the ARM TechCon and who are you? I'm Miloš Meryak and I'm working on security in the IoT unit and yeah So we're trying to solve problems that people don't know they have currently but they will have soon So you work at ARM on the security of IoT? Yes So we are building components that ensure that if devices get compromised we have a story on how to uncompromise them and return to a trusted state and avoid having people walking around with USB cables and Refleshing let's say thousands of light bulbs in the Building that happen to be infected by malware. This is a big very important job, right? It's really important to get it to work. Yes, because there's only one chance to get it right, no No, the point is that we believe that okay like people are imperfect and Weird things happen. So we need to have an answer how to recover from problems and ideally recover before the attacker essentially Happens to get a chance to roll out an attack on a larger scale So the idea is to make it easy and reliable to for example update firmware and in that way We can guarantee that recovery is possible from these kinds of threats. So it's a essentially two Stage process or a obviously want to avoid that you get the problem in first place. So We invest a lot in like ensuring the quality of our software But once basically which is the second stage of the solution once an attacker can in fact the device Imagine let's say a faulty Bluetooth stack We ensure that the reach of the attacker is limited in a system I think it's not rocket science people do that since ages in browsers and in operating systems But it happened to be that fire T devices currently we still have flat security models and that's what we are trying to fix here So how is that possible? So does I mean? every arm cortex I Mean what it's gonna be like the V8 dash M the future of arm cortex M We'll have some kind of standardization in the design So you can you can remotely update all of the light bulbs or how does it work? So the story is this so you need essentially security from a ground up So you need to start with hardware measures to ensure that the compartmentalization between for example Let's say mutual distressful code So we built not only solutions for our Vietnam, but also backwards multiple solution for MV7M But for MV7M we use a memory protection unit for MV8M We added way more advanced features essentially a secure accelerator that Simplifies these operation a combined metalization and massively accelerates that and every moves Let's say delays by security Features and that allows them to build software on top of that that can guarantee Security compartments between software and the third step is obviously to put something into these boxes that executes on its guarantees for example manages keys performs firmware updates and We make sure through the compartmentalization that for example Let's say just the code block that requires access to the flash controller has access to the firmware flash controller But if I happen to get a malware in the Bluetooth tag the Bluetooth tag wouldn't have access the same controller And that security is then also extended to the bus level which is also a big part of the story for trust on for V8M So does that means V8M is kind of like a big change There's a lot of new things happening with that. Yes, so it's also a change in culture like it's not just about like throwing Essentially hardware out that fixes these problems, but it's also about giving people same example Implementation. Okay, this is how believe it's a good way to use these architectures and giving people's reference implementations Is a different story than just like throwing white papers out this is how we believe stuff should be done So that's I think you a paradigm shift that we are now prescriptive beyond just specification But also provide same example mutations and that of course includes firmware updates because the firmware update again needs to be Protected in the same way. So for example, you don't want to depend on the security of your card provider But you want to have end-to-end security. You don't want to reinvent the wheel for every firmware update method let's say method a for securing Ethernet based update method B for Securing, let's say ZigBee based update another method for USB based update You don't want that you want to have like one concept of reasoning about the validity of a firmware and that is something which we'd like to Provide again as an example mutation to our customers and if it catches on the benefit would be a less fragmented ecosystem and a common way to reason about security Does that increase the price of the Soc of the of the chip no quite the opposite is the way so our strategy is you have to solve the chicken and egg problem so security is something which Deserves to be used even in very very low-end devices. So we're talking about let's say Bluetooth energy M0 plus kind of style. Yes, which could still benefit for example from secure firmware updates, but if I using let's say hashing of firmware of updated firmware for example verifying signatures and Deciding if let's say an attacker tries to downgrade a firmware to a previous firmware Which happens to have known exploits. So it wouldn't benefit from internal security But the language of interactive device and when a security is the same. So there's hardware security added to the Smallest arm processor to the cheapest arm processors and it doesn't increase the cost It's hardware security, but it keeps the cost low. Yes So it's essentially just the next version of the controller But the interesting realization is you can have the same security just with more computing overhead on all the devices as well, right? so In many cases like let's say the execution time of a firmware update Is way longer because of the cost of writing to flash but the time of verifying the update is Negligible because like how often do you update the firmware? Maybe every few months in the worst case Maybe just once in the lifetime of the device. So it's not something which is like speed critical So you might as well implement completing software, but the interesting bit is by adding this Sophisticated security features you can extend its security to bus level So you suddenly don't have to trust even peripherals on the bus anymore and you can get Real-time security which is also an interesting feature to have so imagine like a wireless stack Would benefit from that security Functioning under real-time condition where as you can have a similar of security with existing course without additional cost Just a software feature But it would come at the cost of latency and maybe higher battery consumption So all this security is it an embed OS or where is it in the solution? So in a refer that our defense implementation currently lives in embedded OS embedded OS Most of this component including the second component are available on github. So the important feature is we develop security open essentially to essentially demonstrate We develop a trustworthy environment for protecting Future applications. Is this something that could be inside of a linear or could support this also like Open-source collaboration with all the SSC can collaborate and making Security in the open so this is exactly what we do with your partners So our partners basically we traditionally create like their friends implementation Okay, this is how we believe it should be implemented then basically our partners take that information and port that to a huge range of Supported cortex and platforms the narrow is traditionally more a-class Course and it's more Linux based system as the name Indicates so the the challenge we have there is arm is to make sure that even though you have like Structurally complete different devices. Let's say this high and Linux based devices Which might end up let's say as backbone routers in an IOT environment Or let's say like fat IOT devices with for example screens and 3d graphics and whatnot But you have in the same ecosystem devices on cortex M and very consent devices But they need to be addressed in a common language. So the The Challenge here is to define a language that is compatible to very consent devices also the high end devices So you don't You have like a very smooth ecosystem with essentially very constrained to very high end devices Does it work or you still have a lot of work to do to make it real? Does this mean that arm is going to make firmwares for everybody and what is what is going on? No, so that basically the plan of arm is to create basically the plumbing The the base components the firmware update the the network stacks a lot of that work is done by our partners and Available for example on the corresponding platforms We also create reference implementation of cloud services because you can shift for example power consumption to a cloud service by having a smart Handling of protocol you end up using way less power By using for example, let's say the TLS protocol more intelligently then you would use in a let's say this situation Is this embed connector? Yes, exactly. So that's what it's going to provide security updates to light bulbs and everything So yeah, my connector would be more basically data and like control the light bulb or provision your keys But it would for example you would be also used as a notification channel for firmwares. All right, so What's what's next so what are you doing like in next few weeks and months and what's the plan so yeah The plan is to essentially we created this reference implementation and the next month We will roll it out to our partners and we will help our partners implementing that importing like this few platforms We created our service reference to hundreds and thousands of reference implementations. So things are moving very fast. Yes, and So what's your background? Are you hacker? Yes, I have a colorful security background. Let's leave it at that So is your plan to make a system for the hackers to not be able to do any hacking? No again quite opposite. So we want to create a very open ecosystem So even as a hacker, I appreciate a possibility to protect my code against for example badly programmed Code by potentially the vendor of the system. So it works actually my favor So I can suddenly trust a system because I only have to verify the components I'm actually interested in. So let's say if I would have a component that's essentially In a large RT device that unlocks my front door I don't care so much about the quality of the code in rest of the system because I know it's an open system I can reason about that security and I create can create a secure compartment, which is not only Is protected from the rest of the system, but also in case I do basically Bad security it wouldn't hurt the rest of the system. So it works both ways That's the interesting part here. So one of the things you're enabling is for people to protect their software also Yes, so they can like not have people steal it. What was the what is the objective here is? Imagine You have essentially a function that operates on a cryptographic key So you put basically Effectively a single C function into a secure compartment and that C function can operate on a crypto key So from the rest of the system I can call that API and I can operate on that key But no component in the system can ever get hold of the key. So I get immediate for example the security That that key can't be cloned and so I gain for example Let's say very simple with some very simple means a secure identity service And the other approach would be let's say I have a secure firmware update and I can be sure that only the secure update function has the Possibility to talk the flash controller to perform a firmware update I can be absolutely sure that no other component system can write to the flash and for example make Malware resident and that's something which suddenly becomes much easier to prove the security then let's say if you have a Monolithic blob of 40 kilobytes worth of code where you don't have any defined boundaries So all this Design for the security system. Is it something that's inspired from stuff that it already exists or is it totally new idea? No, and the old ideas It's ideas that are on since like 20 years plus So some people might remember MS-DOS where you had flat security models And it's essentially the last time people ever did that and they restarted that surprisingly again for IoT Where you have very large operating systems which run in a flat memory context and you don't have any Contacts concept of protecting against malicious attacks across this boundary. So it's stuff essentially unix exercise that since ages and I think the last Version that used essentially security model is probably Windows 3.1 So I'm not a hacker, right? But I like to say that it should be possible to make a system that is 100% Secure, is that possible? I can tell you that's never possible. It's never possible It does not make sense zone is not the solution for everything No, because the point is you always make a cost-benefit calculation. So for example, what is an attack? Is an attack having a half a million? essentially ion beam that can erase the top of the chip and essentially Modify individual transistors that would be a valid attack But does it make sense to spend let's say half a million of worth of kids to essentially steal a key? With over device which is only about five bucks. No, it isn't so the point is I need to make it unattractive from attacker to break my device and The reasoning behind that is for example decreasing the benefit of an attack So let's imagine I have a million light bulbs if I put one key in all the light but I have one million Light was the same key the value for an attack of extracting that key out of one device is very high So I can justify for example expanding let's say $20 30,000 on extracting that key So suddenly I have a device which is sold at let's say five dollars But I have to protect it against the attack of thirty thousand dollars It's not going to happen that I can succeed that right in that but what I do instead is I'm smart I make sure that every light bulb has its own key So I break open with my half a million kid this one device and I gained access to a key which is worth five dollars It doesn't make any sense dollars you can control one light exactly not all of them exactly that's for sure It's gonna be like this so the point is it's you see it's basically it's a month essentially It's secured from ground up so you not only have to use the right component from the beginning But you also need to get your security reasoning straight So you can always do silly things and people will do silly things and people will break light bulbs with even much less Investment and thirty thousand bucks, but the point is like if it's designed reasonably the impact of an attack is so unattractive That it's pretty academic to break that device So IOT is a big hype and it's happening, but it's happening even more in the future Yeah, you think it's gonna like if there's some security issues then it's gonna be a big slowdown, right? You think it's gonna be success. Do you think it's gonna work all this stuff? I think it's gonna work. Yes So otherwise it wouldn't be here No, we believe it will work, but I totally agree is it's about building trust So imagine there would be a widespread attack where for example people break essentially a device which is in every household and People would lose trust for a certain time into IOT and it would slow down development So we invest a lot of effort in not Making this happen by educating for example people how to structure the software For example against what threats are you protecting yourself against? So for example, you expect for example different level of security from let's say an IOT light bulb in a residential environment compared let's say to a street light on A city level because obviously can imagine if I can turn on and off as an attacker All the street lights in a city I can blow up a power plant effectively, right? So you don't want to have some Some I will have a different level of security for recently more interesting targets because that's also like an interesting observation Like for an attacker it's about getting credit or making money with an attack. So the more interesting Target is the more likely it will be hacked and I need to have a good answer How to be always one step ahead of an attacker and making his life miserable. I think that's the story At arm are you hiring hackers to come and hack IOT and help you find the Issues you are we are searching for more of them. How do you find them? Oh, we find them


Welcome to Spotlight. I'm Liz Wade and I'm Colin Louther. Spotlight uses a special English method of broadcasting. It is easier for people to understand no matter where in the world they live. In March of 2018, many people in London, England received some troubling letters. People in other communities like Birmingham and Leicester got these letters too. These letters were encouraging people to take part in an event. This event was called Punish a Muslim Day. The letter told people to do acts of violence against Muslims. The person who wrote the letters wanted to get lots of people to join. The Muslim community in England was very upset by these letters. Tel Mama is a group based in England. They support victims of anti-Muslim hate. Iman Atta was the director of Tel Mama. She told Sky News. This has caused quite a lot of fear within the community. People are asking if they are safe. They are asking if their children are safe to play outdoors. These letters made people afraid. It was probably easier to not talk about them. In many situations, people do not talk about hate crimes. But there are ways to fight hate. Today's spotlight program is the second in a series of 10 programs. In this series of programs, we look at 10 ways to fight hate.  So the Southern Poverty Law Center has made this list of 10 ways to fight hate in your community. Today's spotlight is on the second way to fight hate in your community. Join forces. Mansour Ali was a resident of Manchester and a Muslim. He owned a cafe in Manchester, England. When he heard of these letters, he was hurt. He decided to do something. His family planned a different day. The day they planned was called Banish Hate Day. On this day, he encouraged people to be kind. His shop gave away free tea, cake, and other treats. Ali told the Manchester Evening News, We will not let small-minded people set us against each other. Instead, our arms and doors are open, even to those minds that incite hate. Get to know us and our community. Join us in our community work. Use that negative energy to do good. Shahab Adres heard of these letters too. He wrote another letter. But this letter encouraged people to participate in Love a Muslim Day. He encouraged people to support Muslims instead of hurting them. He suggested that people could take Muslim friends to get coffee, or invite a Muslim friend over to hang out. Muslims and non-Muslims responded to his letter. They said they would join. They created community events where people could come together and celebrate Love a Muslim Day. Adres told the Huffington Post, In the face of extreme hatred, it is important to stay positive and show some creativity. We must rise above it. We must be active and show compassion and love to our fellow citizens. Sometimes bringing people together is a difficult job. People who experience hate often feel afraid or alone. People who want to fight against hate may not know how to start. The Southern Poverty Law Center says that people should always remember one thing. People around you also want to stop hate. That is why it is so important to unite and join forces. Everyone knows that there is power in numbers. Many people have a louder voice than only one person. More people can do more things. They can educate more people. Criminals may also be less likely to attack a larger group of people. And more people also means more ideas. Every person can add something. So how can you join forces? How can you find people to connect to? The SPLC says that there are many ways to join forces with other people. You can start by joining with people who you are already close to. Gather with your friends and family. Ask the people who live near you, your neighbors, to join your group against hate. Invite the people you work or worship with. Remember also to join with people who are different to you. Uniting can bring together every person of a community. When you see hate, encourage your group to act against it. Meet together and talk about ways to make your group grow. Talk about ways to educate your community about people who are different. You can also work with larger groups in your community. What groups in your community might want to stop hate? The SPLC suggests inviting and involving women's groups, teachers, labor unions, university workers, and young people groups. Involve schools, businesses, places of worship, children, members of minority groups, and politicians. They also encourage people to involve local police. Police can watch for early signs of hate in a community. That is what people in London did when those letters arrived. These letters encouraged people to hurt each other. They wanted to divide people. But the people in these communities did not divide. The police departments encouraged people to turn in the letters if they received them. The police went out to find who sent the letters. Angela Williams from the West Yorkshire Police told these communities Our communities should be careful. But do not be frightened. We are stronger when we stand together as one and will not be divided. And the community did stand together. In response, people like Mansour Ali and Shahab Atris joined forces. Some people posted on social media. They made a hashtag. We stand together. They volunteered to walk people home from work or school. Some people made leaflets and online posts about what to do if you see a hate crime. Sadly, hate exists in every community. But there are many ways that people can stand up and join forces against it. Remember that you are not alone. This is the second program in a series of 10 programs on 10 ways to fight hate. This list is from the Southern Poverty Law Center. The Southern Poverty Law Center is a group that works toward racial justice, especially in the Southern United States. They monitor hate crimes, teach tolerance, and seek justice. Here are their 10 ways to fight hate. Act. Join forces. Support the victims. Speak up. Educate yourself. Create an alternative. Pressure leaders. Stay engaged. Teach acceptance. And dig deeper. Keep listening to Spotlight to hear the complete series. You can leave a comment on our website or email us at contact at spotlightenglish.com. Visit us on YouTube at youtube.com slash spotlightenglish one. The writers of this program were Liz Wade and Amelia Burglund. The voices you heard were from the United States and the United Kingdom. All quotes were adapted for this program and voiced by Spotlight. You can listen to this program again and read it on the internet at www.spotlightenglish.com. This program is called 10 ways to fight hate. Join forces. Visit our website to download our free official app for Android and Apple devices. We hope you can join us again for the next Spotlight program. Goodbye.