clude drama music arts dance there's something there for every young person what we've got to try and do is to ensure that we offer that opportunity equally i think it'd be fair to say that cashback might also be a victim of its own success we would love to fund everything but we can't we are constrained by the limits and what money we have and there will be organisations that have made representations to me who are disappointed and i'm disappointed that i have to disappoint them but we have to go with the funds that are currently with us but we do seek to broaden them out and spread them across equally as jorda adamans and others have made and indeed it came again across from the chamber there are other ideas and we're happy to take them on board to see what we can do because more funding will come in and we do always seek to have projects that we can pull down so to speak from the shelf if we do get a windfall project and that was done previously money from the weir group or money from the abbot group and it's a commitment that we make to many organisations at the present if we cannot fund them and we think that they are worthwhile then what we do is seek to have them there on the shelf if a windfall comes in then we can seek to deliver it i think there's been two specific parts of the debate i need to comment on first about the cashback funding formula where the money goes perhaps raised initially by Duncan McNeill but also proceeds of crime aspect are i'll be happy to refer to both Margaret Mitchell and as I say Annabelle Goldie in terms of the funding let me be quite clear it's stated there in the table that Duncan McNeill was referring to it at 3 11 to number one area funded as James Dornan pointed out the city of Glasgow with over five million then it's the city of Edinburgh with just under four million then it's north Lanarkshire with just over two million and then we're down to Dundee with almost one and three quarter million followed by other areas Duncan McNeill was referring to the percentage i think of 10 000 population and where money goes i would refer on to paragraph 3.14 the figure show that relative expenditure has been higher in the island authorities and a number of predominantly rural authorities have also received above average expenditure based on the population of young people there are some rural areas by all means mail reading of the of the the evaluation to say that you've just read out what the evaluation said but the question that Bruce Crawford raised was sharing my puzzlement about why it should be so high and there is no explanation in this evaluation about why it should be higher in these areas what we have said and made quite clear there are some rural areas that do have a relatively high young population equally there are other rural areas in particular the islands where there is a significant cost that goes with running an event and i think it was Bruce Crawford that alluded to that it was in fact when i visited areas such as the western aisles that they made representations that for example to run a football event in greenock or indeed in eastern Edinburgh is an awful lot cheaper than running one in the western aisles where by very nature of the peripherality and neurality you're required to bus kids in i've no doubt that will be exactly the same in some areas that Elaine Murray represents so we have to accept and recognise and not at the moment let me let me make this point we have to accept and recognise that there is a rurality cost there is a peripherality cost and that's why we recognise it not simply with the island communities that we have in scotland but indeed rural communities both in the north south and other areas of scotland they should not be prejudiced because they do not have the funding wherewithal to provide what can be done at a significantly cheaper cost in an urban area whether it's eastern Edinburgh or greenock putrisha ferguson i'm grateful to the cabinet secretary for taking the intervention and i can absolutely accept that there will be issues of rurality that have to come into play but where in that document does it show you where the issues of deprivation come into play because surely it's harder with more young people in a more deprived area than it is in an area without those issues cabinet secretary from the areas and the money that we put in that we take that into account what we're quite clear and what we're not prepared to do is to end up with any means testing where a youngster is told that they cannot participate because they are not viewed as deprived enough or having to have people apply so we factor in and make sure that those areas with multimodal deprivation blighted by crime get that additional benefit equally i take issue and disagree vehemently with Duncan McNeill that somehow or other we are spreading the jam thin i think every child in scotland whether they live in an island in shetland whether they live in an urban area in central scotland is entitled to participate in these things and we will not impose a postcode lottery that youngsters will say will be precluded will be precluded so that as i say i think deals with that aspect let me deal with the second aspect and say that we're happy to engage and as i said i said that prior to the meeting with with Margaret Mitchell i'm happy to try and engage and sure because i think we can actually work together yes we have been taking money seized from the proceeds of crime and money has been put back in that is as Bruce Crawford mentioned it's about speculating to him cumulokly the money that went in has gone in for example into forensic accountants because i think both Margaret Mitchell and Annabelle Goldie a lot of this is about dealing with the money trail i think Margaret Mitchell meets a good point about those who are involved in a repeated high level thefts in shoplifting but equal a lot of this is about serious organised crime as i think it was Elaine Murray it may have Patricia Ferguson rather who was reading about an advert where people can afford to have the best accountants and the best lawyers to try and hide the assets that they have taken to launder money that they have made through drugs or anything so we make sure that we employ forensic accountants many of them are not police officers many of them are civilian staff and they do a remarkably good job so that say that's where we come from in that as was mentioned i think by Annabelle Goldie there is a hierarchy in terms of where we come from the crowd are quite clear that initially they will look to prosecute that is the right thing to do we're not prepared to consider going as some other jurisdictions not too far from here where quite often it can appear that perhaps people can make a deal and pay almost a tax or levy so the principal matter here if there is a offending and criminality number one it will be sought to be prosecuted equally if we can recover from them we will also seek to do so if there are instances where because the standard of proof we cannot get proof beyond reasonable doubt any criminal matter but it's quite clear by their lifestyle then we can take it then we will pursue thereafter equally in terms of the serious organised crime task force by all means cabinet secretary a very brief intervention can the cabinet secretary reassure the chamber that the scottish government is not proceeding to a situation where police scotland can expect an automatic annual dividend from the proceeds of crime cabinet secretary i can give the member that assurance i think there's good reason for that not only would it be the wrong thing to do i think it's also the case that it actually could be subject to challenge under ech r and there are some i think suggestions that there may be issues south of the border and we've never gone there so i can give her that assurance and as was mentioned the priority here is first of all to fund the cash back scheme second as agreed by the task force whether it's for forensic accountants whether it's for the crown and procreator fiscal office whether it's for police it may even be for the scottish prison service or indeed for other organisations because round the round the serious organised crime task force organizations as diverse as sifa solace and indeed other say representing local authorities so we're looking to do and take what can be best done so if we can speculate to accumulate with any organization we will do so but the decision will be made by the task force if above that there are money still available then we're happy to look at community projects but rather than denigrate the chief constable can i be quite clear i think the proceeds of crime have benefited from chief constable house he is the one that has put it to me that there has been a change in how police have dealt with there was time and perhaps when officers would have gone in and perhaps arrested and detained the drug dealer and taken the bag of white powder as evidence now it's quite police officers not simply those who are going in but those who are investigating those who are community bodies are also looking at assets if as well as detaining the accused they have a lifestyle they have the Rolex they have the plasma screen they have the BMW and all of these things at hard working law abiding people paying their taxes don't have then let's look about seizing them it's about making sure that through crime stoppers that people who are living well beyond their means who are praying off our communities are reported and indeed dealt with by all means very very briefly i'm very grateful to the cabinet secretary does he understand however given the concerns that have been expressed about the funding source from proceeds of crime that you actually challenge the integrity of of why officers and prosecutors operate given an interest in generating income rather than the pursuit of justice and whether that perception is accurate or otherwise we need to be alive to it it's a strange interpretation of brief current secretary brief i've been very brief i gave the assurance to Annabelle Goldie and i reiterate that i think what the chief constable is quite right is to make sure that everybody realises that serious organised crime is our business it's entirely unacceptable and i simply move the motion in my name saying that cashback has been a remarkably good scheme and it will continue to serve the young people of scotland remarkably well thank you that concludes the debate on cashback for communities the next site of business is consideration of motion number 10284 in the name of Richard Lochhead on a public bodies consent motion public bodies abolition of food from britain order 2014 UK legislation and a column Richard Lochhead to move the motion cabinet secretary formally moved the question this motion will be put at decision time the next site of business is consideration of two motions in the name of Stuart Stevenson on behalf of the standards procedures and public appointments committee members who wish to speak in the debate should press a request speak button now the first is motion number 10243 on hybrid bills i call on Stuart Stevenson to speak to and move the motion Stuart Stevenson thank you very much presiding officer i'm of course proud to have been the minister who introduced the fourth crossing bill the first and only hybrid bill considered by this parliament the rules for considering hybrid bills were added to standing orders to facilitate consideration of the bill and where an amalgamation of the rules for public and private bills the fourth crossing bill was successfully passed and work is now commenced on the fourth replacement crossing to be named the queensbury crossing when it had completed its work on the bill the fourth crossing bill committee helpfully produced the report which suggested improvements to the hybrid bills process this has resulted in the standards procedures and public appointments committee recommending a number of relatively minor changes to these rules and to the corresponding rules for private bills including clarifying the role of the assessor and streamlining the production of accompanying documents i commend these changes to members as the committee believes they will improve the process for consideration of both hybrid and private bills and i move motion s4m 10243 in my name thank you mr Stevenson no members asked to speak in this very very short debate so the question this motion will be put decision time the second is motion number 10244 on EU legislative proposals review of standing orders mr Stevenson i would be obliged if you would continue until five o'clock thank you very much indeed Presiding Officer in 2010 the parliament agreed a new european strategy for its committees this followed major changes introduced by the treaty elizabeth which gave the scottish parliament through the UK government a role in raising subsidiarity concerns the strategy was supported by standing order changes the committee at the time thought that these were sufficiently important to merit a review in a couple of years a review that the standards procedures and public appointments committee has now undertaken the main concern raised with us by committees was the very tight timescale for considering potential subsidiarity issues while this is very largely beyond the scottish parliament's control we have proposed a couple of changes to make the rules more flexible instead of requiring committees to consider issues referred to them the changes give committees discretion to decide whether they need to and are able in available time to scrutinise a subsidiarity concern that is being raised with them the changes also mean that committees can reach informal agreement on which is to be the lead committee rather than having to wait await a parliamentary bureau designation i invite the parliament to agree these changes which have been welcomed by the committee and i pleasure in moving motion s4m 10244 which reads that the parliament notes the standards procedures and public appointments committee second report 2014 session 4 EU legislative proposals review of standing orders sb paper 506 and agrees that the changes to standing orders set out in annex a of the report to be made with effect from 27th June 2014 mr steven i am not the only one obliged to you we now move to decision time there are six questions to be put as a result of today's business can i remind members and release to this afternoon's debate if the amendment in the name of graham pierston has agreed the amendment to the name of margaret mitral falls the first question then is that amendment number 10278.1 in the name of graham pierston which seeks to amend motion number 10278 in the name of kenny mcaskill on cash back for communities be agreed to are we all agreed the parliament's not agreed we move to a vote members should cast their votes now the result of the vote on amendment number 10278.1 in the name of graham pierston is as follows yes 31 no 62 there were 13 abstentions the amendment is therefore not agreed to the next question is amendment number 10278.2 in the name of margaret mitral which seeks to amend motion number 10278 in the name of kenny mcaskill on cash back for communities be agreed to are we all agreed the parliament's not agreed we move to a vote members should cast their votes now the result of the vote on amendment number 10278.2 in the name of margaret mitral is as follows yes 15 no 88 there were no sorry there were two abstentions the amendment is therefore not agreed to the next question is that motion number 10278 in the name of kenny mcaskill on cash back for communities be agreed to are we all agreed the next question is that motion number 10284 in the name of Richard Lockhead on the public bodies abolition of food from britain order 2014 UK legislation be agreed to our we all agreed the motion is there for agreed to the next question is that motion number 10243 in the name of steampson on hybrid bills be agreed to are we all agreed the next question is that motion number 10244 in the name of The motion is there for a grade to that. Conclused decision time and I now close this meeting.


Welcome back everyone. Today we're going to talk about functions in Python. So looking back at what we've done before, we have the same setup. I'm just using a normal text editor like notepad and then I have my terminal up so I can run the commands from the command line. You might notice I already have a print hello in my new Python's file, Python function file. If I run python, story05, functions.py, then we just get hello printing out. Okay. So imagine I wanted to do something a little bit more complicated. Let's say that I wanted to print hello and someone's name. So I could say hello and then josh. Say print hello josh. Well now I have two print statements so I'm going to get two values printed if we run this again. So we have hello, which is the first line, and then hello comma josh is the second line. So now we're okay if josh is always the one running this script, we don't have any problem, right? But if multiple people are going to be running this script, you have a lot of different users, then the name probably is going to change. You don't want to say hello josh to somebody who's not called josh, right? Well, what we would do is you could assign a variable, let's call it name, and name here is john. So then we could do instead of hello josh, we could just do hello as a string comma space and then do our plus sign, which remember is concatenation and then the name variable. So then if we run that again, we get hello josh, which is this first line, and we get hello john, which is the name variable that we assigned to john. Then whenever a new user starts using the program, then they can just change their name. Let's say it's Kim. Then hello josh, hello Kim, right? So what you could do every time you run the script is ask the user for their name and then put the name in the variable and then just print hello name. Well, that's assigning a value to a variable and you have to know how you're going to get that name or whatever the value is. But let's say instead of, sorry, you might notice that I did something here, I'm using print twice. So I always have print hello josh. And then here I have my variable assignment and then I have print hello name. Well, I'm using the same code, almost exactly the same code twice. And in programming, we want to try to avoid typing the same code over and over again. So this is a very simple example of basically this piece of code and this piece of code are almost exactly the same. We want to try to reduce duplicating code as much as possible. And the way that we can reduce code is by using something called a function function. So so here this is just a comment called a function. Okay. And the way that we create a function, basically it's just a piece of code that we can call over and over again. So instead of just running this code, and then we run it one time and we never use it again until the next time the script runs, I can call the function as many times as I want. So to create a function, we start by saying def. And anytime you see def, that is the start of a function. And then we give it some name. So the function needs to have a name. So let's say, I'm going to give the function a name, say hello. And I'm writing this in camel case. So I have my first character lowercase and then any additional words are uppercase. So I have a function definition. And it is say hello. Okay, and then we need brackets. And then that's pretty much it. So it's very similar structure to an if statement. We've already talked about if statements in a prior video. So say hello is the name of the function that we're defining here. Then next we can put any of the code that we actually want to run. So in this case, I want to print hello. I'm going to move this print Josh down first. So you can see what's going on. So I'm going to add print hello Josh. Okay, so now we have our variable assignment with a name. We have print hello with the variable. And then I'll remove this. And then we have a function definition named say hello, that takes no arguments, has no parameters, and then print hello Josh, we have two print statements still. So let's run this and just see what happens. The only thing that's running is hello Kim, which is this first block of code at the top. And the reason for that is because I'm not calling I'm not asking this function to run. So what happens is we run the script, this top load of block of code will run, and then we will skip over the function until we want to run it. Okay, so we can then control when a particular function runs. Okay, so I'm just going to remove this. So let's say how do we actually run this? And first we define our function somewhere in our script. And then if we want to run the function, all we have to do is type, say, hello, and brackets. And that's it. So we've defined our function. If we call the function, it will print hello Josh.  And this code, this block of code will run. So let's run that and see what happens. So hello, Josh. Now imagine I wanted to print this many, many times. Well, I could just copy and paste the print statement. And print statement isn't very big. So maybe that's okay. Or I can just call that function multiple times. Okay. And then hello, Josh prints multiple times. Now, let's say, of course, we don't want to try to duplicate this code either. So what could we do instead? How could we repeat this function call multiple times without repeating the same code over and over again? Hopefully you thought of something kind of like a while loop. So let's say x equals zero. Remember, and I think it was one of the first videos we had while x is less than five, do say hello, and then we can delete these others. And then we want to increment x by one. So we're assigning x to zero. While x is less than five, say hello, and then increment x, add one to x, right.  Okay, yeah. So we started with zero. Okay. So it runs five times. And we only had to use the code, the same block of code one time, right? So we've removed duplication in our script, it'll make your scripts much smaller. Plus now anytime I want to print, hello, Josh, all I have to do is call this function. So functions, especially whenever you're first starting programming, it might seem like a lot of extra work. But whenever you start breaking your code down into functions, they become very reusable. And you want your code to be as reusable as possible while you're coding, it'll end up making your coding much faster and much more easy to manage. So here, instead of typing hello, Josh, many different times, I just wrote a small while function and then call the while loop and call the function over and over again. Now, if all you're doing is printing, you don't get a lot of advantage because this code is also as long as just printing three or four times. However, most functions are way more complicated than just a print hello, Josh. So you'll see that as we go along. Okay, so the main point here is we have a function, we define it with def. So anything starting with def is a function, a block of code that we can call, then it has a name and you can call this whatever you want. Instead of say hello, I could just say say hi. But whenever I'm calling it, then I need to say I need to actually give the functions name properly. Let's run it again. And then hello, Josh. Okay. Right, so there's a lot of other things we can do with functions. But one of the most important is to add parameters. So I have my say hi function. And in these brackets that you see, you might be wondering what they're for. Basically, whenever you see brackets, you're looking at a function. Okay, either you're calling a function or here we're defining the function. But these brackets contain parameters for the function. So we can send variables to this function. And then this function can do something with those variables. So let's say, remember, we don't want to use the name Josh every single time. So why don't we send a variable name to this function? Okay, so what I can do, we have our define function, it's called say hi. And we send it a parameter, or it has a parameter name. And then we print hello. And just like before, we will do hello plus name. Okay, so now somewhere else in my code, let's say I have a variable called f in, and this would be first name. Okay, so let's say the f in equals Lucy. So that's the first name of whatever this user is. Okay, then we can call the function say hi, and then give it the argument here, give it the argument in brackets, f in. Okay, so say hi, f in, this is a variable, f in equals Lucy. So then our function runs, so we have say hi, name is then equal to Lucy. So what we should get out is hello comma Lucy. Okay, so whenever we're calling it, this is a argument. From the functions perspective, this is a parameter. Hello, Lucy. Okay, so here we're sending variables to the function. And that's important because the function can have its own variables. So let's say we have a variable called f in inside the function. And the name of f in is john. Okay, so we're defining a variable called f in and it's assigned the value of Lucy. We have another variable called f in inside the function named john. Now, what we're doing is sending Lucy to the function. And then we'll run in here. So I'm going to print f in. Notice I'm printing f in inside the function. So what do you think will happen? Let's take a look and see what happens. Okay, so we have hello Lucy. So we can say here hello name. So name is equal to Lucy, because we ran the we called the function say hi with f in and f in is assigned to the name Lucy. Okay, so then f in was Lucy, it became the value name. And then we printed hello Lucy. Now, the next thing that printed was john. Now, why did this print? Well, f in equals john and print f in. This is what we call scope. So functions have their own variable scope. So whenever you name a variable something up above, the function basically has its own space where it will keep its own variables. So if you use the same variables inside the function, let's say they'll be in a different scope. Don't really worry about that too much for now, you'll understand it more as we go along, but just realize that if you were expecting name to equal john, that's not going to work because the function f in is already assigned in a different scope. Okay, so just something to think about. So let's remove this. So now we have our function.  So let's go back to Kim. So say I have f in equals Lucy, say hi, Kim, do you think hello will be Lucy or will it be Kim? If you guessed that it is Kim, you would be correct because f in equals Lucy. Well, this doesn't have anything to do with the function. I'm calling say hi, and I'm sending Kim to the function. So then it will say hello, Kim. Okay, right. So then one more thing I want to talk about. I'll remove these functions here, these variables. Let's say I want to call a function. But I want the function to do something and return a value. So that's a really common thing to do is to have a function take some pieces of data and then return the result back to you. So we might call create a function def add one. So the name of my function is add one. And I'm giving it a variable x. Okay, whenever you see something like x or y, sometimes, but not always, it's probably going to be an integer or some sort of number of some type. But not always, you just need to know what they're sending it. Okay. And then what we're going to do with this is use the command return, return, which you can see it turned red. That's a special command in Python. And we are returning x plus one. Okay. So what do you think this does whenever I call this function, if I send it and a value a number an integer, then it will take whatever that value was add one, and then return that value return the result. Okay. So let's go ahead and call this.  Okay. So let's go ahead and call add one. So let's say y equals add one. And let's give it the value three. So I'm going to send an integer three to add one. So what we should get back is four. So y should equal four. Notice on the right hand side, I have the function call. And I'm just assigning the returned value directly to another variable. So then if we just do print y, what do you expect to happen? We're sending it three. We're returning three plus one. So y should equal four. Okay. Yep. And then y equals four. Now if we, you know, change this value, no matter what we change it to, it should always become something else. Let's send it a string and see what happens just so we can see some errors. So I'm going to send it add one. Okay. So I'm sending it the string. Okay. And it's going to try to add one to it. Let's see what happens whenever that runs. Yeah. Okay. So just as I expected, this is a failure. Right. It's saying trace back and the trace back is basically telling you where something went wrong. And you can see this line y equals add one. Okay. Has a problem. Okay. And it was trying to send okay to return x plus one. And the error type is cannot concatenate string and int objects. So here we sent a string. Okay. And one is an int. So since this was a string, it thought plus meant concatenate, not add. And because those are just two different types of variables, it throws an error because we can't just combine them like that. So I just wanted to show you what it looks like whenever a script fails. Normally look at the very bottom to see exactly what was going on. And then from this trace back, you can figure out approximately where something was going wrong. So look at line eight, which would be this line. And then look at line six, which would be this line. So those two lines have some type of problem. And that type of problem is cannot concatenate string and int objects. So don't just, if something fails, don't just skip over this, make sure you read what this type type error is. It'll give you a lot of really good information to debug your code. Okay. So let's add or change add one back to six, run the code again. And then we get seven. So everything's good because this is an integer. And this is a integer. Now, if we put quotes around six, we get the same problem because the quotes, I'm basically saying I want the string six, not the number six. Okay. So that's a little, that's pretty much it about functions and a little bit about debugging and errors. So to create a function, we first use def. And then we give it a name.  They should have something to do with what they actually do in the code. You can send or functions can have parameters, you can send arguments to the function. And functions let you call the same block of code with variables over and over again. So you don't have to type everything continuously over and over again. Yeah, repeating everything. Okay. Make sure whenever you're using functions, if you want to return some value, like your function does math or concatenate strings or whatever, you might want to return it back to a variable. So add one will be called. It will do what it's supposed to do, whatever your block of code is, and then it will return a value and then start again from this line. And then it will go to the next line as it's executing all of the code. Okay. So that's pretty much it for functions. There's a lot more that we can do with functions and Python has some really interesting special features of functions, but we'll get into those as we get into more advanced things. So that's it for today. Thank you very much.


In order to address Mr. Henderson's aortic valve stenosis and abdominal aortic aneurysm, Dr. Zvonamir Kraser and Abdel Qadar Amanfi took an innovative, noninvasive approach to addressing both conditions. First, the doctor set out to address the abdominal aortic aneurysm. An EVAR procedure is a catheter-based procedure that enabled the doctors to repair the aneurysm through an insertion of a stent graft. They completed this procedure in July. Just one month later, the doctors used their expertise in catheter-based procedures to fix Mr. Henderson's severe aortic valve stenosis. This was done through a TAVR procedure, which enabled the doctors to replace his damaged valve without requiring open heart surgery. At 101 years old, the ability to fix Mr. Henderson's condition through these noninvasive approaches was critical. Just three months after completing the second procedure, Mr. Henderson went to a post-op appointment and reported feeling well. Hello, Mr. Henderson. How are you doing? I'm doing fine. Thank you. Okay. So we fixed your heart, put a new valve in there, and we fixed your aneurysm. And now you're feeling good? Now I'm feeling good. So how old are you now? Only 101. Okay. That's good. Congratulations. Thank you. Yeah. You broke all the records in our hospital, you know? Is that right? Yeah. Okay. Well, it's the largest doings, not mine. The innovative approach these THI affiliated doctors took enabled Mr. Henderson at 101 years of age to be well on the road to recovery within just four months.


Hello and welcome to CMC Markets on Friday the 16th of August and this quick look at the week ahead beginning the 19th of August and it's been a rather turbulent week for global equity markets. We've seen big falls, big one day falls and we've also seen significant rebounds. You can certainly see that borne out in this S&P 500 chart that I have on the screen in front of me right now and at the moment we're experiencing a little bit of a rebound after the big falls that we saw on Wednesday. So what's caused this volatility? Well it's certainly been driven largely by the bond market, particularly inversions in the yield curve for UK debt, UK guilts and US government debt and particularly big falls in the value of the long-term government debt, particularly the US 30 year which dropped below the 2% level for the first time ever. We are seeing a little bit of a rebound in that today, hence the rebound that we're seeing in equity markets. I want to say a rebound in that I'm meaning a rebound in yields and not a rebound in prices. So we're seeing a little bit of a rebound in equity markets but there is no question that the narrative has changed a little bit over the course of the past few days. With respect to some of the geopolitical concerns which are still valid, obviously events in Hong Kong, US China trade, the threat of escalation we have seen President Trump announce delays to some of the new tariffs on Chinese goods into the US but nonetheless it still means that there's going to be more Chinese goods tariffed from the 1st of September than was the case on the 1st of August so and while some of these tariffs have been delayed till the 15th of December the relationship shall we say between the US administration and China has become a little bit more strained of late but it's really the movements in the your curve that I think have really dominated headlines over the course of the past few days and as such the question facing investors is whether the inversions we're seeing is because of the risks of an approaching recession which based on recent US data looks unlikely or because interest rates are so low and in a lot of cases negative that investors are not only looking for yield anywhere they can find it or whether they're looking out to price out recession risk particularly in areas like Europe and China I would argue there's an element of deflation risk taking place as well I think there's an element of all three in terms of what's driving bomb prices higher and what's driving bond yields lower but certainly I think there's also a case of a hunt for yield and if you look at US yields you look at UK yields they're one of the few areas of the bond market that is actually still in positive territory we've gone in space of the past week from 14 trillion dollars of negative yielding bonds to 16 trillion dollars of negative yielding bonds so I think there is an element of investors looking for a haven against deflation so what does that mean for equity markets and what to the point what does it mean for central banks because certainly in the context of what we've seen this week German economic data continues to look pretty weak and in the context of the week ahead we've got some important PMIs coming out as well as the latest German IFO business climate survey as well but we've also got increased speculation that the European Central Bank is likely to do a much bigger stimulus package than markets of potentially pricing in when they meet next month we had the governor of the Bank of Finland Oli Ren talk about a substantive stimulus package the only problem with that narrative is that with interest rates already at record lows how much more can the ECB actually do without causing permanent damage to the European banking system and you've seen that really played out in the share price moves that we've been seeing in Deutsche Bank we can see that here we are now pretty much near all-time lows and we closed at a record daily close for Deutsche Bank earlier this week the euro's also taken a substantial hit on the back of that dovish narrative from Oli Ren and you can see that here in this in this euro dollar chart in front of me now I think there's a decent possibility with respect to euro dollar that we can retest the lows of earlier this year at the beginning of the month of one ten twenty particularly if you look at the if you look at the the direction of travel for US economic data but the biggest event next week and I think it's going to be an event that's going to be I think it's going to generate an awful lot of Twitter narrative from President Trump is not only the latest Fed minutes which are due out on the 21st of August and given the fact that the US central bank cut interest rates by 25 basis points in July the first cut since 2008 and ending a period of rising interest rates that first started in December 2015 I think the minutes are going to point to probably a fairly healthy level of debate as to why the Fed felt it necessary to cut rates by 25 basis points why there was the level of dissent around that interest rate decision to cut because that's not forget we had two dissenters in the form of Eric Rosengren and Esther George who basically dissented to that decision to reduce interest rates by 25 basis points but since then we've had James Bullard who initially voted for a rate cut who was the front runner for the rate cut saying that it's unlikely that the Fed sees the need to cut rates further well that's going to make for an interesting discussion and a two and fro between President Trump and Jay Powell who President Trump has labeled clueless when it comes to monetary policy and we have the Jackson Hole annual symposium also next week on the 22nd of August and it's going to be I think it's going to be topical in more ways than one and certainly going to drive the direction of the dollar because it's it's about challenges for monetary policy and an environment of increasingly negative rates and that's particularly topical given that we've seen bond yields move evermore into negative territory so at the beginning of this year the challenge was about to house a normalized policy but that's now shifted to the topic of what other tools central banks have in their locker to come up to deliver with soft landings for those economies that are sitting on the cost and on the cusp of outright stagnation and in some cases recession and for me ultimately there's very little central bankers can do China is exporting deflation if you look at the PPI numbers out of China for most of 2018 they were trending at around about four four and a half percent this year they're trending well below one percent so that's just quite a significant drop-off in China factory gate prices and on the back of a devaluing Chinese one we can see that with this chart here and we have retested the breakout point of 698 but the direction of travel is quite clear with respect to this horizontal support and resistance line here while we remain above 698 against the Chinese one then the direction of travel is for a weaker one and if we continue to weaken over the course of the next few days and weeks that is going to put potentially downward pressure on equity markets and it's going to potentially as well push a deflationary wave out across the globe particularly if Chinese factory gate prices continue to remain in negative territory and that's what they did earlier this week so let's look at the key levels on various equity markets stacks earlier this week posted its lowest level since March and that's going to be a key support level going forward so let's put that in so that we can determine where that level is I would suggest it's around about 11,400 it's not it's 11,250 my mistake so you've got those lows in March there as a very very key area of support and then below that obviously the 11,000 level which was the January lows so we've seen a bit of a rebound we need to get back above this 200 day moving average here 11,250 on the downside 11,000 around about 680 11,700 on the upside is a resistance there with respect to the S&P this current rebound really needs to take us back above it 2,960 we've been back to it once earlier this week we've come aggressively lower off it bear in mind that we've got the 200 day moving average around about 2,800 but certainly I think we're going to continue to chop around in the range particularly in such a big week for the US central bank the Federal Reserve all eyes will be on Jackson Hole and the Fed minutes so the Jackson Hole symposium starts on the 22nd the Fed minutes come out on the 21st we've also got some very big data out of Europe the France and Germany flash manufacturing and services PMIs for August which are due out they're not to put too fine a point not to put too fine a point on it the most recent manufacturing numbers are poor they're like they're unlikely to improve so the big question continues to be around services will the drag on manufacturing start to bleed into services thus far that hasn't been the case particularly in Germany but that doesn't necessarily mean that they will continue we've also got the German IFO business climate survey and the last one was a pretty sobering assessment of the German economy at the last survey the president of the IFO Clemens Foost said that the latest service or activity dropped to a six-year low points into a German recession we've seen Q2 GDP in Germany contract by 0.1 percent the direction of travel for Q3 points to a further contraction in Q3 and that would I think really bear down on the euro dollar we talked about that earlier in the video keep an eye on the very key levels there 110 20 on the downside 111 70 on the top side we've also got the latest CPI numbers out of the European Union let's not forget ECB monetary policy is already extraordinarily accommodative yields are in negative territory the deposit rate is minus 0.4 German two-year yields are already minus 0.8 and closer to one minus one percent than they are to the actual deposit rate itself so the markets are already pricing in a 40 basis point rate cut by the ECB that for me even if they do that it's only going to exacerbate the stresses and the strains in the European banking sector another key arbiter of risk is gold I've talked about that at great length and I've written articles on it which you can find on the website but certainly in the in the context of the recent up-moving gold prices have a look at this low here 1480 that was the low that we saw on Tuesday we also saw a multi-year high on Tuesday so 1530 on the top side 1480 on the downside I would suggest that if we get a break lower we could well see further losses towards 1440 but while 1480 holds then it's very much a sell-the-rally type of attitude that you need to take with respect to equity markets in general these key breakouts in the Chinese one and the gold price are very key arbiters to the direction of travel for equity markets going forward while they remain above key support levels the one and gold then it's very much a sell-the-rally mentality I think as far as equity markets are concerned on the earnings front we also have some key announcements from person in the UK House Builder on the 20th of August they they ship they've got their first half earnings coming out and in the case of the US consumer we've seen some decent numbers from Walmart and some awful numbers from Macy's we've got targets Q2 Q2 numbers coming out on the 21st and again they can be a fairly decent bellwether of the US economy we've seen some decent retail sales numbers out of the US fairly decent ones out of the UK that's helped the pound we do appear to be getting a little bit of a rebound in the pound against the dollar if we break above 122 30 we could get a bit of a run to the upside but what I'm encouraged with respect to euro sterling we could actually see further declines there after some very strong gains this weekly reversal here if confirmed could see a very strong sterling rally against the euro so be prepared for a bit of a sterling short short squeeze and potential sterling gains over the course of the next week or so so that's it for this week a bit of a longer video than normal if you want to keep keep tabs on the news and analysis and the various articles that we've written with respect to the markets and in particular this article that I've written on bond yield inversions it's quite useful in terms of whether or not we think that there will be a recession or whether there won't be one or whether investors are just hunting for yield keep an eye on the news and analysis section because that's a useful source of what I'm thinking but also what my colleague David is thinking as well so that's it for this week thank you very much for listening to Michael Houston talking to you from CMC markets


Hello and welcome to the session. In this session we discussed the following question which says solve x plus y equal to 7 and 3x minus 2y equal to 11. Let's proceed with the solution now. We are given simultaneous linear equations x plus y equal to 7 and 3x minus 2y equal to 11. Let this be equation 1 and this be equation 2. Now as you can see, in these two equations the coefficients of the variables in the two equations are different. Now we will solve these two equations for the values of x and y. We solve these equations using the elimination method in which we make the coefficients of one of the variables in the two equations equal by multiplying both sides of the equation by suitable numbers. So here we will make the coefficients of the variable x equal in these two equations. As you can see in the second equation the coefficient of the variable x is 3 and in the first equation the coefficient of the variable x is 1. So we will make the coefficient of x in the equation 1 as 3. This can be done by multiplying the equation 1 by the number 3 on both sides. So first of all multiplying equation 1 by 3 we get 3 multiplied by x plus y equal to 3 multiplied by 7. This gives us 3x plus 3y is equal to 21. So we have rewritten equation 1 as this that is 3x plus 3y is equal to 21. Now our second equation was 3x minus 2y is equal to 11. Now let this be equation 3 and this is equation 2 itself. Now we can solve these two equations to get the values of x and y. Since we have got the coefficients of the variable x same in both the equations so now we would subtract equation 2 from equation 3. So subtracting equation 2 from equation 3 we get 3x plus 3y minus 3x minus 2y the whole is equal to 21 minus 11. Thus further we get 3x plus 3y minus 3x plus 2y is equal to 10 or we have 3x cancels with minus 3x and now 3y plus 2y is 5y is equal to 10. Now to get the value for y we divide both sides by 5 and now 5 cancels with 5 and 5 2 times its 10 so we get y as 2 thus we get the value for y as 2. Now to get the value for x we would substitute the value of y in either of the two equations 2 and 3 thus substituting y equal to 2 in equation 3 we get that is in this equation we would put y as 2 so we have 3x plus 3 multiplied by 2 is equal to 21. This means we have 3x plus 6 is equal to 21 or 3x is equal to 21 minus 6 so now we have 3x is equal to 15. To get the value for x we divide both sides by 3 here 3 cancels with 3 and 3 5 times is 15 therefore we get x is equal to 5 so for the given simultaneous linear equations we get the value of x as 5 and value of y as 2 thus our final answer is x equal to 5 and y equal to 2. This completes the session hope you have understood the solution of this question.


Everybody forced here opening 22 23 optic basketball choice ten bucks number four tiered check out these results anytime at Late sports cards calm. Let's go ahead and get started. Ah, thank you. Well, that means welcome back apparently not to Warner Bros. I Guess it means both Let's do it Not gonna recap this one if we get any mags will do that but it's gonna be pretty pretty quick one here And we're also about seven minutes behind seven that you can't Whoa An old shelter adopted Grant Williams Celtics Rain Ricky Spurs Malik I ran it was so stupid.  Oh Man, we got a Glen rice on the optographs heat auto Yeah, as I set the card down gently Here's a red shade gilded Alexander that one's numbered to 88 for okc 31 of 88 he probably I think he averaged 31 a game last year eBay one of one Red and green Bertans heat Duncan Robinson green dragon short prints Don't ask questions. You don't know the answer to illegal and Exclusive choice rated rookies of Kennedy Chandler Grizzlies and Jaden ivy for the pistons next thing you said a card Kyle's boy hollow Pat Conenton for the bucks and Bugged out of a talks red choice optograph Celtics out of Derek white Grizzlies tie a stones red 88 Red and green no stopping obi-topping nicks kind of in junior rated rookie Lakers and Choice rated rookies Kings Keegan Murray and Jeremy Sohan Spurs Got hollow Marcus smart Celtics and mobile Lakers Optographs auto Hawks bogged on Bogdanovitch Does that get a red or what? What are we doing with that one? I? just That's another yellow card for illegal Needless to say you sent off with a red Jesus Come on this guy Red for the Knicks RJ Barrett to 88. I'm not even gonna repeat the words that he said it's funny. I laughed I don't want to repeat the words Reading green Luka Donets Mavericks That blue Cavaliers Donovan Mitchell to 24 nice Donovan And rated rookie choice parallels of Vince Williams jr. And Jaden Hardy for Dallas We should we should have to keep track of all these illegal gets a one red card a night I think every red card some red card somebody gets it's like 30 seconds Oh You know Roger Celtics red choice optographs auto he's figuring out the system red for the Bucks to 88 yana Santa de Junpo Nice Giannis writing green KCP Nuggets Green Dragon Pacers O'Shea Berset and Rookies about a Vince Williams jr. And Kenneth Loffin jr. Both Grizzlies on those It's only it's only 300. It's only five minutes. I think he's gonna play the victim coming here You're right. He's coming to the twitch. I got bad for no reason hollow Tatum self. Thanks ready rookie. Hollow with Diabata Clippers Magic rated rookie red choice auto Caleb Houston. These are on-car which is nice Got a red Kyrie to 88 Mavericks red and green Tyesh Jones red rated rookie Trevor Kiehl's nicks to 88 Sorry, he's in rated rookie and a Scotty Pippin jr. Yeah. Yeah, for sure. It wasn't anything about John Vogue's booth Or as legal probably calls him JWB because this is favorite Got a hollow PJ Tucker for the Sixers rated rookie shade on sharp blazers Is it neat looking card here? We've got a Walt Frazier Don Russ throwback auto going to the Knicks red to 88 Mavericks on a Tim Hardaway jr Here we go to 88 again Mavericks. I Guess it's this kind of guys night dude blazers Going to Carol T a black and gold rated rookie shade on sharp Disgusting card three of eight We want red and green of the mellow ball rated rookies of Walker Kessler and Jill was careful Donnie. There's sharps everywhere. Yeah, I'm old on a Car they're too sure. I have a chair. I have a chair as I gently sat down the card on the card stand It was yodin. Yeah Hollow Moses moody warriors rated rookie Kendall Brown Pacers rated rookie red choice auto Nuggets Peyton Watson so he must be signing because his His rated rookie signatures in Don Russ optic hobby are our redemption and These are on card. They're live. So Red to 88 herder for the Kings blue to 24 Chris Haps for Zingis for the Wizards red and green Christian Wood Mavericks and rated rookies Jaden Hardy Mavs and Palo Ben caro magic Maybe Watson just seen the sheets of stickers go overwhelmed Another time Well, no because The other the rate of his signatures and options are on card Dude illegal is on one tonight. I don't know what's got. I don't know what's gotten into this guy Hollow Aaron Wiggins thunder Hello, David Mitchell Kings. Oh, by the way delay yellow yellow card on Vaughan B. Let the play run That's a yellow card on Vaughan the issue is we entertain illegal nonsense. Yeah, we're navelers rookie optics auto jail and during pistons Got ready 88 McCalbridge's Nets Red and green Tatum Celtics Dragon of auto Porto, Jr. Raptors Rated rookies Patrick Baldwin jr. And Jabari Smith jr. Do you go through and triple heck? Yeah, Vaughan. Let's go for do go Think I just bought some redigo cards actually needed some more for do go in my PC The hollow poor zingis wizards and you have a trade rookie heat Clippers must be about a rated rookie auto. No, it's not Shane Oh my god, Shane's gonna get one too Red Mo Bamba to 88 Lakers have some have some respect. It's Juneteenth. Come on act right y'all black and gold demacel spurs two out of eight Reading green Jay Chante Rockets jazz rated rookie Ocha Agbaji and Jalen during pistons got hollow Caruso bulls and Josh Richardson pelicans Greg Anthony on the choice auto for the Knicks Red 88 DeAndre Aiden for the Suns red and green Danny green cabs Max truce Dragon for the heat and rated rookies of Jake L'Arabia and Max Christie do this. Oh My god Anyway, we'll recap just the shade on sharp black and gold congrats to the Blazers big card for you Carol Thank you very much on to impeccable


Hi there, it's me, Monica Wahee, accompanying you as we reach out together to grasp a deeper understanding of SaaS on Demand for Academics, otherwise known as SaaS ODA. In this video, I'm going to show you how to automate some code I already wrote into a complex macro. Okay, here we are in the SaaS on Demand for Academics or SaaS ODA environment. If you need help setting up your free account in SaaS ODA, you can take my free online course that will help you, which is called Getting Started with SaaS ODA. Pretty logical. I'll link you to it in the description. Alright, so assuming you got started with SaaS ODA, you now know how to open a program window and put some code in it. So please, if you want to follow along, go get this code from GitHub and paste it into a program window. Alright, you can see there are two snippets of code here, a top snippet and a bottom snippet. I'm not really going to get into this top snippet of code. If you've watched my other SaaS videos, you can probably tell what's going on here. We are first using a data step to transform data set titled BRFSS underscore A into a new data set titled BRFSS underscore B. And as part of that transformation, we are adding a variable called asthma underscore flag, and we are basing the value of asthma underscore flag on the values of a native variable called asthma three. Then we are just running a two way frequency using proc freak between our native variable asthma three and our transform variable asthma underscore flag to make sure we didn't make a boo boo when transforming the variable. Oh, and all this talk of asthma, I should have formally introduced our data set. I'm demonstrating here with some data from the behavioral risk factor surveillance system or BRFSS, which is an annual health survey done by phone in the United States. So in the code, I'm taking the answer the respondent gave to the question about whether or not they have asthma, which has many different levels of answer for whatever reason. And I'm creating a flag variable called asthma underscore flag. I guess it makes more sense when you know what is going on in the background. But anyway, the whole point of this video is to automate that code with SAS macro programming. So now let's focus on the macro version of this upper code, which is down here. So this is what we are going over in this video. I admit SAS macro code looks pretty scary when you come upon it, but it won't bite. You can sit and look at it and diagnose it. Okay, so first we see the macro command and then we see the mend command. If you watch my videos on macros already, you know that this is a signal that the code sandwiched in between is our entire macro. And we see that the name of the macro is make underscore flag. And that is because that is the name I gave it in the macro command. Okay, but let's focus on the fact that when the macro is declared, there are a bunch of arguments and parentheses next to it. In fact, there are four of them. Each of these arguments has an equal sign next to it, meaning it wants you to input a parameter. Now you might remember that you can just have a simple macro that doesn't take any parameters. But then it's kind of a useless macro because you can't change the value of any of the macro variables in it. So it kind of defeats the purpose of automation. We want the macro to take in different values by way of macro variables. And if we want to do that, we have to declare the macro variables as arguments in the macro. So I made up the names native underscore var, flag underscore var, data underscore in and data underscore out, and you can kind of imagine what I'm going to use those for now that we talked about the above code. Now, as we diagnose this macro, we look for the next clue, which is that everywhere you see an amber sand preceding one of our macro variables, that's where we are asking SAS to fill in the variable with the value we set when we called the macro. Now above, we were making a flag for the asthma variable. The native variable was called asthma three, and the flag variable we named asthma underscore flag. So here is that code. What I'm doing is making the macro more flexible. Instead of the code always adding a flag for asthma, I can make it add flags for other diseases asked about in the BRFSS. The respondents were asked if they had a lot of different conditions, asthma, heart attack, heart disease, arthritis, kidney disease, makes you want to eat your vegetables. But all of the variables were coded the same annoying way, where one equals yes and two equals no, but there are a bunch of other values like seven for refused and nine for don't know. So we wanted to just make a flag variable for each of these conditions that says one if the respondents said yes to the condition and zero if they said no. And who wants to hard code all that ETL? So we are building in some flexibility and automation with our macro. Oh yeah, and up here are the two other variables I parameterized or macro variables. I named them data underscore in and data underscore out. Can you guess what I was talking about? Well, if you've read chapter four of my book Mastering SAS Programming for Data Warehousing, you already know that I'm a stickler for naming conventions. So what I do when I'm transforming data sets in SAS is that I increment the suffix letter each time I transform. That way I'm doing kind of like a manual rollback point, like I'm pretending I'm sequel. SAS is like a manual transmission. You have to use the clutch. SQL is more like an automatic transmission. So you have to learn a few SAS tricks or you will stall out. Anyway, this data underscore in and data underscore out allows me to name the input and output data sets. And then below the data step in the macro, we see the two-way proc free. OK, let's start by putting this macro in SAS's brain by highlighting macro to mend and running. OK, that went as well as we'd expect. Now let's go back to our code and see if the macro worked by calling it. OK, let's look at ourselves calling the macro below here. Here we call it the first time. We know we are calling it because it says percent and then it says make underscore flag, which is the name we call the macro. Then after that you'll see a parade of macro variables being set. First, I encourage you to run your macro with the values you used in your original code. That way you can see if the output is the same. And if it is, your macro is running right. So you will see I put in the original values I used in the code. Asma 3 for the native variable, asma underscore flag for the flag variable, and my data underscore in was BRFSS underscore A, and my data underscore out was BRFSS underscore B. Let's highlight and run this and see what happens. OK, this two-way frequency output looks good from a coding standpoint, like asma underscore flag has the right values in it based on asma 3. And the frequencies look familiar, but the best way to see if this ran the way we are thinking is to look at the log file. So let's click on it. OK, as I peruse the number of observations, number of variables, and names of data sets reported in the log file, I'm convinced the macro performed correctly.  Sound fun? Let's go back to our code. Here is the next macro call. In this one, the native variable is named CVDINFR4. So obviously, that's the question about ever having had a heart attack. OK, it's not obvious, but this is how crappy some variables in SAS are named. It has to do with the fact that for much of SAS's life, you couldn't give variables long names like you can in SQL. OK, since you now know that CVDINFR4 means heart attack, you can see why I named the accompanying flag HA underscore flag. And since we are incrementing suffix characters for our rollback, data underscore in is now BRFS underscore B, and data underscore out is BRFSS underscore C. And then next in line, the daisy chain continues with native variable CVDCRHD4, which obviously stands for heart disease. And we've got the flag variable HDIS underscore flag set up to be created. And then data underscore in is BRFSS underscore C, and data underscore out is BRFSS underscore D. I'll spare you watching me run the code. You can do it yourself. But you can probably see that in real life, I might actually even automate this code with more code to automatically increment the names of the parameters being fed in. But again, macro programming is only for automation. If you are doing something one time, then don't use macros. Just save yourselves the trouble. Want to learn more about how SAS works? You can start by taking my free online course on how to use SAS on demand for academics. All these lessons are based on my explanatory yet very provocative book, Mastering SAS Programming for Data Warehousing. I'll link to these in the description. Thanks for watching, and have a blessed day.