The bread-winning woman. In Africa today, it is not uncommon for women to be breadwinners in their marriages. A breadwinner is someone who ends the most income. And in some extreme cases, the breadwinner is also someone that is the sole owner. Most of the women I work with are sitting on this table. So it is a common occurrence. But no longer in the 60s or 70s, where it is typical to labour women are stay-at-home moms, teachers, nurses, petty traders. These are now old school.  Well done. It is an honour, a privilege to have what people need. It also takes a lot of patience and hard work to be successful in your career or your business. So well done, girl. However, it can be really difficult to be a breadwinner in a relationship as a woman. I know times are changing, notwithstanding, many women face a lot of challenges in their relationships when they are breadwinners. Issues can range from jealousy, verbal abuse, physical abuse, intimidation, even financial sabotage from hobby. The list is long. Issues like these make women afraid to marry men who earn less than they do even when there is a lot of prospects in the guy or lots of prospects in the relationship. Many women who are breadwinners are very unhappy. Some feel used and unappreciated. Now before you throw in the towel, let's try and work out how you can make your relationship work even when you end more than your husband. There are three things we can consider today that will help you ease the tension at home. Tip one, do not apologize for making more money. You really shouldn't be uncomfortable. Being uncomfortable is not an attractive trait for women.  Whatever you do, whatever you achieve or earn will help make the team become better. More money helps. So get your partner involved in the excitement of the progress, the extra money we accrue to the team.  Consider how you would like to be treated and accord your husband the same level of respect or more. You see, great relationships are based on mutual respect and trust. The key word here is mutual. So just because you end more doesn't give you the right to become an evil queen in your relationship. Now tip number three, communicate, communicate, communicate. I cannot emphasize that enough. In my opinion, this is the most important tip on this topic. Communication is so key. It's important to talk about how you feel and how the other person feels. It is important to discuss financial goals and make financial decisions together. It is important to be emotionally intelligent. In a relationship, communicate with your partner and not just with your pastor, your family or your friends. My dear bread women ladies, I want you to know that you can build healthy relationships despite your financial status. Just always remember that in marriage you are part of a team. You are partners in this partnership and the company, organization or corporation is called marriage. It's going to go fast. Well, this issue, I've been in situations where some men will say they don't want their wives or their girl in which their relationship will have certain level of achievement before they will give an example. I had a case where a man was saying he'd like to go for a master's degree first before his wife. Before you get into a relationship with anyone or marriage, you should know that nobody should pose a threat or barrier to your self-actualization and your dream. As a woman, you should have your vision for yourself. Nobody should be an obstacle to that. If somebody is going to be an obstacle to that, then that person is not fit to be your husband or your man.   So your husband should learn to live and work with you. The woman should not be intimidated by the man, the man should not be intimidated by the woman. They should work together, synergize. So they are part of a team. So I agree with you.  I think based on what you have said is times of change and I think us men will just have to accept it now. And it's not an easy thing for men to accept. But in business, we have to accept. And behind every successful man, there is a woman. Every successful woman, there is a woman. Behind every successful woman, there is a woman. So it shows our power for women now. I think I will not fall in love with my wife being successful. Because success has nothing to do with the relationship. The relationship has to do with love. And love has to be nurtured everyday. So being a man, you are nurturing it. So if you are nurturing that love for that woman to fall in love and love you and learn about your woman everyday. And I don't think there will be any truth in it with the success.  So no, when your wife does want to talk to you whether she needs chocolate or ear sign. Other things like that. I say if you can learn that, then I think you will be good. But I am married, I have a wife.  She plays with your spats and then she work with me from school days. Like I have known her for 10 years. So she plays a huge part in my career today. And I watch her sit back and let me be this person I am today. So now I said, you know what, it's time for you to be what you want to be. So open play field, she got the keys to it all.  If there is love, she will stay. If there is no love, she will work away. But I am not going to be my insecurity. Be all the way not to be successful, be what you want to be. What have purpose? That allow people to exploit their purpose and be what they are supposed to be in this world. That's my sense. Fear for the generation. I love it. I love men. I hope they are not saying this because we are here. But Fela, please go ahead. For the record, I am not the single person in the room. I am not very realistic. So when a woman is very successful, it's like the man is feeling. We men have that ego. The man is thinking. And you know, when a woman is climbing the ladder of success, she is going to make sacrifices. That is, she has to be in Kano. She has to be in Kadena. Like, I saw a publication where they said about four female MDs in Nigeria today are females. And I saw an interview with one of them, the spouse of one of them. And he said, it's not been easy. The man was just being honest. He said, because he said there were days that his wife would just come back from work and say, I am going to potackle tomorrow. I will be there for two good weeks. And he said, this is okay. I will stay with the kids. It's not easy because that man also had his own plans for the week. But because his wife is travelling and he knows that she is climbing that ladder, he has to take the kids to school. He has to do everything she has been doing. So it's not really easy to be honest. So it takes a man that is really very supportive. In a man that is patient. Confident in himself. Yes, a man that is willing to also sacrifice. Because if you look at it, it's the woman that is supposed to be the way we grew up. The way our parents grew up. My mum resigned in a very, very, very sensitive role. If she had continued, my mum would have been one of the top educationist in Lagos. But because of my dad, she was climbing and climbing. And she wasn't having time for us. So my dad said, I am a banker, you can't be like this. And she had to step back. So, yes, she had to do that for us. No, this was then. This was then. It was a mutual decision. Yes, and my mum is not complaining to the children. She has no regrets. She has no regrets. But she says that thank God she did it. But you know how many women would do that today? Because you are like, okay, this money we need it. This money we are making it. Together. And you also want to see your wife succeed. Sure. Let me just say a little bit about my personal. So like when I started my business. And then I just got married and then my wife was pregnant. So being an entrepreneur is not easy for me in your business and everything.  And now she's out there doing her own thing. I look after my son. I bat my son in the morning. I drop my son to school. It's a partnership business. So I feel like we just have to play the part. So both of you have to have a mutual understanding. This is where I want to reach. When I got this yacht on, you can go wherever you want to go. I think it's all about communication actually. It's communication, communication, communication. If you fail to communicate and I don't think marriage will happen. And I've been married for five years. Wow. Wow. Like you have to marry. Well done. I've been married for ten years. And you're happily married. We're happily married. Like I got a successful business. But she's not working for me. She said I don't want to work for you. I want to work for someone else. I'm like it's fine. Put your resume together. Communication. She's working for someone else. Like my wife is less than what some of my employees are. Hopefully she'll become a boss where she's very soon. And have her own empire. So I'll be happy for her. So like I'm coming to Nigeria. And I have to go to Nigeria. But I know my son will be an obstacle. I flew my son to Jordan. And I left my son somewhere. I said look after my son. Because my wife has to go to work. And I don't want me coming to Nigeria being selfish. Wow. So you know what? I'm coming to Nigeria. I say you have to stay with the child. I'm good. No. I'm coming to Nigeria for my personal things. What about her personal things? I said we need to get that kind of understanding.  To your kids. Is your wife. Yes. No anyone else. I don't trust anyone with my son compared to my wife. And then if I don't give my wife the opportunity to have the muscles if I die today. And how she going to look after my child. That's a good perspective. Very good one. Most of our mothers married to an abusive man. Any of the men who cannot love them. Because they have to do it because of the kids that maybe they're old and passed away and left them. Now they be like this man can provide for my child. Unfortunately they have to do whatever this man wants. Whether it's an abuser or not. But my son and my child have to go to school. My later husband passed away. Let me uneducate and without a job. Now yes this man who is providing shelter. So do you want your wife to go with it? No. So of course acting wife to play an open book can be more mature. As if there is love and trust. You're going to say the word. Talk about the success. Wow. You said it all. You said it all. Thank you so much. I mean everybody is right. And all relationships have their dynamics. And I think the start point is to get it right from the very beginning. You have to choose right. Because when you choose the woman from your rib, like we say in the Christendom, I mean your issues are minimized. However if you make mistakes in choosing, there is always a way. And it comes with openness.  Cutting off my arm is going to hurt the other part of my body. So communicate and always put the vision of both people in the fund burner. So that every decision you make should be for the team. Because when you do that, the offspring, the resource of that marriage is world changing. Exactly. True. Then when we come back, Shola is going to be talking about maintaining professional integrity. I think it's going to be interesting. See you after the break.


All right, so after you figured out all of the details that you want your tuxedo to have, the next step is to make sure that you're choosing the right shirt to pair with that tuxedo. There are a variety of different styles of tuxedo shirts and all of them have specific details that should be considered when it comes to the style of your tux, the formality of your event, as well as your own personal style and personal preferences. So in this video, we're gonna be going over five specific styles and types of tuxedo shirts and the details of each. So you'll be able to make the best choice for your wedding day. Tuxedo shirt number one is a wing collar shirt. This is going to be your most formal tuxedo shirt option and we're going to take a look at four of the shirts distinguishing characteristics. Number one is the collar itself with its two distinctive points that should go behind the bow tie rather than sticking straight up. Number two is the bib front which will be in a different, more textured fabric than the shirt itself. Number three is that you will use studs with this type of shirt. And number four, this shirt should have a French cuff that you fasten with cuff links. As I mentioned, the wing collar shirt is your most formal tuxedo shirt and it's actually very close to a white tie shirt. So if you want to wear a wing collar shirt, I recommend going with a three piece peak lapel tuxedo. If you're leaning towards a shawl collar or a dinner jacket, this is not the shirt for you. Tuxedo shirt number two is what's called a self-textured shirt. Self-textured simply means that the shirt is in all the same fabric. We have a turn down collar on this one, a stud front, and French cuffs. The turn down collar as well as the absence of the bib front makes this shirt less formal than the wing collar shirt. It's one of the most versatile tuxedo shirts. It can work with a three piece tuxedo, two piece with a waist covering, without peak or shawl lapel, dinner jacket really can't go wrong. One detail to pay attention to that can increase or decrease the shirt's formality is the fabric that it's made with. A textured fabric like you see in this shirt is best for more formal options and a fabric with no texture would be less formal. Tuxedo shirt number three is the plazae front. This is a very unique style of shirt that feels kind of European to me and you can see the alternating lines down the front which gives it a really nice textured appearance. Now, this is a bib front shirt. However, with the turn down collar, it's not quite as formal as the wing collar shirt. This shirt also has a stud front as well as French cuffs. In terms of formality, the plazae front is a more formal shirt so I would recommend wearing it with a three piece tuxedo or a cummerbund. If you don't wanna wear a waist covering or you're doing a dinner jacket, I do not recommend choosing this style of shirt. Tuxedo shirt number four is the pleated front. This style of shirt is less formal and in my opinion, it's the swankiest of the bunch. Most distinctive feature obviously are the pleats. It's got a stud front as well, a turn down collar and French cuffs. Now, one thing to know with the pleats is that the width of the pleats should match the frame of the wearer. So, narrow pleats for skinnier guys and broader pleats for broader guys. Because the pleated front shirt has a bit of a cool factor to it, it's a great choice with a dinner jacket, especially one that might be in an interesting color or have a bit of texture or pattern on the fabric. If you're wearing a velvet jacket, this is the shirt that you are going to want. Also looks great with a double breasted tux and is a very versatile option. Tuxedo shirt number five is what's known as the plain front or fly front. This is a very versatile shirt and has a very contemporary feel and minimalist look due to the fact that the buttons are covered up. So, no need for studs with this one. Other details are the turn down collar and the French cuffs. This is really sort of your do anything, all purpose tuxedo shirt. It can give a tuxedo a more modern and relaxed look and I also highly recommend it if you are wearing a dinner jacket. Now, one thing I would actually highly recommend is that you have two shirts on your wedding day. It's going to be a very long day, probably starting out with photos, going to the venue, taking more photos, the ceremony, cocktail reception, dinner, dancing, and then whatever else you have planned for the evening after all of that.  So, if you are planning to wear a tux, choosing one of the more formal shirt options and having a fly front shirt as well is great for hedging against any kind of mishap and a good choice for staying fresh throughout the day and transitioning to what is typically more casual as the night wears on. So that wraps up the five types of tuxedo shirts that I recommend. You saw a little bit of the way I would advise styling each type of shirt but later on in the inspiration section of the course, you'll see the full outfits and how it all comes together. That's it for this video. If you have any questions, let me know.


Hey, what is up? My name is Rubidium. Today, we are talking about scheduling about how quickly or slowly a film crew can move, how long you need to shoot a particular movie, what you need, and how to go about preparing for that. That seems very convoluted, but basically it breaks down to how quickly you can tell the story that you want to tell, depending on how many resources you have at your disposal. So the three big ways that filmmakers keep track of what they're shooting is shots, setups, and pages. Now, shots I think everyone can kind of get. If you set up the camera, you put a lens on, you say, the director says action, the actors do their thing, and that's a shot. That's one continuous shot. That shot may be an insert of someone putting a coffee cup down on a table. It may be a very complicated one take of someone putting the bomb in the trunk of a car and then craning up and then walking along, like in Orson Welles' famous one in Touch of Evil. So that's still one shot, but I'd say that wonors and moving masters, and we'll talk about those later, are the exception rather than the rule. Most of the time people, filmmakers build their story through a series of distinct individual shots that they put together in post-production in the edit to tell their story. You press record, later on you press stop, that's one shot. If you change the lens, so you go from a 24 to a close-up of 85 and get another shot, because the camera and the lights and the actors still in the place they were before, it's not another set up, it's just another shot. Oh, I should mention that there are also takes. If you don't change anything, leave the same lens on, leave the same lighting, the actors do the same thing, it's just another take, it's not another shot. When you change the lens or adjust the lighting or maybe adjust the blocking, that's another shot. When you move the camera and move the lighting, that's another set up. So the first set up could be a single on the lead actor, the second one is going to be a two shot on the lead actor and the supporting actor or the villain, whatever it is. So now you're moving the camera, which means you almost always have to move the lights. Now you're at another set up and different types of crews are able to do more or fewer set ups in one day. A typical TV show that's shooting on the same sets and has the same lighting and sort of has established a working template for their day can do about 20 or 30 distinct set ups in one day, one day of filming might be a 10 hour, might be a 12 hour day. So that means that they're doing, you know, 15 before lunch, 15 after lunch, or they're doing 10 before lunch and then after lunch when they really get going, they're doing another 20 feature films. We're talking, you know, 10 million and up are probably doing about 10 to 15 a day. So that's because on a feature film, the there's no established path of doing things, the sets are all new and usually unlit. You might be shooting on locations exterior that require, you know, hours and hours of setup time for each setup. And cinema typically has high production values, meaning the producer wants more for their money. Like they want, you know, five or six lights on every actor rather than two or three, like you would on television. That's, I mean, golden native television and the money that Netflix and those kind of people spends on TV makes it look like movies and they're spending a lot of money to get that. But so you have a 20 to 30 setup, you have a sort of 20 to 30 setups a day on a TV show and 10 to 20, if that on a feature film. But those shots and setups and takes don't don't really help you get through your film until they translate into pages, meaning pages of the script that you've covered in all the ways that the director wants you to cover them. So they talked about eights of a page and on a film set, the script supervisor will keep track of this. How many eights of a page have you shot that day? You might do four eighths of a page, half a page, you might do seven eighths of a page or almost a page, you might do three pages a day. If you take the amount of pages of the script and you divide it by the amount of days you have to shoot, you'll know what your average page number has to be. And again, on TV, it's different than feature films on TV. It's about eight to 10 pages a day. So you'll shoot a one hour pilot in about six days on a feature film. It's about two to three pages a day. So you'll shoot a feature in over a couple of months. And that's because the crews are bigger, the scenes are more complicated, and there's no pre-established set way of doing things. I mean, think about House MD. It was the same four people, five people. It was the same hospital set. It was already probably lit. Actors already knew their characters. So there wasn't probably that much back and forth with the director.  But on a feature film, I mean, think of Black Panther, how complicated the stunts are, how many moving pieces there are, and how good Marvel wants that final film to look. And you end up spending months and months shooting these things and spending $200 million getting it in the can or getting it made. You know, it takes shots, setups and pages are never as simple as they seem because you can do a three page scene in one take, meaning one setup, very, very easily. Or, you know, if you have it on a either, you know, a locked off two shot, or you have it on a steady camera or movie, and you follow the two actors or three actors walking through the scene, you know, you can spend the entire day lighting and prepping and rehearsing and then, you know, come four o'clock, you hit action, do one take, fix a couple of things, do a second take, you've got it, everyone goes home a couple of hours early. And you've got three pages in the can and you're ahead of your schedule. It doesn't always happen like that, things can go wrong. And typically you don't really want to shoot a whole movie in single takes, just because it really limits your flexibility when it comes to the edit to make decisions after you've shot the film. So, one is a great, and we'll probably do an episode on those coming up, but it really, you really have to have immense confidence and the actors have to be really well rehearsed and really well blocked in order to pull these things off in one go. So the preferred method is to do multiple takes with multiple setups, meaning coverage from both sides and a master. And we'll talk about what coverage is versus, you know, moving masters later, but essentially that's how scheduling breaks down in films. You want to get as many pages as you can every day, meaning all the shots you need to cover those scenes and move on so you don't have to go back and get anything else. While keeping the film the quality that you want it to be. So John Woo, one of my favorite filmmakers, is a perfect example with Hard Boiled. Now, if you think that a Hollywood movie might have a three-month production schedule, Hard Boiled had a 120-day shoot. This is in the 80s in Hong Kong when filming was comparatively very, very cheap. So they were able to shoot and shoot and shoot and shoot with like, you know, every time a guy, you know, jumps over a table firing a gun, John Woo would get, they have three cameras and get seven or eight or nine or 10 different versions of it. So that when he was in post, he could cut between them and create a really dynamic, amazing film. When he then went to Hollywood and was forced to work under those kind of constraints with those kind of production costs, he wasn't able to deliver as great and as dynamic films as he did when he was working in Hong Kong. But that's the reality of making films. I hope that's been helpful for people out there. We're going to dive into some of these other related topics about how you make films at a, you know, larger, bigger scale, how films get made in Hollywood, how films get made in independence in New York. And this is going to be hopefully part of a series. So thank you very much for watching. I will see you next time.


Does the current president remind you of Biff Tannen and Back to Future 2 and also you talked about getting to know the character?  When did you feel like you became Biff Tannen? But also if you kind of see similarities between your Back to Future 2 character and our current president in Donald Trump. We only have time for one more question. I'm not sure I totally got the gist of it. I didn't understand the question to you. To mine, I can answer that clearly there can be comparisons made, but the idea that the internet meme that was based on whatever, this is a this is a performance that came out of me that wasn't based on anything. It was based on a character that was on the page that I created, so it's not, but of course, you know, Maybe he's basing his character off you? Yeah Whatever you think whatever floats your your political boat, I just hate peace man.  So far. We just kind of keep going, you know It's repeating what we were talking was sort of about this kind of issue at breakfast, you know I just had you Put it the same way, you know things swing one way then the swing the other doesn't mean it's fun But yeah, I think just feels like it's gonna sink for good Sometimes so far hasn't something good No, here a planned old flag.  I think what the thing with me is When that happened what internet meme comes out all of that stuff Hillary Clinton uses me without my permission Ted Cruz uses me without my permission all the politicians are using me without my permission Jake Tapper CNN Fox news Everyone wants my comment on the basis and I become I the actor Tom Becomes a political commentator on work that I did 30 years ago And you know and I understand the mill and I understand being grist for the mill And I understand going into that big Cuisin art of politics, but I'm an artist, you know I created what I created it is what it is and the audience has to do whatever


Welcome back Python Stars. We are pleased to welcome Mr. Andrew Knight, a very special guest from Automation Panda. In his own words, Andy Knight is the Automation Panda, an engineer, consultant and international speaker who loves all things about the software. And today he will be sharing with us his expert insights on how decorators function in Python. With that, I ask you that you give your full attention to Mr. Andrew Knight and help me in welcoming him to the stage. Over to you, Andy. Thank you. Good evening, good afternoon and good morning around the world. Can everybody hear me okay? Cool. So, I'm glad to be here streaming to you live from the United States. As he said, my name is Andy Knight. I also go by Pandy for short in the Python community. I am the Automation Panda and I'm a big Python fan just like y'all. So, have you ever seen those tags on top of Python functions? Maybe you've seen them on top of methods in classes too. Those are decorators, one of Python's niftiest language features. Decorators are essentially wrappers. They wrap additional code around existing definitions. When used right, they clean up your code better than OxyClean. Let's learn how to use them today. So, best way to learn is by seeing actual code. Here is a regular old hello world function. When we run it, it prints hello world. Nothing fancy here. Now, let's take that same function and bam, let's add a decorator. Using this at sign, we just added a decorator named tracer to this hello world function. So, what exactly is this decorator? Tracer is just another function. But it's special because it takes in a function as an argument. Since tracer decorates hello world, the hello world function is passed into tracer as an argument. Wow! So, what's inside tracer? This decorator has an inner function named wrapper. Can you even do that? With Python, yes, you can. The wrapper function prints entering, calls the function originally passed into the decorator, and then prints exiting. When tracer decorates hello world, that means hello world will be wrapped by entering and exiting print statements. Finally, the decorator returns the new wrapper function. Anytime the decorator function is called, it will effectively be replaced by this new wrapper function. So, when we call hello world, the trace statements are now printed too. Wow! That's amazing. That is how decorators work. Decorators wrap functions around functions. Think about them like candy bars. The decorator is like the foil wrapper, and the decorated function is like the chocolate inside. But how is this even possible? That decorator code looks confusing. Decorators are possible because, in Python, functions are objects. In fancy language, we say functions are first-order values. Since functions are just objects, we can pass them into other functions as arguments, define new functions inside existing functions, and return a function from a function. This is all part of a paradigm called functional programming. Python supports functional programming because functions can be treated like objects. And that is awesome. So, using functions as objects, decorators change how functions are called. Decorators create an outer decorator function around an inner decorated function. Remember, the outer function is like the foil wrapper, and the inner function is like the chocolate. Creating an outer function lets you add new code around your inner function. Some people call this type of code advice. You can add advice before or after the inner function. You could even skip the inner function altogether. The best part is, decorators can be applied to any function. They make sharing code easy so you don't repeat yourself. You can follow the DRY principle. Decorators are reminiscent of a paradigm called aspect-oriented programming, in which code can be cleverly inserted before and after points of execution. That's neat. I recommend you check that out after this talk. So remember, decorators wrap functions around functions, like candy bars. Hold on now. We have a problem in that Python code. If the wrapper function effectively replaces Hello World, then what identity does Hello World report? Unfortunately, with the given code, its name is wrapper, and its help also returns wrapper. That's not right. Never fear, there's an easy solution to this. The functools module provides a decorator named wraps. Put functools.wraps on the wrapper function and pass it in the inner function object. And decorated functions once again show the right identity. That's awesome. But wait, there's another problem. How do decorators work with inputs and outputs? What if we decorate a function with parameters and its return value? If we try to use the current tracer, we get an error. Arguments broke it. But we can fix it. First, add star-args and star-star-kw-args to the wrapper function's parameters, and then pass them through to the inner function. They will make sure all arguments go through to the decorator. Through the decorator into the decorated function. Then capture the inner function's return value and return it from the wrapper function. This makes sure return values also pass through. If the inner function has no return value, then don't worry. The decorator will pass through a none value. Thanks, Python. When we call the function with the updated tracer decorator, we see tracing is now successful again. When we check the new return value, it's exactly what we expected. Hello, Andy. It works. Wow, that's awesome. But wait, there's more. You can write a decorator to call a function twice. Start with the decorator template, and simply call the inner function twice. Return the final value for continuity. Bam, it works. But wait, there's more. You can write a timer decorator. Start with the template, call the inner function, and surround it with timestamps using the time module. Here, we'll be printing the elapsed time as the difference between start and end. Now you can time any function. But wait, there's more. You can also add more than one decorator to a function. This is called decorator nesting. Order matters. Decorators are executed in the order of closeness to the inner function. So in this case, with these two decorators, call twice is applied first, and then timer is applied. If these decorators are reversed in order, then each inner function call is timed. Cool. But wait, there's more. You can scrub and validate function arguments. Check out these two simple math functions. Add and subtract. Nothing too fancy here. Create a decorator named int inputs to scrub and validate inputs as integers. Add the wrapper function, and make sure it has positional arguments. That's the star args in the wrapper parameters. Then cast all args as ints before passing them into the inner function. Here, I've done that using a list comprehension. That's that. Square brackets in A for A in args. If you're not familiar with list comprehensions, think of it as a really cool way to do processing on lists or collections without using a loop. Definitely recommend looking that up afterwards. Now, when calling those math functions, all numbers are integers. Using non-numeric inputs also raises a value error. Cool. But wait, you guessed it, there's even more. You can create decorators with parameters. Here's a decorator that will repeat a function five times. The repeat function is a little different than the decorators we've seen before. Instead of taking the inner function object, it takes in the parameter, which in this case is the number of times to repeat the inner function. Inside, there's a repeat decorator function that has a parameter for the inner function. The repeat function returns the repeat decorator function. Inside, repeat decorator is the wrapper function. It uses functools.wraps and passes through all arguments. That's star args and star star kw args. Repeat decorator returns wrapper. Finally, wrapper contains the logic for calling the inner function multiple times, according to the repeat decorator's parameter value. That's what the for loop does here. Now, hello world runs five times. I could change that to be four times, eight times, 99 times. Nifty. But wait, there's even more. Decorators can be used to save states. Here's a decorator that will count the number of times a function is called. Count calls has the standard decorator structure. Outside the wrapper, a count attribute is initialized to zero. This attribute is added to the wrapper function object itself. Remember, in Python, we can dynamically add attributes to any object. Inside the wrapper, the count is incremented before calling the inner function. The count value will persist across multiple calls because it's associated with the wrapper function object itself. When we run this, initially the hello world count value is zero, because it hasn't been called yet. After making two calls, the count value goes up as expected, and now the count attribute returns two. Awesome. But wait, there's more. Decorators can be used in classes as well as for functions. Here, our timer decorator is applied to this hello method. As long as parameters and return values are set up correctly, decorators can be applied equally to functions and methods. Decorators can even be applied directly to classes. This might blow your mind a little bit. When a decorator is applied to a class, it wraps the constructor. Note that it does not wrap each method in the class. Since decorators can wrap classes and methods in addition to functions, it would technically be more correct to say that decorators wrap callables around callables, instead of saying the wrap functions around functions. Interesting. Python is cool like that. So that's all great. But can decorators be tested? Good code must arguably be testable code. Well, today's your lucky day, because yes, you can test decorators. Testing decorators can be a challenge. We should always try to test the code we write. But decorators can be tricky. Here's some advice. First, separate tests for decorator functions from decorated functions. For decorator functions, focus on intended outcomes. Try to focus on the wrapper instead of the inner function. Remember, decorators can be applied to any callable. So cover the parts that make decorators unique. Decorated functions should have their own separate unit tests. Second, apply decorators to fake functions used only for testing. These functions can be simple or they can be mocked. That way, unit tests won't have dependencies on existing functions that could change. Tests will also be simpler if they use slim down decorated functions. Third, make sure decorators have test coverage for every possible way it could be used. Cover decorator parameters, decorated function arguments, and return values. Make sure the name and help are correct. Check any side effects, like saved state. Try it on methods and classes as well as functions. With decorators, most failures happen due to overlooked edge cases. Let's look at a few short decorator tests. We'll use the count calls decorator we wrote earlier. There are two decorated functions to use for testing here. The first one is a no operation function named no op that does nothing. It has no parameters or returns. The second one is a function that takes in one argument and returns it. Both are very simple, but they are two equivalent classes of decoratable functions. The test cases will show, will verify outcomes of using the count calls decorator. For count calls, that means tests will focus on the count attribute added to the decorator functions because that's the side effect. That's the outcome. This first test case here verifies that the initial count value for any function is zero. The second test case calls a function three times and verifies the count is three. This third test case exercises the same function over to the left to make sure arguments and return values work correctly. It calls the quote unquote same function, asserts the return value and asserts the count value. This collection of tests is by no means complete. It simply shows how to start writing tests for decorators. It also shows that you don't need to overthink unit tests for decorators. Simple is better than complex. And to be honest, I wouldn't be the automation panda if I didn't cover at least a little bit of testing. So up to this point, we've covered how to write your own decorators. However, Python has several decorators available in the language and in various modules that you can use. Absolutely free. Decorators like class method, static method, and property can apply to methods in a class. Frameworks like Flask and PyTest have even more decorators. So let's take a closer look. Let's start by comparing the class method and static method decorators. We'll revisit the Greeter class we saw before. The class method decorator will turn any method into a class method instead of an instance method. That means hello, or that means this hello method here can be called directly from the class instead of from an object of the class. This decorator will pass a reference to the class, or it will pass a reference of the class into the method. So the method has some context of the class. Excuse me. Here, the reference is named CLS to represent the class. And the method uses it to get the class's name. The method can be called using greeter.hello, as shown on the right. Wow. The static method decorator works almost the same as the class method decorator, except that it does not pass a reference to the class into the method. Notice how its parameters are empty. Methods are still called from the class, but here with greeter.goodbye. You could say that static method is just a simpler version of class method. Next, let's take a look at the property decorator. To show how to use it, we'll create a class called accumulator to keep a count of a tally. Accumulator's init method initializes a count attribute to zero. An add method adds an amount to the count. So far, nothing unusual. Now, let's add a property. This count method has the property decorator on it. This means that count will be callable as an attribute instead of a method, meaning that it won't need parentheses. It is effectively a getter. The calls to count in the init and add methods will actually call this property instead of a raw variable. Inside the count property, the method returns an attribute named underscoreCount. The underscore means that this variable should be treated as private. However, this class hasn't set that variable yet. That variable is set in the setter method. Setters are optional for properties. Here, the setter validates that the value is set to a non-negative value. If the value is good, then it sets underscoreCount. However, if the value is negative, then it raises a value error. UnderscoreCount is handled internally, while count is handled publicly as the property. The getter and setter controls added by the property decorator let you control how the property is handled. In this case, the setter protects the property against bad values. So let's use this class. When an accumulator object is constructed, its initial count is zero. After adding an amount to the object, its count goes up. Its count can be directly set to non-negative values. Attempting to set the count directly to a negative value raises an exception as expected. Protection like that is great. Python packages also frequently contain decorators. For example, Flask is a very popular web micro framework that enables you to write web APIs with very little Python code. Here's an example, Hello World Flask app, taken directly from the Flask docs online. It imports the Flask module, creates the app, and defines a single endpoint at the root path that returns the string. Hello World, it says. Flask's app.root decorator can turn any function into a web API endpoint. That is really awesome. And it's one of the reasons why Flask is so popular and so loved. It's so easy to make a web service. Another popular Python package with decorators is PyTest, Python's most popular test framework. And it's probably also my personal favorite Python package. One of PyTest's best features is the ability to parameterize test functions to run for multiple input combinations. Test parameters empower data-driven testing for a wider test coverage. To show how this works, we'll use a simple test for basic arithmetic called test addition. It asserts that a plus b equals c. The values for a, b, and c must come from a list of tuples. For example, as shown here, one plus two equals three, zero plus one equals one, and so forth. The PyTestMark parameterized decorator connects the list of test values to the test function. It runs the test once for each tuple in the list, and it injects the tuple values into the test case as function arguments. The test case would run four times. Test parameters are a great way to rerun test logic without repeating test code. So act now before it's too late. When should you use decorators in your Python code? You may be wondering. My advice is to use decorators for aspects. An aspect is a special cross-cutting concern. There are things that happen in many parts of the code, and they frequently require repetitive calls. Think about something like logging. If you want to add logging statements to different parts of the code, then you need to write multiple logging calls in all those places. Logging itself is one concern, but it cross-cuts the whole code base. One solution for logging could be to use decorators, much like we saw earlier with the tracer decorator. Good use cases for decorators include things like logging, profiling, input validation, retries, and registries. These are all things that typically require lots of extra calls inserted in duplicative ways. Ask yourself this. Should the code wrap something else? If yes, then you have a great candidate for a decorator. However, decorators aren't good for all circumstances. You should avoid decorators for what we would consider main behaviors, because those should probably be put directly in the body of the decorated function. Avoid logic that's complicated or has heavy conditionals too, because simple is better than complex. You should also try to avoid completely sidestepping the decorated function. That could confuse people. Ask yourself this. Is the code you want to write the wrapper or the candy bar itself? Is the code you want to write the wrapper or the candy bar itself? Rappers make good decorators, but candy bars do not. I hope you found this infomercial about decorators useful. If you want to learn more, check out this real Python tutorial by Gar Arn Hell, named Primer on Python Decorators. It covers everything I showed here and a little bit more. So thank you so very much for listening to me. Again, my name is Andy Knight or Pandy. I'm the Automation Panda and a bona fide Pythonista. Be sure to read my blog at AutomationPanda.com and follow me on Twitter at AutomationPanda. I'll be taking questions offline, either in Zulu or you can also tweet at me at AutomationPanda. So thanks so much.  All right. Awesome talk, Andy. On behalf of PiconIndia, I thank you for the talk for the questions posted over Zulip already. They have been escorted over to SpeakerLounge as well. For any late questions, please feel free to catch Andy at the SpeakerLounge over Zulip and we'll be back with the final keynote for the day in about five minutes at the Bangalore stage. Stay tuned.


Going on everyone Sam here with late in sports cards ripping one box at 23 tops inception baseball hobby for Jeff Yes, so good luck here, buddy Yeah, it was pretty it was pretty good Lord one pretty good storm at one point for sure 23 inception 23 seconds All right, here we go. Good luck Jeff Well the Cabrera on the green She's Kate Cavalli 150. Oh my god. She says and manual Valdes Yeah, I was moving the other day. That one was yeah your downs and Dylan Carlson 80 of 99 for the Cardinals On Sunday morning, it was really windy 80 of 99 That will do it for your break there. Mr. Jeff. Thanks as always for the sport buddy. Get him right out to my man


Hello everyone, this is Alice Gao. In this video, I will discuss four definitions of artificial intelligence. We can define artificial intelligence in many ways. In this course, I will discuss four definitions from the textbook Artificial Intelligence, A Mortar Approach by Russell and Norvig. First, let's look at the two columns. The two columns differ by how we want to measure the performance of the system. Do we want to measure the performance against humans or do we want to measure the performance against rationality? Rationality is an ideal concept of intelligence that we're going to develop. If we use different performance measures, we'll tackle the research questions using various techniques. For example, if we use humans as a performance measure, we need to understand how humans think and act. This goal would likely require putting people in the lab, observing what they do, forming a hypothesis, and conducting experiments to verify the hypothesis. These processes are part of many branches of empirical science. If we use rationality as the benchmark, then we need to define rationality as a mathematical model. This model leads to many branches of mathematics and engineering. In these fields, we develop theoretical models of thoughts and behavior, and analyze the theoretical models to understand the principles of intelligence. We could also perform experiments to verify the model's predictions. Next, let's look at the two rows. The two rows differ by our goals. Do we aim to model thoughts or do we aim to model behavior? One significant difference between the two goals is whether we can observe them. We cannot observe thoughts directly, but we can easily observe external behavior. I will discuss the four definitions one by one. The goal of this discussion is not to argue that one of the four definitions is correct. All four definitions are valid and useful. Researchers have studied all four definitions in the past. For the first definition, cognitive modeling, our goal is to develop a system that thinks like humans. Why do we want to use humans as the benchmark? In our world, we do not have a lot of examples of intelligence. Human is one of a few examples of intelligence, so we might as well use it. To pursue cognitive modeling, we need to understand how humans think and build a system that mimics human thinking and reasoning. How do we understand how humans think? First, we can examine our thoughts, reflecting on our thinking and reasoning process by introspection. Second, we could conduct psychological experiments, bring people into the lab, observe what they do, try to infer what thought processes led to their behavior. Third, we can observe a person's brain in action using technologies such as MRI. For example, we can see which area inside the brain is active when trying to do something. These approaches gave rise to the field of cognitive science. The goal of this field is to develop precise and testable theories of the human mind. To recap, the first definition of AI, cognitive modeling, aims to develop a system that thinks like humans. This definition uses humans rather than rationality as the benchmark and aims to model thoughts rather than behavior. For the second definition, Turing test, our goal is to develop a system that acts like humans. Alan Turing, the father of computer science, proposed the Turing test around the 1950s. The Turing Award, the highest honor in computer science, is named after Alan Turing. When Turing first proposed the Turing test, he caught it by a different name. Do you know this alternative name of Turing test? I will review the answer at the end of this video. How does the Turing test work? The person on the top left is the interrogator. The interrogator is communicating with an entity that could be a human or a computer program. The interrogator can interact with the entity by asking questions through a text interface, sending visual signals using the light bulb, or sending some objects. The entity's goal is to prove to the interrogator that the entity is intelligent. If the entity behaves so that the interrogator cannot distinguish the entity from a human, then the entity passes the Turing test, is considered intelligent. The Turing test is a simple yet powerful idea. But is it useful for artificial intelligence? On one hand, some people claim that the Turing test is not useful. Their main argument is the following. Although the Turing test gives us a way to recognize if an entity is intelligent, it doesn't tell us how to build an intelligent system. On the other hand, there are lots of arguments claiming that the Turing test is very useful. The Turing test gave rise to several important areas in artificial intelligence. Let me give you a few examples. If an entity wants to pass the Turing test, what kinds of things should they be able to do? First, it needs to understand natural language. This led to the development of natural language processing. Second, it needs to represent and store knowledge. This led to the area of knowledge representation. Third, it needs to reason, inference, and learn. This led to machine learning. Fourth, it needs to perceive objects. This led to computer vision. Finally, it needs to move and manipulate objects. This led to the field of robotics. These are some prominent research areas in artificial intelligence today. To recap, the second definition of AI, the Turing test, aims to develop a system that acts like humans. This definition uses humans as the benchmark and aims to model behavior rather than thoughts. So far, I've discussed two definitions. Cognitive modeling, thinking like humans, and Turing test, acting like humans. Both definitions use humans as the benchmark. The next two definitions will use rationality as the benchmark. Rationality is an ideal concept of intelligence and will define it mathematically. Roughly speaking, a system is rational if it does the right thing given what it knows. For the third definition, loss of thought. Our goal is to build a system that thinks rationally. Aristotle, the Greek philosopher, first attempt to create a formal definition of thinking correctly. Aristotle defines syllogisms, which are patterns of argument structures such that, given correct premises, one can always draw correct conclusions. Here's a famous example of a syllogism. Every person is mortal, Socrates is a person, therefore Socrates is mortal. Syllogism is an example of a law of thought. The idea of syllogisms inspired people to develop the field of logic. Logic is a precise language that we can use to express statements. The development of logic led to the logistic tradition. The logistic tradition proposes using a logical system to describe and store all of our knowledge, the objects, and their relationships. If the system has all of our knowledge, then theoretically it can solve any problem. Based on this belief, the primary goal in AI was to build such a system for a very long time. There are several problems with this approach. Let me give you two examples. First, logic is a rigid language, and it is challenging to translate natural language into logic. Given this, how can we hope to encode all of our knowledge using logic? Second, let's assume that we managed to encode all of our knowledge using logic in the system. How can we solve a problem using this system? We must search through the logical statements to find a useful statement for solving our problem. Since the system must be enormous, any brute force search will be incredibly slow. In short, we have two problems. First, it's difficult to build such a system. Second, even if we build such a system, it's challenging to solve a problem efficiently using this system. To recap, the third definition of AI, loss of thought, aims to develop a system that thinks rationally. This definition uses rationality as the benchmark, and aims to model thoughts rather than behavior. For the fourth definition, rational agent, our goal is to build a system that acts rationally. The word agent comes from a Latin word, which means to do, and Asian is an entity that acts. What is a rational agent? Roughly speaking, the rational agent aims to achieve the best expected outcome by taking the expectation over the uncertainty. What behavior should be considered rational? I will spend a lot more time discussing this in the course. For now, here's a high level description. The agent should create and pursue goals, operate autonomously, perceive the environment, learn and adapt to changes in the environment. To recap, the fourth definition of AI, rational agent, aims to develop a system that acts rationally. This definition uses rationality as the benchmark, and seeks to model behavior rather than thoughts. I hope you enjoyed learning about the four definitions of AI. Here's a table again. I've labeled each definition with its name. That's everything on the four definitions of artificial intelligence. Let me summarize. After watching this video, you should be able to do the following. Describe each of the four definitions of artificial intelligence. Compare and contrast these definitions. Here's the answer to the question that I mentioned earlier. When Alan Turing proposed a Turing test, he called it the imitation game. If you haven't watched the movie yet, I highly recommend it. Thank you very much for watching. I will see you in the next video. Bye for now.


Hello and welcome to Newsclick. Nothing drives us more than standing in solidarity with the people's movements. Our teams are on the ground, covering these movements extensively and hoping to bring our change. In this segment, we bring you a roundup of various such protests and movements that have taken place across the country over the past few weeks. Students from Kargil and Ladakh gathered in large number on the Tavi Bridge in the Jammu region of Jammu and Kashmir and blocked the area for two hours on November 1st. They have accused the state of neglecting them for almost seven decades and are demanding a separate and full-fledged university in the Ladakh region. As part of the protest, a shutdown was observed in Ladakh on Friday. On 2nd of November, the Delhi University Teachers Association activists, along with several other government university students and professors, marched on the streets of Delhi as part of the University Bachao Rally. Along with previous demands of permanency in jobs and hike in payment, they have risen up to speak against MOU and HEFA that now requires colleges to take loans for any needs that they have. To now, it is the government actually have been funding the higher education and we always believe that it is public money which goes to the government but now they have come out with a system where they are saying that they will not give the grant to the higher education colleges and universities and they have created a new institution called HEFA. We believe that if this happens, then ultimately the universities will not have any other way to raise the money but to go for free hike. Since October 16, thousands of Haryana Roadways employees were on a strike to oppose the Khattar government's move to hire 720 private buses on kilometer basis. The employees saw this decision as a move to privatize the public transport services. Since then, the Transportation Department has sacked 256 probation conductors who had joined the agitation and has also lodged cases against 260 employee leaders and employees. The strike has now been called off. In the last four years, the unemployment rate in India has been increasing at an alarming rate, especially among the youth. On the 3rd of November, thousands of youth from all across India marched on the streets of Delhi under the banner of Democratic Youth Federation of India to ask our Prime Minister one simple question. Where are the 2 crore jobs per year you had promised? I had promised to give 2 crore jobs per year. 2 crore job per year. 2 crore. 2 crore. 2 crore. 2 crore. 2 crore. 2 crore jobs every year. There is no point in leaving 2 crore jobs. That's all for this week. To follow detailed reports on these protest and movements please visit our website and our Facebook page. Thank you.