because that's what I do. So first of all, welcome to all of you. I know we still have some people coming in. Can I just say I am really impressed that any of you are still awake at this point? Yes, let's give yourselves a hand. Yes, including them. I know that I am at point one completely wiped out. But we're going to talk about, we're going to talk about OpenStack and the internet of things because it's just something that we really can't ignore. I'm sure if IoT is your thing, you've probably been to other sessions this week. And it's, yeah, we've got to pay attention. So without further ado, let me introduce my esteemed panelists here who are not sitting in the order in which they are on this slide. So we'll just kind of work our way down. I'm going to ask them to introduce themselves and tell us who they are and what they do and for whom. And I'm Nick Jaysson, one of them. Hi, I'm Nick Yacosta with Disco, also a co-host of OSPod and OpenStack. OpenStack, and I am an OpenStack around OSPod. Thank you. Hi, I'm Aleksandar Adamov from Durantis. I'm a particular researcher, and I've been working for a while in antivirus industry. I'm from IBM, and I'm the first go for IBM Watson, IoT engineering. We are with that one. Kumutini Ratnam Singham, I work for Julipa Network, task software engineer. I am on the product side at the people marketing side. And I'm also an active member in OpenStack. Hi, my name is Sean Towns. I'm mostly working in UConn and QA project with an OpenStack. But I also do a lot of work with Chase, writing OpenStack guides, which is the architecture guide. Lots of guides. Lots of guides. We all know how many guides OpenStack needs. So we try and write as many of them as we can. All right, so let's talk a little bit about what we're going to talk about today. So as you can see here, we're going to talk about OpenStack and the Internet of Things and how they relate together and whether we're just piggybacking on a hot term spoiler alert. No, we're not. So we're going to talk about where we are and where we're going and why it's important. And before we worry about Skynet coming and Terminator destroying all of us, we have some more basic concepts. And then we'll look at, OK, so that's great. What do we already have? And what does the OpenStack community need to be thinking about and putting together in order for us to be able to make this a reality? So this here is a survey that I took off the Internet. I'm not really going to go through all this data. My whole point of this data is, boy, there's a lot of people talking about this. And there's really, really a good reason. So I'm going to hand off to our panelists here to talk about kind of where we are now and why this is all important. And I cheated and wrote down my stats because I'm not smart enough to remember them. I'm going to go ahead and blame the party the other night as well as all the barbecue I've consumed this week. So in 2008, there were already more things connected to the Internet than people, which is crazy. More things connected to the Internet than people. By 2019, companies are going to ship 1.9 billion connected home devices. And you're looking at just a tremendous market opportunity. By 2025, the global worth of IoT technology could be as much as $6.2 trillion. So if you hear big companies hopping on the IoT bandwagon, this is why. It's a tremendous market opportunity. And of course, all of these things need infrastructure to run on. And OpenStack, obviously, is a key technology in terms of cloud computing. And one that a lot of companies are looking at to power this sort of wave of digitization. Yeah, just to add what Nikki just shared, you said there's more devices connected than human beings. Exactly. We have 10 billion devices connected to the Internet today. And we expect that number go up to 30 billion by 2020. So really, Internet of Things is just a digital type, the physical world we are in. Wow. In my opinion, I think in about 20, 30 years from now, we are going to look back and look at our lives and say we were living inefficient life. IoT and OpenStack are going to bring a lot of efficiency to our lives and to our business models. A lot of from the data, the massive amount of data, we extract valuable information. From that, the businesses and even household lives, we are going to make a smart decision and make our life more efficient. That's why we need IoT. And for instance, in Juniper Networks, we are co-innovating with our customers and partners to build the right infrastructure to scale and to secure, automate the network with our partners so that we can provide high-performance scalable networks, which is agile. And also, we have advanced powerful analytics technologies and tools that we are partnering with our customers and partners so that our partners and customers can take full advantage of IoT or what is possible with IoT. Excellent. Thank you. Do we have any more comments on this? Okay. So let me just kind of hop back up here. Have I mentioned that this is the fourth day of the summit and I'm exhausted and didn't plug in my computer? So, yeah. So if you can see here, this is a shot that actually comes from Cisco. These are all the different... This is an example of the sort of different systems that have to be handled in a world where everything is, you know, internet-ified. Thank you very much. So let's talk about kind of some of these things that we should be worried about. I think the major concern is security. We've heard a lot of posts and notifications in media. When ethical hackers, white-haired guys, they investigated the security of Internet of Things. They hacked smart cities, smart homes, medical devices. Recently, my colleague passed from Kaspersky Lab. He posted research on how he hacked a hospital. So he managed to get access to a magnetically-announced imaging device, MRI, and he penetrated through the local Wi-Fi network and was able to access the storage where these funny pictures with brain and bones are stored. So that showed Internet of Things devices and the infrastructure are exposed to the threats, to the all-known threats like spoofing, tempering, denial of service, elevation of privileges, and repudiation. Let me just ask a question. So does that mean if I have my thermostat on the Internet that I should be worried about the rest of my stuff? Yeah, I should be worried that you can die of waiting. Or freeze, yes. I agree with Alex. Security is definitely what we see top, or number one, concerns our client have. So it is very important to have the basic security building in Internet of Things like authentication, authorization, access control. But I want to push that a little bit further. No matter how good your system is, there are still risks to be attacked. Let's just face it. So it is extremely important to have risk management. That means be able to detect the anomaly and send an alert for your client, give them the time to respond before damage is done. So in my opinion, I think the data that we collect, who owns the data? Let's say we have businesses and we collect the data. It goes to the data collection center to get analyzed and to extract valuable data information from that. But it has to pass different points, so it opens up hackers to hack in and take the information. So the main objective here is there could be, like if it's a household IoT devices, we may even see small, mini data centers, just like the way we have the solar panels on our roofs. We may even install small data centers to analyze our data. But when it comes to businesses, the security, obviously, who owns the data? Whom are we sending that information to? Who is going to get handled of the data? So in Juniper, we are coming up with a lot of innovative technologies and innovative algorithms to position ourselves so that we can help our customers to take full advantage of IoT. Excellent. So let's talk for a minute here. For those of you who are not familiar with the term, Alex, tell us what is attack surface and why is this relevant? The attack surface includes actually two parts. The first part is actually endpoint devices, so like sensors, this medical device is on. And the second area is cloud infrastructure where the data are collected and processed. So from my standpoint, I think the major concern is security should be addressed to cloud infrastructure. And today we had a talk from HP Architects and they suggested security architecture that provides protection of IoT infrastructure but mostly pointing to cloud infrastructure. So they suggested using a DNF virtual network function to introduce intrusion prevention system, intrusion detection system, antiviruses in the cloud. So cloud infrastructure for IoT needs the same protection as any other kind of information system. Probably a little bit more. Even more. And the interesting thing is that I just talked to one technical manager of IoT company and he showed the management interface how they can access the database of all customers. They actually can control all IoT devices that they sell and they support. And usually chipsets of Internet of Things devices, they contain some hard-coded SSH keys. So this is done to provide ability for manufacturer, for vendor to support, to provide services to the customer. See something goes wrong so they can connect to your device, for example, IoT router, and to check what is going wrong. And this is the major concern, a huge concern because once you hack this management interface, once you get access to this cloud infrastructure, you can get access to all IoT devices and you can do cyber-spionage, you can destroy, you can even kill people. Okay, there's... It's pessimistic. I wasn't expecting that. I don't know if anybody else here was expecting that. I was not. So don't be nervous.   No, no, no. This is what hacker may do, right? But a robust, I would say, commercial IoT platform. Have building device management that prevents this kind of risk and the security attack. That's definitely... They should be having it. That's what you're saying. Exactly, this is a top focus. Good. Okay, so other concerns, Sean or Nikki, do you want to talk about the other concerns that we should have?  It's literally a matter of life and death where a bad decision can create havoc for yourself or those around you or your family. This is definitely scary. I bought a Honda recently, I love my Hondas, and I got a newer model and it's connected now. I know it's connected because I'm supposed to get an oil change every 6,000 to 8,000 miles or something crazy. But now, when I'm getting close, as soon as that early warning light comes in, literally that day I get an email saying, hey, you're due for an oil change. Here's a coupon. And I'm like, man, what else do they know? I mean, they probably know where I'm driving. They probably know. I've got the nav in the dash. But it's really interesting to think about the companies that have this data and what they could potentially do with it or how valuable that could become. Knowing where I go, where I shop, how long I'm there. That's all interesting data that the companies need to protect as a carrier. So, setting aside the security piece for a second, let's just discuss the capacity part. Most of the world is still trying to adopt IPv6. And in order to talk to all of these devices in your customer's home, past the customer premise equipment, you need to start thinking about designing your apps around the correct networking model for the 21st century, which is IPv6. The other thing you'll have to consider is the fact that you will have so many devices, you will need to do capacity planning within your data center and start to discuss not necessarily the density of, so perhaps your hypervisors and the number of virtual machines that are running on each hypervisor, but also perhaps from the other side of the equation determining how many IoT devices you'll be establishing sessions with these virtual machines or whatever your control plane is. So, you'll almost be pressed up against two different types of concerns, which is the density of your hypervisor and then also the density of all the devices that are connected to that to ensure for disaster recovery purposes, the amount of bandwidth that you'll be consuming out of a single data center or even a single compute unit. That's those types of things. And then you also have to build your applications to also conserve the amount of data that is being transmitted among very large and expensive paths. This is why he writes guides because he thinks about the actual practical things. So, yes. Thank you. Thank you. Okay. So, let's talk about kind of where we are right now. We are going to save a bunch of time for questions, so don't worry about that. Well, Sean, tell us a little bit about where we are on IPv6 and then we'll kind of move on from there. Sure. So, within OpenStack in the neutron community, there was a team that was built from a diverse number of companies which has prepared OpenStack to be IPv6 enabled. That work was done a couple years ago, so we find ourselves in a nice position here that as the interest from the application developers and the device manufacturers get ready for the IoT paradigm, we're in a good position where we've already done the majority of the legwork for that to then occur. The orchestration piece as well within the OpenStack community and all the tools that we have floating around to do application development, such as the first application guide. I'm always on message. And then I'm going to hand it off to somebody to discuss more of the big data piece. Yeah, sure. So, we talk about there are lots of devices in the magnitude of billions of devices. Think about all the data could come from those devices. They are both structured data, unstructured data. It's going to be huge amount of data lake. It's one thing you might want to consider. Another thing, you may not want to push every single piece of device data to the cloud. In some cases, the device is a low-power device. Cannot afford to do that from the capacity perspective. In other cases, maybe in a shipyard, it's very poor internet access. You just cannot. So, one thing to keep in mind to consider when we design all those solutions, applications for internet of things is fully leverage the analytic power on the edge or gateway. So, you don't have to, and you don't want to push every single piece of data to the cloud. Excellent. Thank you. All right. So, now let's talk about what we still need. Okay, who wants to start that one off? I think like we maintenance and upgrade, upgradability, that is very important even in OpenStack or in any apps because there is going to be 50 billion devices 2020 and also the success of IoT depends on security and how fast it can function. So, the maintenance cycles and upgradability is going to be the key for that usability point of view. Excellent. So, the other thing to discuss as the other panelists said is that there are some applications where it's not desirable to throw everything back up into the cloud or to, you know, your main expensive data center with the ability to, for IoT devices to communicate to each other with no network address translation or middle boxes that create reachability problems. There is more of an ability for these devices amongst each other. So, think of it like the way the airplane that we all flew in here, there are networking equipment on those planes for different pieces to talk to each other. So, that sort of paradigm of multiple devices talking in concert with each other over the network will probably find its way over into the consumer type of devices that are now being built and designed. Another thing I see we still need is currently Internet of Saints focus a lot on the device connectivity, device management, get data into the edge device or into the cloud. Really, the reason we want to do this is once we have all the data, have a device talk to each other, we want to analyze the data to draw some insight. So, this is the next thing I see we are going. It's focused on the analytic power of this. Now, I say IBM Watson provide some analytic power that we're building into the Internet of Saints like natural language processing, predictive analytics, cognitive analytics, et cetera. That's what we see. We will go next that can really benefit to draw the value out of the data. I have to say that the idea of cognitive computing and where it can take all this data that we're getting is, well, it's exciting to me. I don't know about anybody else, but I find it exciting. Did you have something to say? Yeah, I'd just like to point, just say safety first about scalability. If we have such a big number of IT devices and this number is growing and reaching like billions, so we need to think about scalable cloud architecture as well and to think about how we can apply security services inside of the cloud. On another note, I think we're at a point now and those of you who've been involved in OpenStack for a while are probably well aware, but there's a massive talent gap right now. Just for OpenStack knowledge and expertise, people are starting to experiment with OpenStack. Enterprises are rolling it out. They're running it in labs. They're realizing it's a lot of work. And we're talking about billions and billions of devices that are coming online. And even though it may seem simple to the consumer, there's still a huge level of knowledge and expertise that is needed to be able to build and operate these underlying platforms that are going to power all of these devices in the future. And so I think it's time now to start enabling, not only for ourselves to start learning about this stuff, but just doing research for this panel, I was like, man, I need to get with it. There's a lot I don't know about this stuff, but I think we're in a really good place as OpenStack to be able to, being a newer technology, I think we have the opportunity to start attacking this now. But I think it's going to be a while before there's going to be enough people that can run and operate these massively scalable platforms that could be a matter of life or death. Again, with the life or death. Thank you. Yes, go ahead. So regarding the analytics piece, we also, in Juniper, we realize, and we have already have tools to do predictive analysis and powerful analytics and big data analysis. So we have actually proved ourselves in the market that we are one of the leaders in the analytics part, and we are going to be well positioned to help our customers to enable IoT as success. Okay. So before we go into Q&A, did anybody have any final words they wanted to say? I assume you just had your final word. So did anybody else want to go ahead? Okay. My final word is that we defined the attack service, like endpoint devices and cloud infrastructure. So far, we've seen attacks to endpoint devices only by ethical hackers, so the value of the attack is quite high. I mean, you need to spend a lot of effort, but the benefit of it is quite low. I think it's just mostly driven by scientists, by researchers. But information assets available in clouds are much more valuable, and that's why we need to think, invest more money to secure cloud infrastructure. And I think such technology like OpenStack NFV, so this will enable to provide scalable security services. Anybody? Go on once. Go on twice. Okay. Questions? Anybody have any questions? There are mics here and here. A couple of takers, so let's give it a minute. Have you guys thought about what could be the business models for this? I mean, some of them is very useful for anyone, like the traffic on the freeways and where the cars are, so that's obvious. But others, which is more personal, like your experience in consumer doesn't want to participate or wants to participate, how the business model can evolve on this? I think what we're starting to see, and it's interesting because I bought the Philippu light bulbs, and I was actually kind of surprised when I powered these things up and I realized that there was no subscription for it. I was like, wow, they're missing a huge opportunity because I would have paid extra money to have all this stuff work better. But if you look at Nest thermostats or you buy it kind of one time and then you're kind of good, the Nest Cam is interesting because you buy the Nest Cam, they give you a free trial to record your data for a period of 10 days. And at the end of the month, they say, the subscription ran out. If you want us to keep showing you 10 days worth of history, you need to subscribe. And so I'm starting to see the subscription model, the Netflix model kind of infiltrating these new platforms, which is great because a one time purchase to run something for possibly years, I don't think it's sustainable. If you are creating these innovative technologies and you're constantly adding new features, that requires teams of people to keep it up and running and going and new features to be rolled out. And so I'm starting to see the subscription model. Maybe the devices get cheaper in terms of the hardware, but you're going to pay in perpetuity. So I definitely see that shift. It's like the whole CapEx versus OpEx discussion for businesses. It's definitely starting to make its way into at least consumer grade Internet of Things devices. Yeah, I can give you another example that I can see industry solution build upon Internet of Things. For example, with weather data and your current location data, we can build a solution for insurance. Based on your location and the current weather condition, give you advice. Should you stay here or should you get to the next mall or coffee shop, park your car in the garage, you can avoid the hail storm or things like that. If you take those advice, can lower your insurance premium. That's just an example of industry solution. Excellent. Thank you. Another one that I've seen, which is kind of interesting is the farming industry. And you think about, you know, farming industry as kind of being maybe one that's not, you know, something you think of being sort of on the cutting edge of technology. But even as early as, I think it was about four years ago, there was a big, I'll say, farming manufacturing equipment maker that we spoke to who was evaluating OpenStack. And the reason being is because they had these devices that were spread out all over the United States in really rural areas. And so they wanted to make sure that they knew, A, where these devices were, where they were being used, and B, they wanted to know the health of these devices because if these devices were starting to fail or requiring maintenance, it created a new sales opportunity, maintenance opportunities, opportunities to make more money. And so you think of farming, they've got, you know, drones now that can fly over fields and take real-time video and photographs, and they've got sensors in the soil to make sure that all the pH levels are right. They've got lighting systems inside greenhouses that when there's natural light up, they'll turn those lights down as that natural light starts to wane or if the weather is really bad, they'll actually turn on these lights at a certain level to mimic the sun.  Let me just say something about farming. When your entire yearly income is based on, like, what you get out of a three-month period, it is important for you to make sure that everything goes the way that it should. So there you go. Just one comment. We have this solution in production in Europe today. It's like shameless plug day while you're at it. Cisco acquired this company called Jasper, and they do cool stuff like that, too. What do you got, Morantis? We got this panel. We have an open stack that works. Ding! I wanted to quickly touch upon the healthcare industry. We already have, you know, my doctor devices kind of at home checking out blood pressure and sugar and all that. In that industry, I see a tremendous growth in that industry. And cities, lots of cities. Smart cities, which we'll save XP from having to plug. IBM Smart Cities. Let me just, we're going to do your questions in, like, one second. But let me just tell you that when I was looking for cartoons for this, I found cartoons on, like, all of these. Like, your doctor just called.  Or a guy was going up an escalator and there was very embarrassing ads pointed to, you know, Bob, you know, make sure you sleep more than six into four, 6.4 hours at night. Bob, take care of your rather embarrassing disease. And the caption was still feeling about smug, about being an early adopter of those wearable devices. So, all right, go ahead. What's your question? Hi. My question actually touches a lot on what you were just talking about, is what about the ethical implications? What about the ethical implications? What if I want, or I don't want, my car to be knowing where I am. What if I want to opt out? Can you guys talk about that a little bit? Build a cell phone jam. I don't think that, I don't think that, you know, regulations are keeping up with privacy. Undoubtedly, I mean, ever since the Snowden thing, I think privacy has just become a huge thing. I think there's huge ethical implications. You know, I had a friend who got an Amazon Echo, and he was venting about how he didn't like his job. And literally, the next day, he got an ad that said, hey, Amazon is now hiring, which is really strange. And he was like, man, is this connected? Like, I have no idea. Even on Facebook, you know, you send private messages on Messenger with somebody, and then all of a sudden, you're getting ads for whatever it is that you talked about. So, I think there's huge, huge ethical implications. I mean, there was the famous hack of, I think it was like baby monitors that went out, and, you know, people figured out you could drive by and basically pick up on this network and see what's going on and listen to what's going on in someone's home. I mean, you know, it's important to have that security implemented in the design process instead of coming back afterwards and doing that so you don't have like, you know, silly generic IP addresses that are going to your devices. But I think that's where, you know, companies like, you know, IBM and Juniper and others are really focusing is making those platforms ready to address security kind of upfront instead of waiting until something like that happens. So the question was, what if I just don't want to opt out completely and I don't want, you know, my car to be internet connected? That was the question. Yeah, so, yes, I can say for the Watson IoT we will allow some configuration policy that can build in, give that flexibility. But I agree with you that this is a much bigger area. Keep your car healthy, your existing ride. Forever. So Japanese cars are pretty known for their reliability, so you can always just look for those Honda Civics and, you know, the stuff that are in the used market or maybe just go down to a motorcycle. Or bicycle. Bicycle. There you go. Well, until they start strapping stuff onto them. Go ahead. My question is about community concerns. My question is about the community concerns, the diversity. You may know that 10 years ago, every person joined the Linux community that there are a couple of years of conflict of the misunderstanding of each other. IoT world, now, we may collaborate with evidence per guy, with device guy, with a cloud guy, like us. How do you think about how to make collaboration with evidence guy, with cloud guy, with cloud person, where the open stack community can accept the evidence engineers, evidence communities? I'm going to confess here something that most of you don't know. I actually have a very bad hearing problem. I don't hear very well. So come on up here. Come on up here so I can hear you. I think your question is how do we encourage diversity within the open stack community? Yes, diversity with open stack communities. With other communities, got it. With the embedded communities, device communities. Device communities, okay. How do you get embedded device guys and cloud guys to work together? Thank you. See now, we're all working together already. Thank you very much. Okay, so what do you guys think about that? So I know there are several committee like one M2M, MQTT, all things. Those are committees. I think those committees are open. And I can say that for IBM in IoT, we participate in all those committees as well. That's intent is to have a good interaction between committees in device manufacturer, Silicon manufacturer and the IoT service provider. So that's the intent. But I think that also take lots of effort from more company, big, small, medium and the individual contributor and the open source committee to join to make sure we together build the best for our client really, for ourselves. Excellent. Thank you very much. Go ahead. We talked about ethical responsibility. My question is on social responsibility. We are talking about an explosion in the number of devices that are going to spread over the world. We are talking in billions. And what I suspect might happen is we have these embedded devices distributed and forgotten over time until they actually become a problem and when we have to clean up our environment. So unlike the routers and the switches and the storage devices we make that sit in the data center and that may have their own little recycling program that we can very closely control, these devices are going to come from a different paradigm. So I'm hoping that the companies that you all represent have a program from day one that it's part of the organic design from the start understand this nature of these devices that they are going to be out of control, forgotten. These devices, so no one is going to turn them in for any kind of a trade-in.  But I hope they are responsibly, socially responsibly designed so they don't pose a problem to the planet down the lane. I hope so too. We already see that kind of issue, but it looks like the key's got a point. Here's the flip side of that. Obviously it would be great for all companies to think green. Every time I see a styrofoam cup I cringe because why is there a styrofoam still? But thinking about devices, some of the cooler technologies that I was checking out as I was researching for this panel are actually around energy savings, water savings, things even data centers, farming. There's the sensors now in smart cities that go on light poles that can dynamically change lighting.  So I'm hoping that social responsibility will come up front in the sense that hopefully we'll be saving a ton of resources. Even something like using your Waze app, trying to figure out where to navigate through traffic. If you think about how much fossil fuels are burned getting from point A to point B, my hope is that you'll get a benefit from the Internet of Things devices sort of up front. And hopefully that will be followed up with some social responsibilities from the recycling programs. I think we've been training people to recycle other things. I think at the point at which there's so many chips in everything, maybe we can train them to recycle that as well. Yes, sir? Who's going to own all these devices? I mean they're all software driven. If the license expires or the company goes under, do they just brick it? And that just happened. That just happened with the Nest thermostats that they decided that they're going to discontinue that. And now Google has to pay like $239 to everybody who bought a Nest thermostat or something like that. But it's a good question. What's your opinions on that? Well, I think to both of our contributors who just mentioned, it's sort of the two halves of the same problem. There's going to be a real concern about how quickly these devices, what their service lifetime is, what do you do when it has reached its end of life either through the actions of the company, it's just an outdated device. And then to the contributors before, I don't think that we've wrapped our hands around the external costs that these businesses, when they create devices, how do we handle all the e-waste? Because the normal recycling programs, I don't think are really capable of handling some of these electronics that are being put into the stream. I don't think that they are. I agree with that. But in some respects, this is a different, this is an existing problem on a larger scale. I mean, raise your hand if at any time in the last five years, or not even five years, in the last two years you have bought Polaroid film. No, of course not. Nobody. So what happens to your Polaroid camera? Can't even sell it on eBay, nobody wants it. So this is a problem that we already have in that we're a consumer society and we consume devices that rely on other things and now we're relying on things that we can't hoard. But in a way it's good. I mean, if you are a equipment manufacturer, if you're NEST, you are going to strive to create the best experience for your users as you can. Because if not, you're out of a ton of money. And you're also probably going to try to figure out some kind of subscription-based model so that you have a sustainable business.  Because then you can run that thing for a lot longer than you probably otherwise would have. But then you've got a whole team of people that need to be contributing software-wise and pushing all those updates out to all the devices that you have. So in a way, it's almost a survival of the fittest. People are going to have to create really good technologies because if they don't, they're not going to get adopted. And I think the ones that are good, that emerge out of startup land are going to get acquired by the big companies. There you go. And we'll get to your question in one second. But here's my question. At what point do you think we're going to see generic devices that are all software-divined? I think you just got yourself a company idea and hopefully you'll get acquired by one of those big companies that, Nicky. Hear that, Mirantis? I've got other options. Sorry. That's where open APIs though are really beneficial to a lot of people, right? You know, you think about like a SmartThings Hub or some of the other technologies. If this then that, you know, these platforms that can talk to open APIs are huge. Iron.io. We just, the OpenSec Unlock podcast will be featuring Iron.io. See, I had to get a plug in there, too. Thank you. Okay, I think we're about done, but let's get your question. Actually, that was exactly what I was going to ask is that OpenStack is built on open APIs and they enable a service model economy by non-OEMs. How is that going to apply in the embedded market? Well, there you go. So anybody want to give last words before we kick that out? I had Jim Curry who, OpenStack was his idea. He won't take credit fully, but really smart guy and he was talking about that very thing about how OpenStack has actually kind of changed the way that especially enterprises look at open source software. And so my hope is that OpenStack and the success we've had as a community will be influential as people start thinking about creating these devices and making sure that they can be part of an integration engine via APIs. Any last words from anyone else? Go ahead. With all the risks and threats and security and data and all that, the projected market segment for IoT is in trillions and it's going to explode more. So I think we should all adapt and find ways to take care of the security issues and this is a great opportunity rather than a threat.


start recording. Good. So control structures. So control structures are the things that make code tick. So if you're writing code or if you're writing long scripts, then things happen not so much by variables, but things happen by things that are called control structures. So control structures come in like two variants. We have branching. So that means that a box can either go left or it can go right. And then we have looping. And looping means that a box kind of gets processed over and over again, or you get, you process boxes into different order. So you do that by using a while loop, a for loop, or a repeat statement in R. So an if statement. I used to have a switch statement here as well. I shortened it a little bit. I don't think that the switch statement is that useful to learn. But there's also a switch statement, which can do the same thing. So in this case, I am creating a variable called box, and I'm something put something in there, right? So I could create a box with a logical value in there, a box with a numerical value or a box with a character value. And now, for example, if I have code, which works on a character, for example, a function called write. So write is a function that only can take a character and I have a function called left, and this left function works on numeric values or logical values. So then I can just check the box. So I check if the class of the box using an if statement. So I say if the class of the box is equal to character, send the box to the right side. Else send the box to the function called left, right? So here you see how an if statement is structured. So you have the keyword if then you have round brackets. So everything between the round bracket will be evaluated into a logical value. So it will test if the class of the box is equal to character, and then it will send the box right, and otherwise it will send the box left. Of course, you can make multiple routes. There's also an rd else if statement. So that looks like this. So again, same code if class of the box is character, you send it to the right. Else if there has to be a space in between and then if else if the class of the box is equal to logical, send it to the middle function and else send call to call the left function with the variable box. So then based on the class of the box, and of course, you don't have to test based on the class of the box, you could also look into the box and see if the box contains five. So if box is is five, do something else, do something else with it. So if statements are kind of guiding boxes and doing logical testing. So if you have something like a for or a while statement where you do a whole bunch of things, then usually you have an if statement to process different things. All right. So of course, there's more comparison that can be done. So for example, a single number, you can ask if x is smaller than five, print x is smaller than five, you can test if x is smaller than y. And of course, this only works for single numbers. This doesn't work for vectors. And that's the thing in R. If you want to use a vector, then you can use the all or any keywords. So if all elements in x are smaller than five, then all the numbers are smaller than five. Or if any x smaller than five, that means that there is at least one number in x, which is smaller than five. And of course, these things become very complex. As soon as you start doing questions like if the sample that I'm looking at is a male and has a certain body weight, something then added to the matrix, right? So you can use if statements to really kind of make subsets of your data when you go through all of the rows in the matrix. So often this is combined with a for or a while loop. So for, while and repeat. So for example, I can put a thousand in the box. So I say box equals a thousand. So this means that it just has a value of a thousand. So then I'm saying for x in one to 10, right? So I'm just saying, well, make a vector one to 10. And then let x go through this vector one by one. And every time what I want to do is take x from the box and then save it back into box. So the first time that I go through this loop, x will be one. So I will take a thousand minus one is 999. The second time that I go through this loop, it is 999 minus two. So I end up with 997. The third time that I go through, it is x equals three. So it's 997 minus three is 994. So after I'm done, the box will contain a number and I will have subtracted the numbers one to 10. The sum of these numbers, I will have subtracted that from the box. You can do the same thing with a while loop. So for example, I put a thousand in the box. The nice thing about a for loop or about a while loop compared to a for loop. In a for loop you need to know the bounds. I can only go when I know from where to where I want to go. A while loop is more flexible. You don't have to know the bounds. So you don't have to say from one to ten, but you can do from anywhere. So repeat until something is true. So while something is true, continue doing it. But you don't have to know. So if you have a matrix and you don't know how many rows there will be, because sometimes there might be five rows, sometimes there might be 500, then you can use a while statement and then say, while I still have rows in my matrix left. But in this case, I'm just taking the same code that I had here in the for statement and now making a while statement out of it. So I have a box and now I have to define my own variable takeout, which is of course x. So this is equal to the x in the previous example. And then I say, while the takeout is smaller than or equal to ten, take my box, make it equal to the box that I had minus the value that I take out. And then in the next statement, I have to increase my takeout variable, right? Because here it automatically does that because x goes from one to ten and then goes through this loop ten times. But here, of course, I have to make takeout bigger. Otherwise, I would just continuously go and have an infinite loop. And I would just say box minus one is box. If I do not have this statement, then it would say again, box minus one, because the value takeout would never become bigger than ten. So hey, you have to be careful with while statements, because with while statements, you have a risk that you run into an infinite loop. So you just continue doing things forever and ever and ever. The repeat statement is in R. I never use the repeat statement. I always use a for loop or I use a while loop. So it is there. If you want to use it, feel free to use it. I never used it in all these years that I've been programming R. All right, so a little bit of an example, but it's more logical. So have, for example, here we define a variable called even, which contains all the even numbers from two to a hundred. So even numbers are numbers which are divisible by two. So we go from two to a hundred by two. So it contains two, four, six, and so on up until a hundred. And now I'm going to add up all the even numbers from two to a hundred. So I say for number in even. What do I want to do? So before I start adding up all these numbers, I define a variable called total. This will hold the answer. So now have for number in even. Total is total plus number. So the first time it will be total is total is zero plus two is two. The next step will be two plus four is six, and then six plus six is 12. And then it will continue like that. So it will just go through all the numbers in even, and it will just add them all up. Of course, you could have used the sum function in this case, so sum even. And then it would also tell you how many, what the sum is. But here you go through them one by one to make sure that, and you kind of know what a four statement is. So if statement, so I'm always using statement and expression wrong, but if you have an if thing, right, then the thing between the brackets is the statement. So a statement always, a statement in computer science always evaluates to a logical value. And then within the if, you have expressions. And the expressions are the things that, that do something. They change, for example, the variable, right? And statements can and will become complex. So you can have not a, so if not box is is one. So when the box does not contain one, do something, if the box is larger than one, and so you use the double and sign, box is smaller than a hundred, right? So in our, because this is a logical value, and this is a logical value, we don't want to say, well, both of them need to be true. So if true and true, then you do the expression. If you don't care about both of them, right? So if only one of them needs to be true, then you can do something like this where you say the horizontal line, so box smaller than or equal, if the box is smaller than or equal to zero, or the box is larger than a hundred, you do something, right? So this is the opposite of here, because here you're demanding that the variable box contains a value between one and, or between two, or larger than one, and smaller than a hundred. And here you're demanding the opposite. So the box needs to have something which is smaller or equal to zero, or it needs to have something in there which is larger or, no, well, not equal to a hundred. So a hundred will not compute here. Alright, so there's different comparisons operators in R, so you have is, is, which means equal to, you have not is, so exclamation mark is, which means not equal to, you have smaller than, larger than, smaller or equal to, or larger or equal to, and they are coded like this. So if you ever want to test a number in R, or then you can use this. Alright, so, and then we have a little bit of a difficult thing, because you have a vectorized and a non-vectorized version of the Boolean operators for AND and OR. So you have the single AND, single ampersand, and you have the double ampersand. So the same thing applies to the single horizontal line and the double horizontal line, which is the OR statement. The AND is vectorized, and it can be used for logical vectors. So if I have V1, right, and I have 1, 2, 3, 4, and 5 in V1, then I can use this single AND to say V1 smaller than 4 and V1 larger than 2. Right, so this only holds for the number 3. So if I do this statement, then R will say false, false, true, false, false. And this is of course very useful when you're taking a column from a matrix and saying, give me all the individuals, which are more than 20 days old and less than 40 days old, or give me all the plants, which have a weight of the plant, which is larger than 20 grams, but smaller than 1 kilogram. Right, so you can use the vectorized statement then. However, if you want to use the IF statement, right, so if you want to use IF statements, then you always need to use the double ampersand or the double horizontal line for the OR. So because this is not vectorized, it takes the first element from a vector and it only uses this first element. So true and false is of course false, but if I have a vector which contains true and false, and I ask true comma false and true, it will say true. Although one of these is false because this is not vectorized, it will just take the first element of this one and compare that and say, well, true and true and that's true. So it will also issue you a warning in this case. So if you use the non vectorized version on a vector, it will throw a warning and it will say something like error in statement, only the first element is used. It's not an error, it's just a warning. But when you see the warning, only use first element, then you have to, you probably are using a non vectorized version, while you should have actually used the vectorized version, or you forgot something else. So in IF statements, you need a single logical value. So the single ampersand and the single horizontal line should not be used and the IF statement will just take the first comparison. So you get this warning message in IF v1 or v1, the condition has length larger than one and only the first element will be used. So as soon as you see this warning message when you're writing an IF statement, then the IF statement is wrong because you're using the vectorized version, well, you should actually be using the non vectorized version. And then you have to make sure that v1 only contains a single number or a single value. All right, so what can you do with this? Well, you can use logical vectors as the index to another vector, right? So for example, here we create something called 10 to 1. So this is all the numbers from 10 to 1. And then we can say 10 to 1 smaller than 5, which is false, false, false, false, false, true, true, true, true. But we can use this directly into the vector. So we can use this to subset the vector 10 to 1 to get only the elements which are smaller than 5. So you can do this with matrices as well, right? So all of these things that work on vectors also work on matrices. So in matrices, it's much more logical. Normally, you have a big data frame. So you have, for example, five different measurements. So you have measured, for example, the body weight or the yield or the length of the tail or you've measured like the flowering time.  Then you can use the same structure. So you can use just the, you can take the column of the matrix and ask which elements are smaller than five and then use this as an index to the matrix. So do you want a little example of that? Because it's, I think it's, for me, it's very clear. But the thing is, is that when people start out programming, sometimes the most kind of things which, yeah, because I've got experience. So I know how to look at these things.  So, and the thing is, is with these logical vectors, they need to be of the same length. If not, they will start looping around without a warning. So if you say 10 to 1, c true comma false, and then this will cause, so it will look in 10 to 1, right? So which is 10, 10 is then true. So it will give you back 10. Then the next one is false or nine will get false. So you get only the even numbers here, which sometimes you want, sometimes you don't want. So make sure that when you're using a logical vector as an index, that it has the same length as the vector from which you are selecting. So, yeah, if you want an example about this, then I can show you an example, for example, on the microarray data that we have loaded in. All right, so the vector statements, you can combine these logical vectors to make an advanced selection in vector. So you can use, for example, the pairwise and or the pairwise or. So, all right, example, good, good, good, good. I like doing examples much more. So, all right. So we have this microarray data loaded, right? So just look at the microarray, let's take the microarray log and let's call this X, XA, for example, right? So if we look at XA and we look at the first five lines, then it looks like this, right? So there are six columns, five elements. So for example, imagine that I want to have all of the genes which are highly expressed in the first two samples, but low in the third sample, right? Then what I can do is I can say XA, so highly expressed is, for example, above 10. So I want to have XA, 1 being higher than 10, higher than 10. And XA, 2 also higher than 10, right? So high expressed in the first two. And I want it to be lower expressed in the third column. So lower than 10, right? So when I now press enter, for each of the elements it will do a test. So it will say if it's true or if it's false, right? So now when I use this, I can say, well, this is my subset vector, right? So this is the stuff that I want to subset from the matrix. So when I do subset, then now I can do XA and I can do subset and I'm only going to show you the first three columns and then it looks like this, right? So now you see that for every element that now is in my subset, I have a value higher than 10 in the first two and a value lower than 10 in the third column. So this is how you can kind of build up, right? And you could do the same thing with when you have males or females. So hey, you can make this as complex as you want. And when you make it, when you make this, right, and you do a subset like this, you could do it in one go. So you could, instead of storing it in a variable subset, you could take out a whole bunch of other stuff. And of course, if I want to know, generally when you do this, you put a witch surrounding it. And then which will give you back the indexes, so in this case the rows of XA for which this is true, and then you would store this in something which I always call II, which is the indexes for me. So I can now ask, for example, the length of II, and then this will tell me that out of the 22,000 probes on the array, there are 16,332 probes for which this is true. And then I could say, well, that's too many, right? I can't make a nice histogram. So let's make this a little bit more strict. And let's say that XA1 and 2 need to be higher than 11. And then I can ask for the length, and now I have 130 probes for which the first two samples are really high, and the third sample is really low. But now I can say, well, 130 is something that I can plot, right? So I can do XAII, and then I just say, well, give me a histogram of this thing for the first three rows, right? So I'm saying give me the first three columns, and then make a histogram, no, not a histogram, make a heat map. Right, and now you can see that indeed, the first two samples, which here by name, so it reorders them based on the box plot here, but you can see that it's high in these three, and it's low in these other ones. So it allows you to do very complex subsets in a single statement. So often when we are measuring like 3,000 mice at work, and then we only want to have mice, we want to have the measurements, which have been done at day 70. So after 10 weeks, and then we want to have the mice, which are having a weight, which is higher than something. And so you have to have like a whole bunch. So if you make them, if you have a big matrix, you often want to make it a little bit smaller, a little bit more manageable, because you want to look at only the males or only the females, and then only the males at day 70, or only the males at day 63. So these things can become really, really complex to make like subsets and selections. But that's kind of how I do it. Clear? Another example? More examples? Better example? You didn't like the example, like just, I'm here for you guys. So you said that you wanted to have an R lecture and learn more about programming. So that's, but yeah, this is kind of how you do this. And you can even use the R statement. Like if I want to have XR1 higher than 11, or XR2 higher than 11. And then of course, you could do something like this. Then you would get a whole bunch more, right? But something like this, like lower than 8 then. Yes, so now the first one or the second one is high. And then the third one is low. And in this case, of course, because I'm using an R statement and an N statement, I have to add another bracket because here we are dealing with the operator presidents of Boolean operators. But now if I ask the length of II, then now there's 43 of them. So I can then just show the first 43. And now you see that they're still high in one of the two, but they don't have to be high in all three, or in all two, although they're still high in all two, that just probably has something to do with the biology. All right, so back to the PowerPoint. So you can make these subsets, right? You can make these subsets on vectors, but also on matrices to select certain columns for having a certain value. That's my phone. I'm going to have to pick that up. Let me just mute myself for a second. PhD students, PhD students, can't live with them, can't live without them. So all right, so complex vector statements, and especially for matrices, these are really, really handy. The next one. Oh, I already had a slide about this. This works for matrices as well. But the example here is a little bit like it only uses a single column, but you can add more columns, right? So it's the same as the example that I just showed you. So M1 is a matrix. So I just put the numbers one to nine in the matrix. And then I say, well, give me everything for which column one is lower than three, by just taking the first column lower than three, and then making a subset. And I can also ask a single one. And then of course, it will give me back a vector. So can you get a list of probes ordered by value? Yeah, yeah, you can just sort or use order. So if you would go to R, right?  So here we have, for example, X, right? So this is not too much, right? You can see here that one of the two is high. The other one might be not high, but lower than 11. And then this one is low. And then imagine that I would want to order them by the column here, like GSM this one, I could just say, take this column, then sort, right? Sort will give me back the sorted numbers. But in this case, I don't want to have the numbers back, I want to have the indexes back, right? So I say sort, then say index.return is true. So now it will give me not only the ordering, so from low to high, but it will also tell me, well, the first element here, the lowest element is at position number 13. So you say that here it has something called IX. So I can then do SS, which is sorting results, or I can call it SR for sorting results. And then I can now do EXA, II, right? Because I already made a subset before I sorted it. And then from this, I can then do SR, dollar IX. So then take the subset of probes, for which this holds, and then order them by the sorting order that I just created. So if I would do something like this, then now I would get all of them, not the first three, just show the first three columns. And now you can see that the first column is ordered from lowest value to highest value. And the other columns are, of course, like reordered as well. And you can use sort, or you can use order. There's also an order function, which all only returns the indexes. But I like to use to sort explicitly. So something like this, right? So sort, hey, you could sort the entire matrix as well. Then I don't have to do the subset first. So now I just say sort everything by the first column. And then instead of doing II here, I could just do take the exa, sort them by II, then take, for example, the first column, and then plot them. So now it would show that all the values go from low to high in this matrix. So it sorts 22,000 really fast. So you can also order them by the numerical value. You could even order them by factor values, right? If you have males and females in the matrix, which are not ordered, then you could say, well, first, give me the males and then give me the females. So you could do something like that as well. Back to the PowerPoint. So matrices are just like vectors, you can use the same kind of subset selection on it. So some special control structures, which you don't really use a lot. But when you're writing code, which is getting used by other people, you write a lot of these. So you saw that are sometimes issues of warning. So a warning you can do by the statement warning. So if X is smaller or smaller than zero, right, if you wrote your algorithm and your algorithm might not function properly with values lower than zero, and then you can issue a warning to the user saying that this might go horribly wrong, or this might be, so hey, I suspect that you did something wrong. If you write an algorithm and your algorithm cannot deal with negative numbers, right, like the square root function, then you can just throw an error. So an error would be in ours called stop. So it's the stop function. And then you call it and then it breaks execution at that point. There's also the try catch statement. So you might want to do stuff which gives you an error sometimes. So when there is an error, it will still continue. One of the things which I do this with is if you have, for example, a microarray data set and you're doing a t-test between one group and another group, right? So the t-test needs at least three values to work. But sometimes, because it's a microarray, there are missing values, right? So for each line, there might be, sometimes there might be five versus five, sometimes there might be five versus four, sometimes there might be five versus three, sometimes there might be five versus two, because there's just three missing values. But the five versus two test will throw an error in the t-test. So then I write a try catch surrounding it to make sure that when the t-test throws an error, I just put in an NA, right? Because I do want to do everything. I don't want to stop halfway through and then say, okay, but this one I cannot test, so I should remove it. But I don't do that. So then I just write a try catch expression to kind of slurp up errors. But for you guys, if you're starting out programmers, it's not that important to know how to use a try catch. You generally want to use a try catch when you're writing code for other people. All right, so a little bit of an overview. So variables in control structures, like I told you, variables are boxes, or at least in my mind, control structures manage program flow. So you have branching, which are if statements and switches. And you have loops, which are for a while. And then you have warnings and errors. And this is more or less everything that you need to write a full operating system, right? You don't need anything more. If you have branching, looping, and data input and output, like using the retable function and the right table function, then you have all the tools that you need to write anything that you want. Because all of the code in R that you see is buildup of these basic blocks. Well, there's actually one block that I didn't tell you about. And I don't know if I put it in. But I did want to show you some of the advanced looping. So we use the apply function, right in the previous assignment. So you have the L apply for applying to a vector or a list. So this is L apply to the vector of the list, a certain function. And then you can add this dot dot dot. And these dots here are additional parameters. So for example, let's go to R. So to show you an example of the L apply function. So imagine that I have a vector which is containing one, six, seven, so just some numbers, right? So I have V. And now I want to L apply to V this function plus. And in this case, I have to quote the plus otherwise it will be a syntax error. And then I want to add eight to everything, right? So now it will give me back every number in V. But now increased by eight. You can make this more complex. You can you can you can make other functions. But you could, for example, apply the mean function to this list, right? And then it will tell you well in every time you would just get the same numbers back because of course V only contains one element, right? So it will take the first element of V. So which is one and it will calculate the mean of one. It will take the second element of V, which is six and will contain and calculate the mean. So this is not that useful. But if you would have a vector, right? So if I would have a list, if I would have a list with V and V, and I would call that AA, right? So now I would have a list with two two little vectors in there, right? So now I could use this L apply again to calculate the mean. And now it will calculate the mean of the first row. And it will calculate the mean of the second row, which is just five and five. So the L apply function just takes a vector or a list and then for every element in the list or in the vector does the exact same thing. So in this case, the mean function. But you can also just use the plus function to add stuff to each element in the list, which is of course, it's not a very useful example, but it's something that I hope helps you understand how it works. So the apply function on the matrix is more or less the same, but now it does it by the rows or it does it by the columns. So you have this margin. So you can say repeat a function to each row or column in a matrix. And this could, for example, be the t test function, right? I could say apply to the matrix to the rows, the function t test. And then I have to specify which things I want to test against which. So I have to add some parameters to the t test. But then you can use the apply function. And you can use margin to see one to to indicate both rows and columns. I never use this. So forget about the last one. Always apply across rows or across columns. This one, it has its usefulness, but I've never used it. So just forget about that one. So I'll apply a little example. I, for example, a list from one to five. And then here you have DNA. So hey, I can apply to my list mean. But then you see that the DNA propagates. So the DNA from this second list will cause the second mean to be NA. So I can add additional parameters to the function. So these parameters will be given to the mean function when it calculates the mean. So in this case, I'm instructing the mean function to ignore NA's. And then it will calculate a mean for the second list as well. And yeah, apply an example. So if I have my matrix, which is a matrix of one to 50, 10 rows, five columns. So here the columns went to the next line. So forget about this one. This should be here in the back. So I can apply to the matrix to the rows, the means. So then it will compute the means of each of the row. And I can apply to my matrix the means of each of the columns. And then it will use the column means. So it will calculate the mean for each of the columns. So mean of the rows means of the columns. All right. So why use L apply and apply, they are almost always more efficient speed wise, because they can use vectorization. They can be up to like 100 times faster than just using a for loop. But they are memory wise, much, much faster. And of course, when you use aromatic functions, like the plus, then you should quote them, because otherwise it's a it's a syntax error. Because are just reads the syntax. And if you don't do the plus, then if you don't quote the plus, then it will just see the plus as being one to two comma plus comma five. And then that does not compute. All right. So L apply and apply will normally give back a list. You can use the unlist function to get a vector, right? If you saw here, when we did the plus here, then you see that it gets a list. So it's a list, which at the first element contains one number at second element contains one number. So there's a vector with one element in here, there's a vector in one element in here. And then you want to use the unlist function to get back a vector which contains the means. So the unlist, you can use to go from having a list with singular elements in each of the list to having a vector again. And unless there's a very powerful, very powerful command, you can do a whole bunch of stuff with unlist. And it helps you to parse through big data sets very quickly. All right, a little bit of an overview for brackets, right? So the round brackets you use when you call a function, and you use it when you do a control structure statement, like in the if statement, right? So then you use round brackets. You use the square brackets when you index a vector, a matrix or a data frame. You use the double square bracket when you index a list. And you use the curly brackets when you define a block of code. For example, when you surround multiple expressions, when you have what belongs to the if statement. So where does the if begin, where does the if end, then this is surrounded by the curly brackets. And it's also when you build functions that you use these curly brackets. So just for you guys in an overview slide so that you know when to use which bracket. So if you want to call a function, round brackets, if you want to index a vector, a matrix or a data frame, square brackets, when you want to index a list, double square brackets, and the curly brackets for when you are doing code surrounding it. So which code belongs to each other. All right, and then the last section for today is escaping the inevitable. So about strings, they are enclosed by the double floaty air comma thingy or the single floaty air comma thingy. If you want to combine two strings together, you can use paste. If you want to print a certain character string to the screen, you can use print. And if you want to print them to anywhere like to the screen or to a file on your hard drive, you can use the cut function. So I always prefer to use the cut function. I almost never use the print function. But the paste function, I use a lot when you have multiple strings and you want to kind of combine them together in a single one. However, of course, if you forget to close the double air quote in a string, then you, which happens a lot, then no command you will produce an output, right?  So if you have a larger than symbol, then that means that you are typing in a command. But in R when you get a plus symbol, right? So you type in five plus five, and it doesn't give you an answer. Then that is because my string was not closed, right? Because I opened up a string, which I forgot to close. So then this goes into the string. So you can press the stop button at the top of the R window to stop the execution at that point. And then it will break the input for the string. So for example, I can print things to a screen using print when I paste together hello and world. So hello and world will then go to the screen. If I want to save hello world to a file, I can do cut paste because I want to combine hello and world into one string. And then I want to use the cut function to write it to a file called out.txt. So this will make a new file, clear the whole file, and then put the words hello and world in there. If we want to print the double air quote, which you sometimes might want to do, printing the air quote to the, we need to escape the character. So some characters that need to escape are, for example, quotes, new lines, tabs, backslashes, and the backspace character. So these are all characters that you can use and that you might want to print to the screen or to the file, and you'd have to escape them by putting a backslash in front of it. So if I want to type, for example, let's go to R. I don't think that I have an example for this. But when I have, for example, a, so if I say cut, this is a slash, and then I want to print a slash, right? Then if I do this, then I now unescape this one. So you get the plus symbol, so I did something wrong. But if I want to, so this I can print, right? But if I want to print the slash, I have to use a double slash. Then it prints the backslash character. If I want to put a new line at the end, right? You see that it prints it, and then it just continues on on the same line. Then I have to say slash n, which is a new line symbol. So now it prints this as a slash and then puts an enter there. I can also use the backslash character. So I can use b, b, b, and then it says this, this I slash, right? Because now it just presses the backspace characters three times here. So it will delete the a, delete the space, delete the s. So you can do fun things with this. But the escaping is necessary. And of course, it is very necessary when you want to print something like she said, double point, double point, and then I want to use something between quotes. So I have to escape this like this. And now it prints out she said, double point, high, right? So you have to, because otherwise you would close the string by using this. So if you want to print that, then you have to put a backslash in front of it just to escape the inevitable string stuff. All right. So there's many. You can have the slash t for tabs, new lines. You have the backslash and the backspace. These all need to be escaped. When you use cut, we print verbatim. That means that you have to make sure to add a new end of line element. Otherwise r continues on the same line like I showed you. And we can use a separator command when we want to separate elements when we use cut. So I could use hello world with a new line separators comma, then it will print hello comma world. You can use space as a separator, but you can also use a minus as a separator. So then the separator allows you to put things together. So often I used it when I put like row names. So individual one, individual two, individual three, I just say, paste individual comma, one to 10 comma separator is and then no separator. All right. Last one, some randomness. So if you want to get a random number in R, you can just always use four. But there are several distributions in R. So you have, for example, the uniform distribution. So every value has the same chance of being drawn. It's done by the Rene function, so R uniform. So R uniform will draw a number between zero and one. And every number has the same chance of being selected. We have the Gaussian distribution, also called the normal distribution. And this is done by the R norm function in R. So this will, if you draw like a 10,000 or 100,000 numbers, then it, when you do a histogram of that, it will look like a perfect, perfect normal distribution. You also have the Poisson distribution. So the Poisson distribution is very famous in biology because it occurs everywhere. And, of course, the Poisson distribution is based on whole numbers. So the amount of bees on a flower follows a Poisson distribution, right? Usually, there are no bees on a flower. Sometimes there's one. Sometimes there's two. But it's very unlikely to find like 10 or 20 bees on a flower. So it's a Poisson distribution where there's a high likelihood of getting numbers which are either zero, one or two. But then from then on, the numbers start kind of exponentially going down. So the chance of drawing a number which is like 50, the chance of finding 50 bees on a single flower is, of course, very, very small while finding one of two is relatively high. So zero, one or two is relatively high. So Poisson distributions. And you can do that in R by using the R poise function to draw a number from the Poisson distribution. If you need repeatable randomness, you have to set a seed. So otherwise, if you start R, it will set the seed based on the current time. So every time you will draw different random numbers. But if you want to have a repeat, so if you want to draw the same random numbers as before, then you can set your seed to a number, draw some random numbers. So in this case, I draw five uniform numbers between zero and one, and I round them. So I draw one, one, one, two, zero. If I set my seed to two and then do the same thing, then I draw a different amount of numbers. But if I set my seed back to one and then draw again five numbers between zero and two, then I get the exact same as that I did before. So because you want to have repeatable research, often your scripts need to have repeatable randomness as well. All right. So that was it for today, I think. So clean and reusable code just wanted to remind you. Programming is like working in a lab. Make sure you work cleanly and neatly. Code goes into a directory. Input data goes into another directory, and output data goes into another directory. You always want to keep these three things separate from each other, because the input data, you never want to override it by accident. So that's why the input and the output data go into two different folders on your hard drive. Code goes into a separate directory because you don't want to override your code from your script. So make sure that you think of speaking names for variables and functions. So I, I, of course, is not a very good variable name. So think of like microarray, microarray log, microarray log QNorm. Speaking names, the name should mean or should represent what you put in there, if you name a variable. You, you always want to use indentation when you are using blocks, and you have to align your comments on the end of a script, because it just looks better. And this also makes the code much more readable for others. So here I have a function, which is mySum, which takes some input. It goes, hey, it counts up. So it adds all of the numbers together, and then it returns the count. But you see every time that they open up a curly bracket, I then put the stuff inside of the curly bracket with two spaces or a tab. Use spaces. People who use spaces in programming earn more money than people who use tabs. I don't know why it's a research by Stack Overflow, but it's a very significant difference. It's around 10,000 euros a year more when you use spaces compared to people who use tabs, even when you use the exact same language. So looking at people like Java programmers or C programmers, they, of course, there's a difference in income, but there's a major difference between income if you use spaces and program Java, or if you use tabs and you use Java. And of course, him make code readable for others. So add comments, explain what the code is doing and why it's working in the way that it should work. 503. So just a little bit over time. I hope that there's still people listening, like we didn't have much interaction in the last couple of minutes, but that was it for today. The homework for today, I did not make yet. I told you that I was kind of arguing with one of my PhD students this morning, and that's the same one that just called on the phone as well. So I will put it on Moodle tomorrow. When I put my presentation on Moodle, I will also put the homework. I will at least make sure that it's before Friday 5, because then I'm going home. So don't look at Moodle yet. Don't start mailing me like, oh, the homework is not there. The homework will come. There is some homework in R. I just wasn't able to sort it all out, because I want the homework to kind of align with the lecture, and I changed the lecture a lot, or at least I put two lectures together. All right, are there any questions, comments, ask me anything, speak now or forever, be silent? I don't know what people say nowadays. So yeah, if you come up with a good question, that's really nice. If you don't have any questions, then how to use different directories? Well, using the set working directory. So you just, so what I do is, I told you that I always start with a set working directory, right? So I set my working directory, read in the input files, and then I have a set working directory to another location to write the output files. Yeah, so it would be, so if I would look at code, so let's get a window, so let's use a notepad plus plus window for this. So I have my header, then I have set working directory, and then I set C double point slash input slash files slash where they, and then I load. So I do a couple of tables, right? So I read table, so I read in table one dot txt, and I store this in V one. And then I do this a couple of times, right? So I read all of the things that I need. And then I do another, and then I say output files, where are they? And then from then on, when I do a write table, I can now never overwrite one of the input tables, just to make sure that I never touch them. So I always have like a set working directory at the beginning to go to where the input is. Sometimes I actually have an additional one, which is where my scripts are located. So I have something like this, and then I do, because you can load our scripts like this. So I generally have like a functions R script where I put all my functions. So then I load that first. So I go to where my scripts are located. I source the scripts that I need. Then I set the where directory to where my input files are. I load my input files, and then I set my working directory to where I want the output files to be, and then I write them. So this is a very common structure that I have in all of my coding files is just go to where the scripts are, load the scripts, go to where the input is, load the input, go to where the output is, and then write. And of course, the code is here, right? So hey, here you would have the code to analyze everything, right? Because the code to analyze goes here. More questions. Do you want to do a headcount of how many people are still awake? Is my moderator still awake? Oh, just as Sara has redeemed the highlighting message. Oh yeah, you can earn channel points. That's true. That's true. You can you can highlight your message to make it stand out more.  So I totally forgot about that. We could actually do a commercial break now just before we finish the stream. So my moderator is also still awake. So that's good. That's good. All right. So let's see who else is in the chat. So Alexander should still be here. Damn, there's such a lot of bots in here. Bing Cortana, casino tanks, clear your browser history, troop dog, extra more, ice wizards. Oh, that's a nice name. Joint effort. Katharina Fernando Rosenthal is also here. Let's do this music. Let's do this whole stuff. Maybe I look out of this window. Strow here. So Max actually joined. He didn't say anything, but he joined. Oh, you have 1.6k channel points and counting. Oh, that's really nice. I have infinite channel points for my own channel. It actually has the infinite symbol there, which I don't know what I can do with it. Why would I use channel points? Oh, they come with the affiliate status. Yeah, the channel points. Yeah, they're affiliate. So you earn channel points by just watching me and listening. All right. So are there any more questions? Any more questions? Any more questions? Oh, Max is just collecting the, yeah, that's probably what he's doing here. I think he actually earns them even faster than the normal viewers because he's actually a Amazon prized prime Twitch subscriber thingy. I mean, the bots come with the status. Yeah, that's true. Yeah, they're just watching me. All right, Alexander, thanks. Thanks for watching. Choose. Let's come with the status. There's nine people watching, so there's no real status attached to that. It's just funny to see that the user list is like 20 people long and there's like only nine viewers listed. All right, so if there's no more questions, then I am going to wrap it up. Thank you all for watching. Thanks for the questions. Thanks for the joining and at least trying to answer some of the questions. And next week we will have proteins. So I will see you all next week. Then bye-bye.


show mapping fault lines where we discussed major geopolitical issues across the world. Today we're going to be talking about an issue which has caused quite a bit of uproar in European circles among the allies of the United States at least. And this pertains to revelations that came out on the 31st of May in a variety of European press organizations that the US had spied on its own allies, surprise. And they did this, of course, with the help of the Danish government, the Danish intelligence agency, which is called FE. And it involved the use of undersea cables. So basically the information says that the United States spied on Germany's chancellor Angela Merkel, the leader of the opposition in Germany, as well as politicians and other figures in France, in Norway, in Sweden, in the Netherlands, etc. So we have with us, Praveen Prakas, I'll talk about this. Praveen, could you just maybe first take us through the technicalities involved in this issue? Because how exactly did the US use Denmark to spy on the leader of Germany, who is probably one of the most powerful political personalities in Europe? I don't want to make it about how they were spying on the leaders in Germany, the leaders of their allies and so on. The issue is really much bigger than that, which is that you have mass surveillance, where everybody is presumed to be somebody who's a criminal. And the onus of the proof that you're not a criminal is after they have seen all your communication scans through it, then they decide you're not a person of interest. So that's the assumption of the mass surveillance program. And the Snowden regulations made it clear that we have a mass surveillance program, not only in the United States, domestically, but also externally. And that program covers almost all parts of the world. This particular program has become public now with respect to Denmark, but it was public with respect to, for instance, NSA and GCHQ of the UK. And that was that all communication from other places which come to UK, because it's one of the major internet hubs in terms of the undersea cables, submarine cables, which come and have to land somewhere before going further. And if you look at the map of the undersea cables, submarine cables, you'll see that both from the United States, North America, South America, and from Africa, as well as from Asia, UK is a major hub. All those cables seem to land up in UK. So why was Denmark a similar hub? It's something we have to understand. Again, if you look at the map, you will see Denmark connects not only to Germany, Holland, and so on, but it also connects. And this is where the real interest from the United States lay. It also connects to the other European countries, as well as to Russia and further east. So Denmark is, and this is something we didn't realize that well, is a major also hub of internet cables. And this hub business makes it therefore possible to survey everybody's communication which passes to that hub. I think that's the important takeaway from this. The focus is how dare they spy on leaders of the allies? The question is they're spying on everybody, including the leaders of the allies. And of course, on their own people. In fact, they've spied on their own government. This is the astounding information that we have, that they're not only spying on friendly governments, they also spied on their own governments. Therefore, essentially the Danish intelligence agency was working on behalf of NSA against other allies and also against its own government. That's, I think, a big issue that at least should concern the Danish people. The issue is not restricted to hear this alone. That fact, it was known from 2013 that this has been going on and it has taken this law for the government to react. And that's the other part of the story that they did internally. Know about this. They came to know about this as soon as Northern revelations were there. They did set up an internal committee to see what's happening within the intelligence agency. Concerned after the report came, they were aware of the fact that this not only spied on people outside the country, allies, but they were also spying on their own government and their own people and passing this information to NSA. All this was known within the intelligence agency. But, however, the intelligence agency chiefs, one of whom became later on equivalent of the home secretary in government of India. So he became essentially the bureaucrat heading the entire police intelligence operations within the country. He also did not pass this information, apparently, to his superiors or if he did, they did also do no action on it. I find it very difficult to believe this information was not shared with the then government authorities. I'm sure they were because all civil servants protect themselves. So they're not going to not have any protection in this course, not having given this information to the superiors. But again, no action was taken. Denmark thought it's a small country. There's a price to be paid to be at the US high table and that they're also spying on their own people and of course on their allies. Now, interestingly enough, the anger that has come is more because it's about the leaders being spied on, not that there is a mass surveillance program which involves spying on its own citizens as well as other state citizens. And of course, somebody, the other people who are not at the table of God, not being discussed at all, that any cable passing to Denmark, therefore from other countries and all the communication thereof was therefore also being broken into and being also snooped upon. So this mass surveillance issue, which is what's not embraced. It was not about private surveillance of Angela Merkel and so on. It's really about mass surveillance. That is still the issue that has to gain focus. And recently an European court, EU court has passed a judgment. I think it's an European court which has passed a judgment which says mass surveillance per se is not legal. But the way it has also done it, the judgment is quite weak. In fact, it allows for it to take place, but with certain restrictions, certain safeguards and so on and an external body which will monitor what is being done, all these checks and balances as we have found do not really work. And all these checks and balances are in some, in this sense, relatively, you know, making a pretence that we are actually having checks and balances while in actual reality, they do not. So it has held, in fact, the GCHQ program in the because of the proportionality ABCD reasons. Again, I'm not a legal person. So I'm not, I'm not going to the legal part of the judgment. But I think these are very important issues that what we should bring out is not just the question of the spine on their allies, which I don't see as any different from spine on the rest of the world. The allies may take amrige at that. They may be unhappy that you are my friend and you spied on me. The point is spine not permission on the whole world is by itself something which we have to take on a completely different plane. And that's really the mass surveillance of states, both of its citizens and of people who incidentally, your communication passes through a particular country. That means my community in the US passes to UK or Denmark, then that is open game. Of course, if it passes to US through US, it is open game for us. So those are the issues that I think we need to think about globally, because all governments seem to be moving today in terms of mass surveillance, including the Indian government. So it's not something which is not that we're not addressing. We need to address those issues as well. And as you know, the WhatsApp encryption weakening the government of India is demanding or really ending into encryption as far as state is concerned, also falls into the bracket, give us right to all communications. And I think that's the real issue that we have to think about. Absolutely. And this comes actually just a year or so after the revelations of how crypto AG had been used over the decades, incidentally, where the Americans worked in collaboration with the Germans to spy on the rest of the world. And now ironically, we have a situation where the Germans were spied on using the Danish. That's an interesting issue because crypto AG was used to break all the communication which people thought was secure within each government. So when governments communicate with their embassies, for instance, or they communicate with their teams, which go to international negotiations, then they use cryptographic modes of communication. And this was really originally done by using hardware, that you had hardware on both sides. And therefore, you could talk to each other. The Swiss company, crypto AG, because Switzerland has history of being independent in terms of not being aligned to blocks. Therefore, it was considered neutral. Most people took Swiss neutrality on phase value and at phase value and decided too that therefore the crypto equipment would also be safe. So the first surveillance, not mass surveillance, but surveillance of breaking cryptographic encryption of government to government communication or internal government communications. This was done essentially by, of course, the CIA as well as at the time, the German intelligence agency worked together. They in fact had bought crypto AG effectively. And as owners of the company, they had access to everything crypto AG was doing. And as we know, again, the German intelligence was sharing what the Americans were doing. Again, spying on their allies. This is one of the issues that had come up on the crypto AG that the Germans were also party to essentially spying on their fellow governments. They were unhappy about it in terms of internally, they had some disquiet about it, but they went along with it before pulling out finally from the crypto AG itself. But the point is Germany claimed today that this is very wrong because you spied on us also then makes a question, what were you doing for all the years? And you know, it's not just spying on your allies. The issue is that you spied on the whole world's internal communication of governments. And this is something which I think goes beyond simple spying for your self interest. I think these are things which are of a different order. But at the same time, we have to say mass surveillance is a completely different volume altogether. And therefore, you could still say it is legitimate to spy on governments. But is it legitimate to spy on citizens, your own citizens and other country's citizens, just because a cable passes to your country, I think is a much larger issue. And I think the issue is the focus should really be on the issue of mass surveillance here. And that's why the government to governments find that each government spies on other governments is something which is yes, if you do it in allies within your own quote unquote alliances, if you spy on your friends, it is something which is to be condemned by those countries. But as far as we are concerned, if we are not in an alliance, I still am bothered about the fact that my encryption as a country, my encryption, all my communication was broken. And that was known that I say, see, I had access to this information, just as a German state. And this is something which countries should have protested. But as you know, none of the countries who are known to have been affected by this, including India, actually officially protested to the US government. Or if they did, we don't know about it. Prabhir, finally, just returning to a point you had hinted at earlier, of course, the Danish issue is just one. It is obviously quite likely that there are many other relationships that are there, we just still undergo, we just still hid it. And you mentioned something about how this is not only of course, only about the US allies in Western Europe, but also about Eastern Europe and potentially Russia as well. So in light of the global cable map, how do we see the possibilities or risks over here? Yeah, I think we need to look at also not only the undersea cables, but also what are the other cabling that is there? You know, it's always been of interest to me or a question mark for me, why is Estonia so important? For instance, the United States calculations, you can always see that Estonia has a very special place in all of this. And they have been backed by various agencies to digitize their economy, digitize everything that they do. I suspect that one of the reasons why this close relationship exists between the United States and Estonia is also to do with what is a kind of mass surveillance that's been carried out beyond the borders of Estonia itself. So it becomes a local hub, just as Denmark is a local hub between the Nordic countries and Holland and Germany and Denmark itself. It's a local hub, but there's a larger impact of Denmark because it's also a hub for a lot of other internet traffic that comes from Eastern Europe, Central Asia, even China, if it is not coming to the undersea cables. A lot of it may go to Denmark. Similarly, Estonia is a local hub. So we have to look at some of these issues now that we have found that Denmark would seem to be a rather innocuous small country tucked away somewhere among the Nordic countries. And its only claim to fame had been about really as raiders, the names of famous raiders just as the Nordic countries were. So apart from that, we didn't know much about what they do or they do not do. Suddenly we find that they were an important player in this masterpin scheme of the United States. So I have a suspicion now that we need to look at some of the other countries as well and what is the role they're playing in all of this. So I think this is not to be taken just as Denmark and GCHQ. I think there are more hubs than we know about. We know about Australia, we know about New Zealand, but they don't have the density of cabling or connections that for instance Europe has. We also need to look at, for instance, other countries in Southeast Asia quite closely having lost Philippines Marcos after Marcos left, Philippines has not been a stable ally. What are the new allies and what is the role of mass surveillance using some of these allies? I think it's something we need to look at. Thank you so much for you for talking to us. That's all we have time for today. Keep watching this.