Thank you Derek for that kind introduction, Ného, and thanks to all of you for taking time to join us today. This is one of the last events on what has been a really great trip, and it feels wonderful to be surrounded again by so many friends. That includes all those at the Canadian Chamber of Commerce who have worked so hard to put on this event. Thanks for bringing us all together this afternoon. And of course, I have to acknowledge some special friends and colleagues who are here this afternoon. This includes our Minister of International Trade, Christia Freeland, and our Minister of Finance, Bill Morneau, who worked hard during this trip, as they do every day. Christia, Bill, stand up so we can see you guys. Thanks, Christia, and Bill. Bill is closing important deals for Canada. And they have worked hard, and we have the results to prove them. As you can see, usually at the end of a visit, we tend to create victories and talk about what has been accomplished, to talk about signed agreements, conclusive agreements. That is certainly what I could do today. As part of this trip, we had a series of commercial signings that saw Canadian and Chinese firms complete 56 deals worth more than $1.2 billion. That's a great start. That's a great start on what I hope and I know will be many, many more joint vetchers in the months and years to come. But I think it's important to remember that we came here with an even bigger goal than any one signing or even any 56 signings. We wanted, we needed, to renew and deepen the relationship between the people of Canada and the people of China for the long term. And I think it's safe to say we accomplished just that. In meeting with President Xi and Premier Li, we began the important and necessary work of revitalizing the relationship between our two governments. In our meetings with Chinese and Canadian business leaders, we talked candidly about ways that we can work together to make sure that more people, especially those in the middle class and those working hard to join it, can feel the full benefits of economic growth. And in the opportunities I've had to meet with Chinese citizens, I've been reminded of something that is as true here in Hong Kong as it is back in Hamilton, that we are more alike than we are different. In Canada and increasingly in China, the middle class is at the heart of the economy. I'm talking about the people who get up early every day, get the kids off to school, rush to their jobs and work hard to make ends meet for their families. They don't ask for a lot. All they really ask for in return for their hard work is a real and fair chance to succeed and for the opportunity to leave to their children a better world than the one they inherited from their own parents. That's a desire we all share. So it is our responsibility as leaders, me and government and you in the business world, to do what we can to make those aspirations a reality. To start, well, we can continue to pursue more open trade. Canadian goods and services are among the best on the planet and our businesses deserve to have greater access to the large and rapidly growing economies of China and other Asian countries. With our announcement at Alibaba, we opened a pipeline for Canadians to sell quality Canadian goods to over 400 million consumers. There's a direct line between that market access and more good, well-paying jobs for Canadians. In addition to economic cooperation, we can encourage more ties between our people. Our cultural ties are deepening and strengthening every time we meet and that includes the half a million Chinese tourists who visit Canada every year with a similar number of Canadians coming here to visit every year. Because we know the value of those connections, we've named 2018 the year dedicated to Canada-China tourism. Although 2017 is our 150th anniversary and in true Canadian fashion we'll be opening ourselves to the world. So if we want to encourage people to come for 2017 and 2018, I know Air Canada is one of our sponsors, we'd be very happy among others. Building on a renewed foundation of friendship and trust, Canada and China can also encourage each other to do better and to be better. Whether the issue is good governance, human rights, climate change, or the need to listen to diverse perspectives. But none of these objectives can be reached by exchange of goods, building links between people or working together to solve problems if our relationship is not solid. As I said last night, what I want to build in the name of 36 million Canadians is a friendship made to last. When Canada and China have a stronger, more stable relationship, we can both work together to strengthen and grow the middle class in both countries. A stronger relationship will open up opportunities, including ones we can't anticipate yet, and help us chart a path to broader, cleaner economic growth. And a stronger relationship will make it possible for our two countries to work together in ways that can satisfy not only our own interests, but the needs of our entire planet. So I want to thank you once again for the warm welcome everyone has extended to me personally, to my family, and to our entire Canadian delegation. Your generosity means so much to me. And I'm really interested in hearing the questions that you have for me, so I'm looking forward to shifting to that part of this luncheon. Thank you. Merci beaucoup. Dojé.


I decided to do my PhD mostly because I studied political science and I've always worked with rural development and slowly I started working only with irrigation and water projects and at some point I felt that I was lacking a bit the knowledge on water itself so I decided to start a PhD to deepen my knowledge on water and get more of the hint of the interdisciplinarity around water issues and also I thought that a PhD is a really amazing opportunity to research just what you are passionate about and without too much responsibility other than that. When I finished my Masters I was awarded a Carlos Schmidt Scholarship for doing a traineeship in UNESCO in the regional office for Latin America and the Caribbean in the International Hydrological Program. So I was acquainted with the water family of UNESCO and one of these like main centers at the moment was IUG and I got super interested in the work of IUG. I found out a lot of information about my promoter and the work environment in IUG and that the Netherlands is a power when it comes to water research in the world so I decided to give it a shot and it turned out well. My PhD research is part of a bigger project called the UDW project, the Urbanizing Deltas of the World in Maputo. So we are working mainly with a wastewater treatment plant and the water reclamation for the other uses to kind of balance out the demand of freshwater in Maputo in Mozambique. So what I'm doing is trying to establish the relationships in changing water qualities in the valley where the wastewater treatment plant is located and the social relations of production of the small scale farmers in the area, more particularly to female farmers. After I finished the PhD I wish I could go back to the development world and try to work in a development agency with the knowledge that I got during my PhD also be able to talk back to the technical world and the international cooperation. Well, if I could give a message to someone who's thinking about starting the PhD I think I would say like inform yourself and be sure that that is what you want to do because a PhD is a lot of responsibility and it's a huge commitment and you really need to like your topic and be sure that you like your team and that you're going to enjoy doing it because you have to do it for four years.


Thank you very much. Welcome to Python Interoperability, subtitled Building a Python First Petabyte-Scaled Database. So my name is William Jiltry. I've been a C++ developer for more than 20 years. And for more than half of that time, I've been a member of the C++ Standardization Committee. I've kind of worked all around in different areas of finance. I worked inside and exchange, putting data out. I've worked in risk analytics, on the buy side in hedge fund, on what's called the sell side in investment banking. And over that time, I've worked on a whole range of different proprietary time series databases. And I'm now the lead architect on a project called ArcticDB, which is a Python first data frame and is subject of an open source collaboration between Man Group and Bloomberg. And our aim really is to be nothing less than the fastest and the most intuitive way to work with really big data frame and time series data from Python. So the image in the background, recently my son who was 13 was playing around with stable diffusion and was training laureates on images of forests, but particularly on images of forests and mycorrhizal networks that live underneath the soil. These are the kind of fungal networks that the trees use to sort of send chemicals to each other. They share nutrients. Arguably, they also communicate with each other and alert and things like that. The science on that is not entirely settled, which wasn't entirely accidental because my father had just visited and besides being an all-round cool guy, he is also biochemist and he was one of the authors of the first paper that demonstrated that plants do, in fact, sort of exchange nutrients and information using these fungal networks. And it seemed to me that this is a really great analogy for the way that the Python world works in that we live in this sort of Python forest and there's all these beautiful environmental objects that you can see, but there's also this really kind of fascinating thing going on underneath the ground and that is the kind of C API and all of the C-based functionality, you know, that kind of sustains and enhances that. And the interesting thing about Python is that it was entirely deliberate and intentional. It's not an accidental feature. The very first Python release notes, it says the Python interpreter is easily extended with new functions and data types implemented in C. And that was true then and it remains true today. So you might think that, you know, that was a natural thing to do. C is kind of ubiquitous and surely, you know, it's just the obvious thing for a language to do. But actually that's not the case. And if you look at, for example, Ruby, which is a language I've also programmed in and I must say enjoyed programming in and you go and search the documentation. I won't read all of this out, but certain words are actually highlighted and others kind of jump out. Huge, undocumented, unintuitive, clunky. You know, whereas a Python API for C is quite well contained really, it's extremely well documented. You know, I think it's relatively intuitive. It's maybe only a tiny bit clunky. Beyond that, what I want to kind of talk about and my area of expertise and the thing that I would like to encourage you to do, given my background, is to interact with that via C++. And you know, you might ask yourself in 2023, why would I do that? You know, there are clearly other languages around. They have borrow checkers and better haircuts. You know, C++ is kind of sitting there looking a little bit tired. Maybe its genes don't fit so well anymore. And it certainly has had this sort of checkered history. So standardized in 1998, for a long time it was really used as a slightly sort of enlarged object-oriented language in industry. You know, not so much C with classes, more kind of Java with segmentation faults. And then in the last decade or so, suddenly you have this flurry of activity, some of which is perhaps a little impenetrable from the outside, lots of argument about the type system, lots of new standard library features being implemented, lots of debate about what it can and can't be resolved at compile time. But what I would argue is that in amongst all that, what has happened is that this quite subtle and sophisticated modern language has emerged as a subset. You know, for example, you can do generic programming without explicit templates. You can do lots and lots of the things that you like to do in Python. Like, it's very easy to return tuples of different types. You can bind to them with structured bindings and assign them to different variables. And now with things like ranges, we have zero copy views, you can construct very, very elegant data pipelines that kind of express clearly what they want to do. And they're also very efficient. One thing that we make a lot of use of is pattern matching on types and also being standardized at the moment and available in a library by Michael Park is pattern matching of values. So it's starting to acquire also these kind of hascally type elements that again, you know, they aid you in writing very synced and, you know, sort of almost functional code a long way from the sort of bloated object-oriented C++ of the past. The thing that C++ retains is that it is effortlessly close to the machine. This is a website that will be familiar to most C++ programmers and maybe to some of you as well, done by a man called Matt Godbolt when he was working at the hedge fund DRW. And this is a compiler explorer. So in real time, you can just write some code, you can choose a compiler, you can see exactly which operations it's going to emit. On the same website, there's also microbenchmarking functionality, which is super useful because one of the problems with microbenchmarking is that the compilers are now very clever if they detect that your microbenchmarking doesn't do anything. What they're likely to do is to optimize it completely out of existence. This obviously gives you great performance, but not necessarily the information that you were looking for. The main reason that you might want to do this, specifically in Python interop, is that C++ generic programming is not just present, it's actually pretty awesome. There is really no limit almost to the sensible things that you can do with C++ generic programming. And that's really, really important when you're going from a language that has dynamic typing to a language that has static typing. The risk always, as you end up with this massive boilerplate that says, if Python gives me a UN64, I do this. If it's signed, I do this. The same for all the sizes, all the types floating point. You end up with something that's extremely brittle and extremely difficult to modify efficiently. What you can do with C++ is just push that all onto the compiler. You write generic lambdas. You have some kind of variant typing of all the Python types. You just let the compiler emit the object code for it. And it will optimize that and it'll emit the best possible object code it can. Where you need to categorize types, you can actually now do that at compile time with things like constexpr. And the really nice thing about that is, again, it gives you that kind of Pythonic behavior where if something isn't actually going to be executed, it doesn't actually matter if it makes any sense. In the lower example, if value is an integer, it doesn't matter at all that integer doesn't have a substring function because it will never be called. We know it's compile time, it's never gonna be called, so you can just exclude it. You get smaller object code and you get much more elegant branching over the types. Probably the best selling point for this particular audience. You can also do it in a notebook. Thanks to our friends at Quantstack, there's a beautiful C++ kernel for notebooks called useCling that relies on the Cling interpreter, compiles down to LLVM. Between things like the compiler explorer, microbenchmarking, notebooks full of C++, there's a really actually quite pleasant experience of profiling stuff, playing around with it, go and see how fast it is, look at the instructions that are being produced. It's a very, very good way to optimize code these days. I mean, primarily I want to talk about writing C++ extensions in Python because that's the thing that I know and I think that if you want to write large amounts of code to really shift work from Python, that's probably the best way to do it, but I did want to sort of give a nod to the alternative ways of doing that. The most famous, obviously, is Scython. A lot of you probably know as much if not more than me about Scython anyway. Let's use both as a way to accelerate Python code, also sometimes as a sort of glue between C++ and the world of C-like languages. The other two that I would just mention briefly are Ctypes and Ctypesgen. So these are really for particularly code that you don't own, targeting functions and whole libraries independently and they allow you to access that in a pure Pythonic way without having to add any sort of module code. Obviously what you could do is you could write a module at Rapsize, you could link it and then you could expose it yourself, but personally I like programming tasks that are preferable to drinking bleach rather than going around, so these give you kind of pure Python access to things that you don't have that degree of control over. Another particularly honorable mention goes to, I never quite know how to say it, Cpypy, Cpypy, maybe someone can tell me. This again uses the Kling interpreter and it allows you from Python to write pure inline C++. I think it's a really, really exciting project and something which is well worth looking at. It's certainly a really, really lightweight way if you just have a small function that you want to optimize to get started with that. There's no compilation step involved, it just does it all for you, so that's definitely worth a look. But assuming you do want to build some kind of Python extension, what are the kind of different ways you can go about it? You can use the API, it's actually not terrible, there's a big splurge of code here, please don't feel obliged to read it, but if you do delve in, it makes sense and you kind of override a few things and it's highly possible, but in 2023 we probably can do a little better than that. One of the quite venerable ways of doing this is SWIG, SWIG involves an extra binary step that will be familiar to you if you use things like protocol buffers or the Windows world, things like M-I-D-L. SWIG is perhaps a little bit behind the others in terms of its C++ support for the standard library, but the other, the huge advantage it does have is that it will generate bindings for a whole bunch of languages, you can do Perl, you can do Ars, a whole zoo of different bindings you can generate, so obviously if that's part of your use case, that's pretty good. But then the real, the modern too, and as you can see it's already becoming syntactically much, much nicer, boost Python, and then the project that we actually use, which is based on boost Python, started by a guy called Venzoyakob, a now a major open source initiative and that's called PyBind 11. And really between a lot of the modern ones, I think that syntactically they're all fine, you can obviously get up and running, this is everything you need for Python module that will expose a not particularly useful function to add two numbers together.  The thing that really differentiates in my mind is the marshalling to and from the C++ standard library types, because I'm gonna try and encourage you very much to use a C++ standard library, to use a sort of modern C++, and the thing that you don't want to do if you do this is get lost, end up trying to implement support for variants or things like that. If I have an object that might be a type or nothing, like a non in Python, I just want that to be a standard option on C++ without having to worry about it. If I have got a sum type that might be a whole bunch of types in C++ or non, I want to effortlessly expose that to Python and say any one of these types is fine, anything else is an error and PyBind 11 really does that extremely well. So after probably 25 years of writing C++, what's my opinion on how to do it right? And that fundamentally is to use the standard types. This is a little bit of code from a hardcore C++ exposed to Python database, but we're mostly using relatively common things. We're using shared pointers, we're using vectors, we're using the standard mutex. I think it's very important to steer clear of the temptation to say, I'm writing lower level code now.  I actually once incidentally rewrote something, take out vector iterators, using pointer iterators, using pointers instead over contiguous data, actually got slower, which shouldn't really come as a surprise because it turns out the compiler writers really know what's in the standard library, the standard library authors, they really know how the compilers work. It's generally going to be the best thing. Having said that, there's another aspect of design for performance, and that's really kind of thinking about the high level performance behavior, what Martin Thompson calls mechanical sympathy, and what I've come to call toaster-based design. And that's essentially, the computer's a physical device. It has a memory hierarchy. Fundamentally, it's something that needs to be plugged into the wall. An awareness of how that works, an awareness of the penalties. For us, that often means fast scans happen over contiguous data. The prefetching all does what it wants. The processing unit is kept fed, so you're not having data stalls all the time. But the point is you can do that with vectors. If you want to share it, have a shared pointer to a const vector. That way the compiler knows it's not going to change, you can share it around, you get that excellent performance behavior, but you also don't have segmentation faults left, right, and center. A quick zip over things that are kind of useful to know. Python allocates a huge number of small objects because it tends to box things like integer types. It has its own internal allocator for this reason. It's actually very performant, very good. But you do need to abide by Python's rules when you do that. You need to hold the global interpreter lock in the right thread where you're doing that. And that will come to ways of debugging that. Python objects are reference counted. They use I think intrusive reference counts, which is actually one of my favorite techniques from C and C++, and it's very good. It means that the reference count lives in the object, the things that are shared to just the pointer. You go to the object in order to increment the reference count. This introduces this concept that you'll probably run into, called borrowed versus owned breaths, which is kind of non-obvious. But all it really means is if you're responsible for keeping that object alive, then you need to increment the reference count when you start with it, and you need to decrement the reference count when you're done with it. And some awareness of how the scope rules in the C and C++ works is useful here. Because obviously, if you're in closing function scope and the outer function is guaranteeing the lifetime of the thing, then you probably don't need to bother. You can just borrow that ref, forget all about the reference counting. As soon as you, as we do, move into an asynchronous world and you're capturing stuff that's gonna be executed somewhere else at some later point, then you suddenly need to be very careful that you are actually keeping that alive so that any data you're gonna work on is actually there when and where you need it. What can possibly go wrong? Like I said, memory management errors, reference counting mistakes, also two other things to flag. Python has some global static objects like non. If the reference count of non falls to zero, then Python exits with a SIGABORT. You don't want that. Python 11 is fantastic in its function resolution. It'll allow you to overload functions in C++. It also does two passes, one without type promotion and again with type promotion. The only thing to flag there is it is strings-based, so if you have a huge number of overloads and some of them rely on type promotion, then it can get kinda slow, so it can be better just to give things different names. There's a huge world of tooling for C++ now. I would encourage using all of them, basically writing it without these is a little bit like writing a motorbike without a crash helmet, it's just not a very good idea. The clang sanitizers for addresses, threading and undefined behavior called ASAN, T-SAN and UBSAN. Valgrind, Python, the gossip manages its own memory, has a lot of false positives from Valgrind, which is another memory allocation checker, but if you go to the Python source code, they actually publish their own suppressions file which will tell you which things are just Python doing what it does and which things are you doing, things you ought not to. It's well worth building your own debug version of Python, mostly for bragging rights, it just sounds epic if you could say I built my own debug version of Python with all of the reference checking on, and also because it's actually really, really easy, you grab the code, you set the debug flag, you build it, you've done it on loads of environments, it never seems to have any problems. The one thing to be aware of is it's because of the reference count checking which is one of the most useful features, it's not binary compatible, so if you use NumPy as well, you'll need to build a debug NumPy, but that's also super easy.  So, the point is, if you wanna do this, you basically wanna get performance, that's the reason why you would bother fundamentally. First thing to be aware of is, good as these frameworks are, marshalling data from C++ to Python from Python to C++ is not free, these represent the first and second run timings, comparing the raw C++ speed, you can see that it gets better on the second run, but really what you want to do is you wanna take a large volume of data in Python, you wanna pass it over without copying as much as possible, you wanna do a big chunk of work and then you want to pass that back again. On the way in, ideally what you want to use is not copy, but steal pointers, this is a little bit of code from our public GitHub where we're really doing some black magic stuff to steal NumPy pointers, we're getting the strides, the dimensions out, the whole point of this is that if we're writing data, we don't wanna kind of copy it and then pass that to the compressor, we just wanna grab the pointer, pass it direct through the compressor, every stage something is happening, it's being compressed, it's being written to the storage. Same thing on the way out, took me a while to find this really interesting bit of code in NumPy, if you pass an object in from Python, a base object, and you have an array, you can actually manage the lifetime of that just by setting the base object pointer on it, it's completely zero copy, if you don't do that, what you go through is the pyarray new copy method and that can be a little bit problematic because if you've got a million rows and you've got sort of 5,000 columns, that's a gigantic amount of memcopying, could be two or maybe three orders of magnitude difference in the time it takes to do those. The other thing you want to do which is kind of related is where you do need to allocate Python objects, which if you're doing it in Python is gonna be serial, you're gonna have to get the global interpreter locked, you're gonna have to hold it for the duration of allocating those objects in the right thread, you wanna do that as late as possible, you wanna kind of, if you're aggregating, make that result set as small as you possibly can, and then only at the point where you've really kind of got an answer, do you pass that back to Python? This is actually some code where I'm keeping an internal C++ map, a high-performance map of Python pointers so that we can increment their ref counts, managing memory and also increasing the speed at which we can allocate Python strings. Beyond that, if you wanna get into the really magic stuff, you can do Python arena allocation. I wish I could say I invented this, I actually thought of it independently, but then I discovered this really cool project called Quelling Blade, which with a guy with a completely unpronounceable GitHub name, which actually goes a little bit further and it allows you not just to arena allocate PyObjects in C++, it actually allows you to register Python objects as being arena allocatable from within Python. It's a work in progress at the moment, but definitely want to keep an eye on, I have no idea who you are, but hats off. And I guess the main thing, and beyond that is guess work-based optimization almost never works really well. You need to measure, these are Brendan and Greg's flame graphs. You can kind of get the perf input, you can drill down, you can really see what's actually happening. So what have we done with that? ArcticDB is a columnar Python centric database. It stores data frames, it's particularly adaptive for time series. It's really taking all of that knowledge that I've gleaned over those 20 years of working on kind of big server-based databases and it's creating something which is just in the Python process and on a storage which can be disk, it can be in the cloud, you can talk directly to S3. It's extremely fast at doing selections. So this is 100,000 columns, 100,000 rows, 10 billion values. What we want to do is to pluck out three columns, 100 rows each from those 10 billion values. I'm doing this on a pretty rubbish Jupyter Notebook. It has one virtual core, it has eight gig of RAM. I can still do it in around a fifth of a second. Beyond that, it has a lot of features that you might expect from a database. In addition to which, you can rewind, you can keep the whole history of everything you've ever written. It does filtering, you can project columns on the fly with a sort of intuitive pandas like data syntax. You can do group by aggregations, time series aggregations are coming soon, so bucketed aggregations and things like that. The Python data science world is obviously changing. The Apache Arrow standard is becoming a de facto standard for data interchange. It allows you to go to things like Rust to Polars. We're just finishing off our support for Apache Arrow. Also, Pandas 2 is coming along. Pandas 2 has PyArrow support. It's also something that is happening at the moment in Arctic DB. So yes, I hope that I've encouraged you to take a little bit of a look below the surface and maybe have a little play around with it yourselves. If you'd like to have a play around with Arctic DB, it's available. It's source available on GitHub. You can pip install. You can conjure and stall. And I encourage you to give it a look and tell us what you think. Thank you very much. Thank you very much. Thanks for the amazing talk, William. He may have stole some ordnance for CPPCon. We have some time for Q&A. So please use the mic if you want to answer. Hi, just vaguely related. I haven't written CC++ since high school. I wanted to ask maybe for advice. If I want to go the other way around, what's the simplest way to embed Python in C++ code like without hassle? Yeah, it's interesting. Actually, in the same original release notes that Guido wrote, he said that that was also the intention. Actually, PyBind 11 will allow you to do that. So you can embed the Python interpreter in CC++ if you want to do that. Yeah, it provides both functions, generally one or the other. Both is at the same time, it gets kind of messy, but it's easily done. Thank you. And I can't walk. Everybody looking at me walking in here. Thanks for the talk. One of the advantages, I guess, of using C or C++ in Python is that it's much faster. But how does it work when it's like you show examples of pure CC++ code embedded in the Python code? I guess it needs to be compiled. Does it compile every time you run it? Does it have something more clever? Because obviously, that will slow it down. It doesn't get all the advantages. Yeah, so one of the slides was actually comparing if I flip back, if I can find it. This compares the first and second run times. The third line is CPPYY. So you can see that there is actually a kind of an upfront cost. And then that's amortized to some extent. But I think it's really going to depend somewhat on how complex the code you're compiling is. I'm not completely familiar with the CPPYY in terms, but I think there is some degree of caching there. Can you pre-compile it? I don't know. I would have to honestly say I don't think so. I think the just-in-time compilation is kind of the point. And if you wanted to go to pre-compile, then you would just use a C++ compiler. Thank you. Hi. You mentioned weird language with borrow checkers early in your talk. And this was all about interoperability with C++. So have you any experience with this weird language with borrow checker and integrating it into Python? Or what is your opinion on that? Sorry, can you repeat the question? Well, I'll stop being so ubiquitous. You mentioned Rust. Yes, Rust. And that it is not so easily interoperable. So have you tried it? I've tried it a little bit. I think it's improving. I think, I guess, I still think that there is a place for C++. I think particularly in the maturity of the generics, I think that Rust is a very elegant language. My feeling is that the thing that I like about C++ is that the lifetime of objects in memory is sort of terminus with their lifetime within the application. And so yes, it's true that if you don't get the kind of stuff correct in C++, you tend to get segmentation faults and whatever. But actually, those are quite well-handled problems. And whilst ensuring memory safety is a brilliant thing, it doesn't necessarily guarantee that your program, as I'm sure you all know, just because you have memory safety, it doesn't mean that what you're doing is going to be correct. It's still possible to kind of get it wrong. And sometimes having those things kind of co-extensive makes it easier because very easy to check memory lifetimes and things like that. Yeah, I'm sure that Rust is going to grow as a language. And I'm sure that the Python interop is going to develop. It's not bad at the moment. The other thing is that C++ is literally a superset of C. And Cpython is written in C. So there's this ease of working with a C API that is hard to rival, I think. Yeah, that's pretty much in my view. Thank you. Thank you, William. We're just out of time now. So if you have any more questions, you can ask the speaker later outside. And thanks again. Thank you very much. Thank you.


In the 1920s, the tomb of King Tut, undisturbed for over 3,000 years, was discovered in Egypt's Valley of the Kings. The television was invented, and Charles Lindbergh flew solo across the Atlantic Ocean and the airplane named the Spirit of St. Louis. By 1924, Sirius illness and death is attributed to the ingestion of Radium-226 by women factory workers who had painted watchdials with luminous, radioactive paint. New Jersey dentist Theodore Bloom observed an unusual infection in a watchdial painter's jawbone which he surmised was caused by the radioactive substance used in the manufacture of watchdials. Two years later, the American Medical Association condemned the use of X-rays to remove body hair due to severe health problems, occasional disfigurement, and even death. By the end of the decade, the International Congress of Radiology established the International X-ray and Radiant Protection Committee, the forerunner of today's International Commission on Radiological Protection, which recognized the hazards of radiation and the need for control. Within a few years, this committee recommended the limitation of dose received by radiation workers. Its recommendations served as the basis for worldwide radiation protection until the 1950s. One year later, the U.S. Advisory Committee on X-ray and Radiant Protection was formed. This committee is the predecessor of the National Council on Radiation Protection and Measurements, which was reorganized in 1964.


Hello with this lecture, we're gonna work some smaller test type problems that will be the size that could be in multiple choice type questions First one says if a check correctly written and paid by the bank for 452 is Incorrectly recorded in the company's books for 389. How should this error be treated on the bank reconciliation? So obviously what we will see in the bank reconciliation We'll see the bank statement has something different than what our books say and obviously if we take these two numbers We have the bank says that we have a 450 452 on the bank statement and our books say that we have 389 then we have a difference of the 452 minus the 389 and that's going to be 63 now our books are the thing that is wrong. So on our books side of things We wrote it on there at 389 and that's too low. Therefore We're gonna have to take this money the 63 out of our account We're gonna have to reduce our check in account side of it on the on our books side of things when we do the bank Reconciliation and then of course what'll really happen and real, you know after we do that is we'll make the adjustment to it Meaning we'll actually credit cash and then we'll have to debit whatever account needed to be debit Debited when we wrote the check in the first place Next one says if a check is correctly written and paid by the bank for 541 is Incorrectly recorded in the company's books for 514 So we switched to those two numbers obviously the 4 and the 1 how should this error be treated on the bank reconciliation? So this is another one that will be caught by the bank reconciliation That's why we're doing the bank reconciliation and of course the bank got it right because they actually had the check and We on our books when we entered the data into the book It's probably because of course our books were writing the checks outside of the system And then just entering it in and that would mean that we'd have a data entry error here by transposing those two numbers and it should have been the 541, but we're gonna subtract 541 minus the 514 what we Accidentally put in there. There's a twenty seven dollar difference and if we're doing the bank Reconciliation we'd have to fix our books So we'd have to go to our side of the books and say okay. It should have been 541 we put in 514 Therefore we're gonna have to decrease because it was a check going out our book balance by 27 Again, what will happen after that in real life? Well, we would have to make a journal entry for that We'd have to credit cash reduce cash in some way and record the debit to something else Whatever we wrote that check for if it was the utility bill or whatever We'd have to put it into the utility expense or something like that We have the following information is taken from the company's balance sheet and to skip down to the bottom before we read off The balance sheet amounts here and it says if net credit sales for the current year was 606,000 that the company's day sales Uncollected for the year is what and I'm gonna use a 365 days in a year We're gonna assume it's a 365 day a year not a leap year or anything And so we have the following information So what we're gonna need to do this is gonna be a ratio that we are going to be calculation and it's gonna be the day's sales Uncollectible I collected Collected All right, and what we're trying to do is figure out how long it takes between a sale on account To I make the sale and then to receive the money from the sale and the way we are going to calculate that is we're gonna take the AR accounts receivable. I'm gonna select alt enter so to go underneath an AR divided by credit sales So these are sales that we made just on account that went into accounts receivable I'm gonna go ahead and merge these cells So it'll be a little bit larger and I'm gonna underline this home tab font underline There's our ratio that we're gonna have and now we just need to plug the numbers in there Oh, and then we need to multiply that. Sorry. We need to multiply that times 365 so we multiply that times 365 So if we plug this in there then we're gonna say this equals and the accounts receivable is this 75 922 75 922 divided by the credit sales. We have to take the credit sales. We can't take the cash sales We gotta kind of take those out. That's why they gave us the credit sales down here And that's gonna be the 606 Thousand and if I if I make the decimals here, I go to the home tab Numbers and I'm gonna add decimals like this. Notice. It's it's a long number here now We could round it to point one three and then multiply it out and we could be off by a little bit by rounding So note, if we do it in Excel, it will not Reduce it due to rounding it'll it'll use the actual ratio that has been input Even though we can only see the ratio up to these amounts the actual ratio being this ratio So keep that in mind if you're if you're working a problem and you're off by rounding That's the reason so we're gonna say this equals this number times 365 days in the year so we've got 46 and again We could see if there's any rounding here and we're gonna go to add decimals 45.7 3 is what we got next one says that in the process of reconciling its bank statement for April Company compiles the following information gonna skip to the bottom look at what we want to do and then go through with that Information so it says that the adjusted cash balance per the books at April 30th is and I'm assuming what is what that's what we want So what we're doing is a bank reconciliation We're looking at our side the stuff that we got wrong or the stuff that we need to correct our cash accounts by and that's the purpose Generally of doing the bank reconciliation so that we can Find things that the that cleared the bank that we probably didn't record correctly and that's usually what we're going to pick up So what we have here is we got a cash balance for April That's what we're gonna start with we're gonna have to adjust that for anything that we found out about from the bank statement That we had not accounted for so we're gonna start off. This is what we have before the bank Reconciliationing process and then we have a deposit in transit at the end of the month So what we need to think about is is that the banks fault or that's our fault? That this difference is there and in this case it's that's the core thing that's always gonna be in the bank reconciliation It's the banks fault. That's there and it's really nobody's fault. Obviously the thing didn't clear that the Deposits were made they haven't yet cleared the bank, but our books are correct We have that information now therefore. We're not gonna fix our cash balance Our cash balance is right the cash balance on the bank statement is wrong due to the fact that the information is not there yet Then the next one says outstanding checks at the month-end. Well, that's the same thing on the other side Meaning we're right. We know we wrote the checks and they went and got sent out It's just the fact that the bank doesn't know about it yet and therefore the bank balance is what needs to be adjusted Not our balance. We're not gonna fix our balance for that and then we have the bank checking for print new checks So now we have the $75 that the bank automatically took out of our account because we purchased New checks or got checks printed or some kind of service they provided and we're gonna have to say I didn't know about that, but that's true. We didn't have that service and therefore we're gonna have to reduce our balance It's not included in our balance. We didn't know about it now. We do now will include it Then we have a note receivable and interest collected by bank on company's behalf Now depending on what type of company you are looking at this may not happen all the time But what we're saying here is that there's an investment that's that's generating interest that's automatically putting that interest into the checking account as it accrues as it as they earn it and We're not tracking that until we get the bank statement when we get the bank statement We go, okay. Yeah, we got this interest from this investment that happened now. We know about it. That's good We're gonna say interest That we got income and so that's good It's going up our balance is too slow by this interest because we didn't know about it So we need to increase our interest at the time we get the bank statement which indicates that that has then happened So I check paid to company during the month by a customer's returned by the bank as NSF not sufficient funds. So we don't like to see that So what happened is we got we got money We deposited it and then it bounced it got they came back So that means that we're gonna have to reduce our check we put that in our bank balance But it's not a good check. It wasn't clear didn't clear so not sufficient fund Check that bounce that we're gonna say we're gonna to reduce our balance by that then if we add these up I'm gonna equals the sum of these and That should be our bank balance at this time And of course if we did that with a calculator We're doing six two four five minus seven five plus seven one zero minus five four zero and there We have this six three four zero also note that these would be adjustments that we would need to make meaning We would have to credit cash and debit something like bank expense or or You know miscellaneous expense for checks or something like that or office supplies possibly We would have to debit cash here and credit interest income and the not sufficient funds We'd have to credit cash and then debit possibly accounts receivable or something like that And then see if we can get that money from the customer


Alright folks, I know that it's a bit of a disappointment that Nintendo is sticking to their guns and removing Super Mario 3D All-Stars, Mario 35, even the Mario Pinset. Pretty much anything to do with the 35th anniversary of Mario is ending on March 31st. Now look, Bowser's Fury, you know, Super Mario 3D World plus Bowser's Fury isn't going anywhere, but that was probably going to release regardless of the 35th anniversary same thing with Paper Mario, same thing with the upcoming Mario Golf game as well. So those games are kind of like wrapped in a little bit to the anniversary, but also technically they were coming anyways, so they weren't necessarily 35th anniversary specific, but Mario 35, the Mario Pinset, and yes, obviously Super Mario 3D All-Stars, all of these were done with the intent to be about the 35th anniversary. And Nintendo has decided, and they told us this from the get go, that these things would be ending on March 31st, both physically and digitally. And I think the digital one is what upsets people the most. But I'm here today to tell you that at least for the month of April, and maybe for even a little bit longer, you will still be able to buy not only a physical copy of Super Mario 3D All-Stars, but you'll be able to buy a digital copy as well. That's right, past the March 31st date. But how? Well, there's actually a neat little work around that Nintendo themselves have confirmed. So before I get into that, I want to remind you that we do have a giveaway going on right now. We are giving away $100 Nintendo Switch, PlayStation, or Xbox Gift Card. We're also giving away a copy of Monster Hunter Rise, and also two additional $20 Nintendo Switch, Xbox, or PlayStation Gift Cards for a total of four winners this month. To enter, head down to the pinned comment or to the description for more details and figure out how to enter. I wish all of you guys luck. And heck, we're really close to 66,000 subscribers in the channel. So I would love it if you guys go hit that subscribe button. Now look, I know a lot of you guys are waiting for a new HTN episode. No, here's the news and all that. I'm not back into a regular content flow just yet. I have some things in the works behind the scenes. And one of those things is actually going to be linked in the description because I'm going to source my own website. That's right. We now have a website for this news. But the news actually originated from Video Game Chronicles or VideoGamesChronicle.com. And essentially what's happening is there is going to be an ability to purchase digital copies of this game and physical for a little while past March 31st. Now physical, it's obvious what's happening with physical, right? Nintendo said they are done printing copies of the game after March 31st. So up through March 31st, Nintendo will still be making physical copies at the factories of Super Mario 3D All Stars. So there still will be, you know, one, two, maybe three more shipments of those games heading to retailers in the month of April. So retailers are going to have physical copies available for a little while. And obviously they can have them available until they sell out. Now that's been known for a long time. That's been obvious. That's not new news. But what is new news are digital copies. So we know it is being removed from the Nintendo Switch eShop. And unfortunately I don't have any good news for you there. You will not be able to purchase it on the Nintendo Switch eShop past March 31st. Now if you already have bought the game, you will be able to re-download it. So that's, you know, neat that Nintendo's not technically taking the games off their servers. They're just taking the front-facing ability to purchase the game. But you can still buy a digital copy anyways, even if you don't have a Switch right now and you're just waiting, right? Like maybe you're waiting for that Switch Pro, and maybe you're waiting for something else. Coming down the line, well, you still might be in luck. And if you're waiting for Switch Pro, I mean, take advantage of one of these things now before they're gone. But Nintendo has now confirmed that you will be able to purchase digital codes from Amazon and other online retailers past launch assuming that these companies have bought these digital codes from Nintendo, you know, by the end of day on March 31st. So in theory, Amazon today could buy 1 million digital codes from Nintendo for Super Mario 3D All-Stars and then still be able to sell the game over the next year. Now that's just in theory, of course. I don't actually think Amazon is going to go ahead and pre-purchase 1 million digital codes for it. But when you think about all the possible online retailers and how many of them are going to be interested in possibly stockpiling some of these digital codes to continue to sell this game long afterwards, it's definitely going to be more than one. There's going to be several retailers taking advantage of the fact that, hey, this is going to be a limited thing. Now the worry, of course, is that once you get past March 31st, the retailers could charge whatever they want. They could just change the price because there is no MSRP after March 31st because Nintendo doesn't sell the game anymore. So they could get away with jacking up prices and that is something you are going to have to pay attention to. But if you're looking to get a Switch Pro, you can literally download or purchase a digital code today if you want even and just hold on to that code and don't use it. It's still going to be valid I think for up to 12 months or something like that or if not longer. So like literally you'll be able to use these codes for a long time. So yes, you won't be able to buy it on the Nintendo Switch eShop, but in person physically you'll be able to buy it for a little while. Also online physically for a little while as well. And digital code wise, hey, if you're buying digital codes on Amazon, from Best Buy, Walmart, wherever you're buying your digital code from, you'll still be able to do that as long as they still have supply. So it almost is the same supply issue or supply reasoning that you could still buy physical after March 31st for digital, except they can obviously plan ahead for digital, right? They can plan more ahead. Amazon, as I said, in theory could put in an order for one million of these codes knowing that in the next year they are likely going to sell all one million of those codes because Nintendo doesn't have the game on their eShop anymore. Demand for the digital codes from other third-party retailers are going to be way higher, way, way higher after March 31st than they are right now when people could just go spend the same amount of money but buy it directly from Nintendo. Now I always tell people take advantage of rewards programs like, you know, like you're going to buy digitally, buy a digital copy from GameStop with their rewards programs, stack your points up, get your gold points, and get your points there, whatever, that's just me. I think just being a little bit too smart for my britches when it comes to being a consumer and maximizing my money, but yeah, you guys, let me know if... How disappointed you are that Nintendo isn't changing their plans. Do you think Nintendo is ever going to bring Super Mario 3D All-Stars back like they did with the NES Classic? You guys remember they brought that back due to high demand. And do you think that Nintendo has a path here going forward where they could possibly bring these games back individually? I know that's been a theory going around for a while that maybe they bring them back at 20 bucks a piece, you know, maybe 30 bucks a piece or whatever they decided to charge, do you think, you know, that these games should just go away and maybe Nintendo should properly remake them? I know that's a controversy that goes back to when these games were announced but I don't know, you guys let me know your thoughts on this down in the comments below because right now I'm just one person chatting with myself and hoping that you guys give a shit. Also go ahead and check out nintendoprime.com and let me know what you think. I am doing a lot of work on it today. I did some work on it last night. It's not nearly, you know, really ready ready but I am going to be putting up some news articles there including this one that I just did for this video. I actually had it posted there before here because making a post is a lot quicker than making a video. So yes, you're going to see a lot more Nintendo Prime links in the description sourcing ourselves but it's really just sourcing our website where we made the original post that will have all the additional information on lockdown for you guys and it easily conveniently to read thing. Also by the way, we started a Gilded. I don't know if you guys know what that is. You guys all know what Discord I'm sure but Gilded is like Discord but offers a lot of unique features that I really really enjoy. So I am now, we now have a Nintendo Prime Gilded. So I really hope you guys want to join that. I'll put a link to join down in the description as well because I kind of like it more than Discord. No, I'm not abandoning our Discord server. We're going to keep it going but I'm going to be much more interactive with you guys on Gilded than I ever was on Discord just because of how Gilded works. So alright folks, thank you so much for tuning in and I'll catch you in the next video.


I'm Jeff Dice, president of the Mises Institute and our website Mises.org is one of the most highly visited economics websites on earth with more than 6 million visitors every year. That's about four times the amount of traffic that mainstream sites like that of the American Economics Association receive. But Mises.org is much more than just a website. It's the intellectual home for millions of committed libertarians around the world and it's the epicenter of the growing Austrian movement. Plus most importantly, it's home to the greatest free libertarian library on earth. For the Mises Institute, Mises.org is our calling card and our doorstep. It's our single greatest tool for outreach. It connects us to the world and connects the world with the greatest libertarian scholarship, all completely free of charge. But we need your financial help. The current Mises.org site is outdated. The basic architecture is more than 15 years old. The site needs world class design, aesthetics and functionality. It needs an easily searchable database of our enormous library. In short, we need to make sure our technology is worthy of our message. We've committed more than $100,000 to rebuilding Mises.org and we've hired top web design people to make sure that the site is world class. But we need your help to make sure this effort is a success. Please go to Mises.org today and click on the rebuild banner at the top of the page. Most of $100 or more or recurring monthly gifts of $15 or more will receive our new limited edition Mises.org t-shirt in gray. But your gift of even $5 or $10 makes a big difference. Thank you and as always thanks for your support.