Hello everyone, this is CircuitPython Weekly for Monday, October 16, 2023. This is the time of the week where we get together to talk about all things CircuitPython. I'm Dan and I'm sponsored by Adafruit to work on CircuitPython. CircuitPython is a version of Python designed to run on tiny computers called microcontrollers. CircuitPython development is primarily sponsored by Adafruit, so if you want to support Adafruit and CircuitPython, consider purchasing hardware from Adafruit.com. This meeting is hosted on the Adafruit Discord server. You can join any time by going to adafru.it.discord and there you'll get an invite to the server. You hold the meeting in the CircuitPython dev text channel and the CircuitPython voice channel. This meeting typically happens on Mondays at 2 p.m. U.S. Eastern Time, 11 a.m. U.S. Pacific Time, except when it coincides with the U.S. holiday. In the notes doc, there's a link to a calendar you can view online or add to your favorite calendar app. We also send notifications about upcoming meetings via Discord. If you'd like to receive these notifications, ask us to add you to the AdSign CircuitPython Easter's role on Discord. There's a notes document in Google Docs to accompany the meeting and the recording. The final notes document includes timestamps to go along with the video so you can use the doc to skip around and view the parts of the video that interest you most. The meeting tends to run 30 to 45 minutes. After each meeting, we post a link for the next meeting notes document to the CircuitPython dev channel on the Discord. Check the pin messages to find in that channel to find the latest notes doc so you can add your notes for the following meeting. If you wish to participate, but cannot attend, you can leave hug reports and status updates in the document for us to read during the meeting. We hold this meeting in five parts. The first is community news, second state of the CircuitPython libraries, and we look at third hug reports for status updates and fifth part in the weeds, and I'll explain all those parts as we get to each one. All right, so we'll start off with the first part of the meeting, community news, and I will take a time stand here. Okay, let's see. Okay, I just have, this community news comes from our weekly Python for Microcontrollers newsletter, which I'll tell you about at the end of this section. So the first, I have two items of interest this week that I've selected. The first is Bookworm, which is the new version of Raspberry Pi OS. It's the version that's needed for Raspberry Pi 5, which is not quite out yet, but it's pre-orderable from various places, or you can get on waiting lists. And it comes from Debian Bookworm, which is mostly made up of incremental updates of the software that was in the previous Debian Bullseye release. There are a few small changes. Have a look here for the list. There's a list that's in this thing that I linked to in the notes document, but they mostly won't affect Raspberry Pi users. However, for the last year or so, we've worked on some major architectural changes to the Raspberry Pi desktop, and these are launched for the first time in the Bookworm release. Some of the changes under the hood in the release include Wayland as the default display system for Raspberry Pi 4 and 5, use of the PipeWire audio system, and Firefox as a supported alternative browser to Chrome. And then probably the thing that we'll notice the most is that, very importantly for how you use Blinka, the compatibility layer for certain Python libraries, there are changes for how Python modules are installed on Bookworm. Basically, you have to use a VM, a virtual end, and we were just talking about this in an internal meeting. It's going to be a big obvious change for people who need to use Python and Python modules. So as we figure out what to do here, we will write up some things. And everybody uses Python modules on Raspberry Pi OS is going to be affected by this, so there's going to be a lot of information and complaints about the changes, I'm sure. Okay, next up is an educational item, Raspberry Pi Pico with CircuitPython, a primer. This is a YouTube and blog post by Dronebot Workshop. There's a link in the note stock and it's on the channel. And this looks like a really nice introduction, I looked at it very briefly. So take a look at that if you're just getting started. Okay, so where did all this news come from? It comes from CircuitPython Weekly Newsletter, which is a community run newsletter emailed every Monday. Complete archives are available from AdafruitDaily.com. Newsletter highlights the latest Python and hardware related news from around the web including CircuitPython, and MicroPython developments. You can contribute to the newsletter in a variety of ways. Really easy way is to email news that you think is of interest to cpnews at Adafruit.com. You could also tag us with the hashtag CircuitPython on Twitter or Macedon or you can submit a pull request to the draft of the newsletter which is in GitHub. So all those things and feel the free to contribute any way you want. We're really interested in things that you've read that you think would be of interest or your own projects that you think would be of interest and news. So take a look at that. All right, let me take another timestamp. The next step is section is the state of CircuitPython, the libraries and Blinka. This is a quantitative overview of the entire project. It gives us a chance to look at the health of the project separate from our qualitative status updates. We'll talk about the project overall and then separately discuss the CircuitPython core, libraries and Blinka. This report data is generated in the previous night so it's a little bit out of date, but it's largely up to date. So overall, in the past week, there were 20 pull requests merged with 19 authors. There are some new names I recognize, J-I-N-S-T Komota, Minor Demon, and Lin Smitka, maybe that name has already come up. I'm not sure, but anyway, welcome to the new people and thank you for your contributions. So as I mentioned, there are 19 authors, there are seven reviewers, and there were eight closed issues by four people and nine opened by nine people. So still roughly keeping par. And we assigned the Hectoberfest label to zero issues, but we assigned a bunch of issues to actually, I don't know if we did or not. But things that you do, PRs that you do and other confusions that you make are eligible for Hectoberfest in our repos. So take a look and sign up for Hectoberfest if you'd like to get recognition. So next up is the CircuitPython core and Scott, would you mind reading that? Sure, happy to, thanks, Dan. Okay, numbers for the core. We had seven pull requests merged from nine different authors, which is awesome. Thank you to all of our authors. And we have three reviewers, myself, Dan and Lamor. We have 20 open pull requests, so we're still comfortably under that 25 one page mark. So thank you to everyone there. Our oldest is 468 days old, and I believe that's the multiple one mass storage stuff that I think is waiting on tack are the eight of person that works on tiny USB. But there's also a number of board open PRs in there. So if you have some boards that are not Adafruit, check those out and see if there's some pinnakes up there. Issues-wise for the core, we had six closed issues by two people and three open by three people. So we're actually net down for 725 open issues. We have six active milestones, and this is used for prioritization of Adafruit-funded work. At the time these were taken, we had one issue that was not assigned to the milestone, so we'll just want to keep track of the triage list. We have 11 open issues for A2X, and we have 54 open issues for 9.0. So we're going to continue working there generally. A2X is the current stable releases, and then 9.0, it will be the major release coming in the next couple months. And that's the update for the core. Okay, thank you very much, Scott. Okay, next up is an overview of the libraries, and FoamyGuy, are you available to read that? Yeah, we can do that. This section covers the CERC Python libraries, which is all of the repositories on GitHub that start with Adafruit underscore CERC Python underscore, and then whatever the library name is. This is the Python layer of code that allows you to interact with various different pieces of hardware, or provides helper utilities to just make it easier to do things that are common in CERC Python projects. Across all of those libraries in the past seven days, we had nine pull requests merged by eight authors. All of our authors, I think I have seen before, but I will just say thanks to our authors, Cedar Grove, BlitzCDIY, BabelockB, and Michael Pocusa, who are perhaps slightly less frequent, but very good to see them. And then thank you to all of our more frequent contributors as well. For those nine PRs, we had five different reviewers on them. So thanks to our reviewers and thanks to Liz for reviewing PRs this week as well as the usual folks of Jeff, myself, Scott, and Dan. Of those merged pull requests, the oldest one was 255 days, so still knocking out the oldest of our PRs. There were a handful of other older ones, and then all the way down to the one day brand new ones at the bottom of our list here in the note stock. That leaves us with 40 open pull requests, the oldest of which is 424 days, although I believe that one is a draft. The newest of which is one day, so we've got some new ones in the mix as well. Over the past seven days, we did have two issues closed by two people, and four new issues opened by four people. We do not have any issues labeled Hectoberfest, but as was mentioned in the Discord, that is tagged on the repos. And so the individual issues and PRs don't actually need it, they still count. We do have 653 open issues currently, with 19 of those labeled good first issue. If you are interested in getting involved in contributing to CircuitPython, head over to circuitpython.org slash contributing. On that page, you can find a list of the open pull requests, as well as open issues. And you can filter those issues by their tags, including the good first issue tag, which is a great place to find stuff if you are brand new or don't have as much experience, but still want to get involved. Across the PyPy stats for this week, we had 60,738 downloads from PyPy over those 314 libraries. And the top 10 looks relatively standard. Most of the usual suspects in the top 10 list for the downloads this week in libraries. There are a list of libraries that have been updated in the last seven days in the note stock, as well as the one new library. If you'd like to take a look at that, that's in there. But that is what we've got for the libraries. Thank you. All right, thank you, Tim. All right, next up is Blinka, take a timestamp. Melissa's off today, so I will read the Blinka section. And just to explain, Blinka is our compatibility layer for CircuitPy found on single board computers like the Raspberry Pi. So in the past week, we had four pull requests merged by four authors. And one reviewer, there are three remaining open pull requests. Most of which are pretty old. So there were zero issues closed by zero people and two open by two people. There are now 73 open issues. There were about 10,000 Pi downloads in the last week. That's amazing. And there were 4663 Pi wheels downloads in the last month. We're now supporting 121 boards with a single board computers with Blinka. And that is it for Blinka. Okay, next up is Hug Reports. Hug Reports is a chance to highlight folks in the CircuitPython community and beyond for doing awesome things. I'll start and we'll go down the list alphabetically after that to give everyone a chance to participate. If you are text only or missing the meeting, I'll read your notes when I get to them in the list. All right, so as I said, I'll start. So thanks very much to Scott for running the meeting last week and picking up extra tasks while I was away unexpectedly for a couple of weeks. And also thanks to ADCC for detailed diagnoses of the macOS Sonoma problem. We'll talk about details of that problem a little more later. Next up is Algorith C Grovers. Hug Reports, thanks to ADCC and DNH for continuing analysis and efforts to address the macOS delayed, say, reload issues. That's the Sonoma issue we're talking about. And thanks to Foamy Guy for illuminating how RTD and Sphinx work to build code documentation. Very enlightening. Next up is ADCC, another timestamp. I've been hanging around this project for the past several weeks and I want everyone to know how refreshing it is to find group of people to play with a big hug to everyone. Thank you, ADCC. And next up is Deshipu. Okay, thank you to Scott for the reviews. You really drag with you sometimes and don't do reviews all the time. All right, thank you very much. Okay, let me make up a pretend timestamp because I forgot to take one. The next up is Foamy Guy. All right, thank you, Dan. Hug Reports for me this week. Thank you to Mechamalisa, who gave me a nice point in the right direction on a issue I was working with with Blinka Display.io and trying to get it to interact with PIL. And also, thank you to Todd Bot for a reminder to update the cookie cutter along with some changes, some other changes that I had mentioned down in the weeds to talk about later. And that's what I've got. Thanks. All right, thanks. And next up is Liz. Hello. Hug Report to Carter for working with me on the AD 5693 Circle Python Library. I really appreciate your patience and excellent feedback. And then Hug Report to Scott for assisting with adding the AD 5693 library to the bundle and getting it all set on Read the Docs. All right. And now next up is Retired Wizard. Do you want me to read yours or will you speak? All right, I'll read it. Thank you. Okay. Thanks to Tanu for the work he's doing on PySigRock. The ability to see digital signals makes troubleshooting issues that were previously next to impossible for me to solve accessible. And a group hug for a community that's always quick and heavy to lend a hand, and especially all the aid of food folks. All right. And next up is Scott now. Hi, Dan. First to Hug Report to Foaming Guy for filling in on Deep Dive last week. And also to you for tag teaming and collaborating on the 120 merge. I'm enjoying it. I'm enjoying working with you. So thank you. Thank you very much. Okay. And finally, Todd Bot, I'll read his contributions. Thanks to Naradak for helping me understand CIRCUP-related library packaging setups and custom bundles. CIRCUP ad bundle can be really handy. Thanks to Deshi Poo and Dan H for talking through comparative data structure efficiencies. And thanks to Foaming Guy for helping me be less done when adding libraries to a library to the community bundle. Okey-dokey. All right. Thanks, everyone. We'll now move on to status updates. Okay. Well, I'll fix that in a minute. I'll start. Status updates is our time to tell folks what we're up to individually. I will start and we'll go through the list alphabetically. When I call on you, take a couple of minutes to talk about what you've been doing since last meeting and what you'll be doing until the next meeting. This is also an opportunity to provide tips and tricks relevant to what people are working on. If a discussion becomes too long for status updates, we can move it to the in the weeds section. All right. And I'll start. Okay. So I'm continuing on the MicroPython v1.20 merge. I think all the ports now have boards that build. We'll be ready for a draft PR very soon and maybe even a regular PR because things are looking good. And I'll be doing a circuit Python 8.2.7 release soon as well with I think one or two fixes and a bunch of new boards and board updates. And one more thing I'll say here is that I'm looking at Mac OS Sonoma problem. So Sonoma cannot in late September and it has this problem that it delays rights to USB drives or maybe all drives is not really clear and it can write part of the data, then wait 10 or 15 seconds and then write the metadata. So if you try to look at the file system between those two times, then the file system is in a completely inconsistent state or it is not completely, but it's in inconsistent state. And this really messes up auto reload because auto reload only wakes three, three quarters of a second. It assumes that when you do do a write that the data all arrives pretty promptly. We have had delayed rights in the past on Linux and Windows, but they don't tend to delay. When they just get around to doing a write, they write everything at once. And this business where there's a partial write makes things really bad. It gives you IO errors during auto reload, for instance. So ADCC has done a lot to characterize the problem, has noted like which, whether it's the data or the metadata that's getting written first, and we will start to complain to Apple more about this and we encourage you to write up your issues and submit them to the feedback system that Apple has for Mac OS so that we can lean on them to fix this problem. And there's a PR, not a PR, there's an issue about this. Maybe somebody can find that and paste it in the notes in the chat. That would be great. Okay, next up is C Grover and I'll read theirs. Submitted the Chime Synthio voice helper library to the community bundle. Working on two more voice classes. String, plucked boat and hammered lutes, zithers and harps, an aerophone, flutes, etc. Strings are a particular challenge because the string wave shape gradually changes after the string starts oscillating. The objective is to simulate instrument voices using overtones and envelopes rather than samples, since samples become unwieldy for overtones that are not imager harmonics of the root note's frequency. For example, an open tubular chime second overtones 5.4 times the root frequency. That's interesting. Okay, built and tested a custom PCM510XA I2C stereo DAC breakout PCB. It's a replacement for the discontinued Adafruit UDA1334 using currently available stock chips on an Osh Park board. A Playground article is in the works. I'll just remind folks Playground is a new feature available on the Adafruit website. I think it's at adafruitplayground.com where you can write up things that look like your own mini learn guides and share them with other people. And finally developing a generic accelerometer tap detector library for sensors without built-in tap detection. I have working test versions for the BNO055, 9DOP, and non-check sensors. The BNO055 is sensitive enough to detect single or double taps on any axis. The less sensitive non-check sensor works best if only the X-axis is used. Okay, and next up is Deshipu. I got the QRIO. I added a method to QRIO that lets you get all the QR codes that are visible on the image and get their coordinates so that you, for instance, you control the camera somehow. You can redirect it towards that, then the biggest QR code, for instance, read it. And it also returns all QR codes, not only those that could be decoded. Well, hopefully it can detect smaller ones this way. Right now, and that's in review, and we are working on making the code nice. Looking right now into MicroBeat's speech module, that was a huge, huge fun when MicroBeat... MicroPython for MicroBeat feels just landed. Everybody loved it. It's basically code ported from Commodore 64 for a speech synthesizer. And if MicroBeat can manage to synthesize a speech, then most of the circuit Python boards should be able to do it as well. So I'm looking into porting that basically audio core. I'm not sure yet if I will manage to make it work in the background, like it does on MicroBeat, or if it will just generate a buffer that you need to audio core, then that would work as well. You will see. And I'm not making much progress with the adversion of it, I initially wanted to use interrupts, but I really can't figure out how to do it on the SMD that I wanted it for. I looked into just doing the touch detection regularly, but doing it in-between the system ticks, so as to not slow down the system, as to not wait for return value. So I would initialize the check and then check it on the next tick. But unfortunately that hugs the ADC. You cannot use analog IO in the meantime. So I'm not sure that's such a good idea, but I'm out of other ideas about how to implement it. So for now I'm just letting it lie for a while, maybe I will. It's my inspiration. That's all. Thank you. Thank you. Next up is ADCC and I'll read theirs. Other priorities have cut into the time I'd rather spend on CP. So no real progress on either of the CP related tasks to report this week. The items I'm working on are underscored BLEIO support for PICOW and a macOS workaround for the Sonoma file system synchronization problem. And next up is FOMI guy. All right. Thanks, Stan. Let's see here. Let me get back to the notes. This past week I worked on a couple finishing touches in the template engine library, mostly getting the Read the Docs project set up and making a release and adding it to the bundle. During that process, when I was working with Read the Docs, I noticed that the Read the Docs builds were failing. Not only on this library that I was working on, but actually across all the libraries, if they have commits that are recent enough, if they don't have recent commits, then it wouldn't have built, so they haven't failed yet, but I have a little bit more in the weeds to talk about what is going on with those. Some of the other stuff that I was working on though over the past week was a FunHouse IoT dashboard that you can access through a browser. It uses the library. That's kind of a demonstration of using those things together. And then I was also working on the changes inside Pi Game Display in order to make it work with the new version of Blinka Display. I have gotten closer on that front. I managed to get colored images out of it, but the colors aren't what they are expected to be based on the input, so I still have some work to do. I think maybe it needs to handle the format conversion to perfectly, or something like that in the code. I found some reference code that makes that conversion, so I have something to try, but haven't actually plugged it in to give it a go yet. And I do on that front also want to explore trying to just cut out PIL from the middle. PIL used to be used in Blinka Display a little bit more, and so the Pi Game Display was taking that PIL object and painting it inside the interface, but Blinka Display I.O. does not use PIL as much anymore internally, so I'm thinking it might be possible just to skip PIL and go directly into Pi Game, but I'll have to read up a bit more on the Pi Game Display APIs in order to make that happen. But that's what I have got in the works. Thanks. All right, thank you. All right, next step is Liz. All right, at the end of last week I started working on a Serger Python 3.8 breakout, and this is a breakout that lets you control USB PD power supplies. This involved looking at chatGBT4 log that Lady A had started a few weeks ago and referencing the existing Arduino library. I also wrote some project code for this week's project from the Ruiz Brothers. It's a prop from the Five Nights at Freddy's games, which I've never played before. But luckily, Pedro's son is an expert and he was able to offer good guidance to us on how it's supposed to look and act, and he is having a lot of fun of it now. So that learn guide will be out a little later this week, and that's all I've got. All right, thank you. And finally, Scott. Hello. I'm booting up after a long weekend. I was at my parents' with the kiddo. I should be around all this week, including DeepDive on Friday. I've been working with Dan on the 120 merge and I think we're really close. I'm looking at the dock build failure right now. And I want to put it on a few boards and just make sure that there's no obvious bugs. And then I'd like to get to 121, actually, because 121 has heap growth stuff that I'd love to switch us over to. So that's where I'm at. I'm in merge land. The only other thing that's going on, or one of the other things going on, I'm sure there's other stuff. But I'm working with SyLabs on a presentation about CircuitPython on their BLE chips. They're MG24s, I think. So I'm doing a bit of a generic CircuitPython portion of that talk. So if you want to sign up for that, it's really early in the morning for me. It's 7 a.m. Pacific time. I think I assume they'll post it afterwards. But they did all of the work for the SyLabs port, so I want to give some props for that. And put them there. And yeah, if you're interested in CircuitPython BLE on some SyLabs chips, check that out. That's it for me. All right, thanks. So finally, we're now at the in the weeds section. This is where we talk, have more longer form discussions that people have identified ahead of time, add stuff to in the weeds beforehand so we know what's coming up. But this allows us to get community input and brainstorm a bit on some things that maybe having an active verbal conversation would be better than just bringing it up in the posts in Discord. So for me, Guy, why don't you go ahead and describe what you would you like? Yeah, thanks. So I have found this blog post. Let me also put the link in Discord if anybody wants to see the blog post. Basically what boils down to those is that on October 3rd ReadTheDocs changed some of the default behavior when builds are made inside of their system. In particular, the change that affects us most, I believe, is that they no longer install Twinks RTD theme by default that used to get installed sort of automatically even when it wasn't specified inside of our code or anything. But it no longer does now or hasn't, I should say, since the 10th 3rd, rather, of October. So all of the builds from libraries, like any library that has commits after 10.3, those will have failed when they try to build and ReadTheDocs. I don't have a list of all of them, but I've spot checked a few and found them all in the same state. There's a link in here to one of those specific, like, log messages for the build failure. But it's basically just they can't find the module Twinks RTD theme when it tries to import it. I did test the fix in the test repo just adding Twinks RTD theme to docs requirements.text, which we we already have that file and I already had a few docs related things in it just not the RTD theme specifically since that was handled automatically in ReadTheDocs and actually also is handled inside of actions sort of automatically separately as well. So it gets installed inside actions, even though it's not currently in requirements, but it no longer gets installed inside ReadTheDocs unless we put it into requirements. So I think that's the fix there. I did test it successfully on the test repo. I submitted a PR and adabot for a patch to roll that out to the rest of the libraries and then I will this afternoon make a PR for cookie cutter thanks again to Todd bot for the reminder on that because it totally did slip my mind. So I'll make the PR and cookie cutter to change that as well, unless if anybody has any concerns or other ideas on how we want to approach that, but I think that's everything that I know about it so far. That sounds good and thanks for running that down. I would always start with cookie cutter because that prevents more re-pills that you need to fix. But yeah, thanks for running that down. For sure. I missed whether you were discussing whether we might remove some of the pinned requirements versions in Docs. Does that seem okay? I don't know what all is pinned in there. So I do think that Sphinx RTD theme does not need to be pinned. I tested that with no version. It got the latest and that seems to work. Currently what we have pinned looking at least at the test repo, it should be the same as all of them. The only one we have a version on is the base just Sphinx itself and we have a greater equals 4.0 I could test out. I have no idea what the current version of Sphinx is. What do I even have installed? I could test out newer ones though. If it's possible to unpin that, I would say I'm probably relatively in favor of it and it's the same file so we could easily add it to the same patch if it is possible. Is that something we want to try is using the latest Sphinx? I think it's on 7.26 because I'm running it right now. Oh wow, okay, so 4.0 I guess is pretty old at this point. I generally think pinning is for pinning it to a particular major version but I guess I would look at what the policy on the read-it doc side is. Okay, I will check into it. Off the top of my head, my first guess is because almost everything they changed to is now the latest of everything. So my guess is they give us the latest. So yeah, starting 10.3 and their blog posted us say you'll get the latest release of Sphinx will be installed automatically. So yeah, we can match that in our requirements that way we'll get the same thing when we build locally. And then I'll double check and make sure that it still builds and everything which I should because actually I have that installed locally as well and I don't notice any other issues building locally so I'll double check it but I think we should be good to change that version as well. The less pinning we do we have to make it work eventually. Yeah. We'll discover it sooner or later that it needs to be fixed up and especially in the case of the library since they don't all have to change like if they made some incompatible change in Sphinx or something for instance. We don't have to change them all at once and we can do that over a period of time. Okay. I will test out the latest on that in the test repo just to make sure that it still builds successfully inside of actions and inside read the docs. As long as that's all good then I'll update that PR on adabot to make the patch do both add R2D theme and unpin unpin Sphinx and then I'll do the same thing in cookie cutter when I make the change there if it does end up working out. Okay. Great. That sounds great. Okay. So I think that's it for in the weeds. Let's sit here. I don't see anything else. Scott did you want to ask about the glossary? I think I decided to just put it back. Okay. Yeah. I think I looked at that too and I decided the fewer the changes the better or something. So all right. So I will wrap up now. This is I'm typing camps by hand because I forgot to start my timestamp generator at the right time. So. All right. This has been the CircuitPython Weekly for Monday, October 16th, 2023. Thank you everyone who participated. If you want to support Adafruit and CircuitPython and those of us that work on CircuitPython consider purchasing from the Adafruit shop at adafruit.com The video of this meeting will be released on YouTube at youtube.com slash Adafruit and the podcast will be available on major podcast services. The newsletter will also, oh sorry this meeting will also be featured in the Python for Microcontrollers newsletter. Visit adafruitdaily.com to subscribe to subscribe. The next meeting will be held next Monday as usual at 2 p.m. U.S. Eastern 11 a.m. U.S. Pacific Time and on the Adafruit Discord where you are now you can go to adafru.it slash discord to go there and if you want to be notified about meeting and any changes in its timing you can ask to be added to the AdSign CircuitPythonista's role on Discord. So we hope to see you all next week thank you everyone and I'll stop recording now.


So I apologize, as I said before, I just patched up those slides just before class so I knew they looked bad and sorry about that. So in fact, I just added a additional slide, which is actually complementing the explanation I gave before, which was lacking this particular aspect. So kernels, we didn't talk about kernels. Again, I apologize. So let's see what are these guys. In this case, we are going to be using one-dimensional data. Everything is going to be just fine as we use two-dimensional data, which are images. Images are 2.5 because they have also some thickness. But you can think about images as two-dimensional data, not spatial data. So here we think about 1D data. And we said we go from one layer to the other layer by using these kernels, which apply first here, then the same kernel. So the kernel is the collection of these three weights. I apply this guy to the second chunk here and to the third chunk. So this is the same guy, which is applied to different locations because we, again, exploit the fact that we are using data which is stationary. The same feature can appear in different location of the data, which is spatial location. It's temporal location. We don't care, but it's in different regions of your data. All right, so. I have a question before, which is usually normal that you have less neurons on the neuron layer. What is this for illustration on the other side? OK, that is also correct. Yes, I apologize. So whenever you apply convolution, you're going to be lacking a neuron here. Because otherwise, where would you send this connection to? So I would have this connection, and I don't have anything here. So there is another technique, which is called zero padding, which you're going to be adding as many zeros here and here so that you're going to have the same number of neurons every layer. This is what we are doing, basically, most of the time. So you have. Or you can do it quickly. Yes, but it doesn't. I thought that's why there's not a single object. It doesn't work if you have images. If you end up one side of the image, you cannot see the other one coming in. So it doesn't really work for images, for example. Most of the time, we just do zero padding, which means I add as many zeros as here and here and here as the number of kerners divided by two floor. So here we have three divided by two 1.5 floor, one. So I add one more zero here, one more zero here, so that I have five neurons here. I have five neurons here. So in theory, usually, convolution won't change the dimensionality. If they do, it's because I didn't pad my input, OK? You can pad, you can decide not to pad.  This is in your picture that's in the middle of three, but you can connect the next one with the three of these. You just don't have more neurons. Or you mean, since it's the same kernel, it will be a duplicate. Oh, OK. OK. OK, I didn't understand what you said, but I'm happy you understood what you said. All right, so again, here we have that we go from this layer to this layer by using this kernel, which is the collection of these three colors, over and over and over again, OK? So this one here is my first kernel associated to this layer. Of course, we can have multiple kerners per layer, but I didn't mention that. So here we have my second blue kernel, the blue, purple, and a pink. And so this one, given that we have two kerners associated to this specific layer, is going to make these guys here not scalar anymore, but they are R2 guys, right? The first element is associated to the convolution with this first kernel. So I have these three guys multiplied by these three and some I have first value. I have these three guys multiplied by three guys sum together at the second value, these three guys multiplied by these three, sum together at the third value. This is the first item in the R here. Second one, second item, is going to be containing the scalar product, the projection, on this kernel with the input, OK? So we are going to have here this number here represents the thickness of this layer.  So these different kernels, are they taking the same inputs from the previous layer? So is that the inputs are the same and the weights are different, or is the inputs are different? The first one. So since you see there are different colors, there are different numbers. But here you have all these guys are the same guy. They're the same input, right? So you have your signal here distributed across five samples. And here you multiply this guy with the first kernel. So you have a projection, right? So whenever you do a projection, you see how much of this kind of feature is located in here. This is the first answer. So this one tells you what is the projection of this first location of your input with this kernel. So you have a kernel, and you have your input. You do the projection of your input on that kernel. You have the first output here. Then you do the non-linearity so you can go on. Instead, this guy here is going to be another kernel space on which you project, again, your input data. So here we have two kernels. Therefore, these guys are not scalers, but they are vectors of size two. And here we are using three connections. And therefore, I have three values within my kernel. So we have number three here because they are the connection. We have two because there are two different kernels. Yes? No? Yeah, question. Can we have a different kernel with different features? Like four values in one kernel, actually. Different sizes? Yeah. Yes, you can. But then you're going to be changing your network. So you're going to have your network, which is branching out. And it's going to have like four branches, for example. And each branch has its own size. But each convolutional layer has the same number of items in a kernel. In every kernel, you have the same number of guys because it's going to be just a tensor. I'm going to show you soon. But again, if you'd like to have different receptive fields, then you have different branches in your network. So you can easily do that in PyTorch. You simply send your same input to different convolutional kernels. And at the end, you may concatenate everything. OK? Yes? Kernels that are essentially have very, very similar rates that are really the same thing. Good question. So as long as you initialize these guys with random numbers, and it's very likely these two guys are randomly, there are two different numbers. So whenever you have your weight space, your weight space, those guys are different points. And those guys are going to be stepping towards wherever the loss is going to go to the zero, right? So you have this guy here. Given that I start here and the other guy starts here, both of them are trying to step in order to minimize the function. But they are still far away. It's very unlikely that they are going to be hitting each other, matching because this stuff has a lot of up and down. So one, we stop here. The other one, we stop at a different location. But they may end up being. But it also happened that there's some certain number of local minimum in your weight space. What if you start with more kernels than there are local minimum in your space? Then definitely you're going to have some kernels colliding to the same solution. All right, so that was supposed to be very short. OK, right, three connections, two kernels. One more thing, five input. Who said those are scalars? This can be also the output of another convolution. And they may be five dimensional. So if we are, let's say, in an RGB image, this is going to be number three. So every pixel has R and G and B components. So this number is going to be three. If these are whatever, they're going to have different features. So in each location, the descriptor at that specific location has a specific dimension, dimensionality. So as you can understand now, these guys here are also five dimensional, given that we had to project this guy on here. So we have these three guys, which are 15 elements now. There are going to be scalar product with this guy here, which is also three in this direction and five in this direction. So finally, you can collect all your kernels in some tensor, which is of dimension three. So we have two kernels, one and one two, of five elements. One, two, three, four, and five times three neurons. So first row, second row, and third row. So any time you deal with one dimensional data, you are going to be ending up with collection of kernels, which are three dimensional tensors. Number of kernels, number of input features, five, and number three of output. Sorry, this connection, number of connections. So for example, before, we were going from one layer input image, grayscale, to six layers. So we were having kernels that were five by five, because we are dealing with images. And they have dimension of one in this case, because my input has just one layer. So it's one times five times five. How many of these we have? We said six. So in two dimensions, like when we play with images, this guy here is going to be six times one times five times five. That was the first convolutional module. Second guy here, we have kernels that now gets an input, which has six dimensions. So this guy has to be six by five by five. How many do we have? Also we have six. So this guy here is going to be six times six times five times five. So one-dimensional data, three-dimensional kernel, collection of kernels, two-dimensional data, four-dimensional kernels, three-dimensional data. Yay, you understood, right? So pay attention. One-dimensional data uses three-dimensional kernels and so on. Yes, please. The kernel is actually like each line is supposed to be the way, right? What about the biases? So the bias is going to be just R2 times three here, right? So each of these will have a bias term. So the bias term goes to the node, not to the node. Yeah, the bias is like the offset, right? So basically, let me think. I think there are just two. Just two, right? So one bias for the first layer and one bias for the other one, right? Are there quick? Yes? So if you have another set of parentheses with three different colored stars, there would be three by five by three? So it's going to be, yeah, three by five by three. If you have seven kernels, you're going to have seven kernels, five, because it's where you start and you end up in, you have a size of three, right? I was just thinking, the fact that there can be various minima in that weight space. And since you initialize them randomly, each of them are expected to converge to one of those minima, right with the gradient. But I was just thinking, if we can, in this dynamics of training evolution, if we add something like each weight point, which represents each kernel, I guess, to repel each other in that way, in that dynamics as well, I think that would ensure that even if there are less number of or same number of, I mean, it will ensure that two kernels don't converge to a similar. Right, right. So if you add additional terms to the loss, then the network will try to perform well for whatever you ask. But usually what I like is to perform good on that specific loss I define. So if you add additional terms, I will do worse in the other task, because I have additional terms I have to deal with. But you can try to have additional terms and see how you can introduce complexity in this kind of optimization problem. So this was just to show you that every layer here has a collection of kernels, which are limited for the amount of connections. And they don't have to be scalar values. That was just for completeness. We are going to go back to the notebook example, where we have seen we have trained the convolutional net. We have trained the fully connected network. Both of them have the same number of parameters. But we have seen that the convolutional network performs much better than the fully connected layer. Because we are, again, exploiting those three specific property of the data, which were, no one is listening. Locality, stationarity, and one more. So given that there are these three specific characteristics, we exploit them in order to improve performance as we have seen. What does it happen if we don't have those three assumptions? If those three assumptions are not any more valid, what does it happen? We're going to be seeing that soon. Are you ready? Are you excited? Should be. All right, so yeah, just as Alfredo said, we trained fully connected neural network and the convolutional neural net with the same number of parameters. And we've seen that the CNNs perform much better. And what happens if we made some assumptions when we constructed the convolutional neural net, which is the stationarity, locality, and the compositionality? What happens if we relax those assumptions? And we can test that by permuting our data. So the data that we used in the previous task looked like this, the first top rows, which basically the handwritten digits. Those are actually grayscale images, but we plot it in color. And we just scramble it by flattening it to the 726 component factor, 784 component factor, and applying the random permutation. And then putting it back to the square image. It looks like this. So we don't see any numbers anymore. But can it tell it's the same permutation? So can it tell what it was? And we simply go into training the convolutional neural net on the data with permuted pixels. And here's what we get. We do see the training. So the training loss is reducing. The training accuracy was good, but the generalization, the test loss was low, 80%. Sorry, the test accuracy was 80%. We will see. I would say it's quite high for the images as they looked. Let's see how the fully connected network performs. It's 89%. We don't remember how it was in the previous, so let's just plot it. So we see that the convolutional neural network, sorry, fully connected neural network is the first and the last beans. Nothing actually happened. And in fact, if you repeated the training multiple times and the average it, you will see that it actually almost exactly the same. For the convolutional net, we see a significant performance penalty. The performance reduced by over 10%. So that's what happens when we basically remove the assumptions that made convolutional neural network work so well on images. All right. Questions? Great general question. I'm not sure I understand. When you randomly scramble, I'm not sure I understand what it is. If I then write four, will it make out four? Or I have to scramble it and then in the same way? So we know the label. So we know the image of four is four. But when we see an image of four, we see basically local patterns. The pixels nearby have the same intensity. And we see the edges. And basically back when Alfredo was talking about the cat picture, when we scramble it, we no longer have locality. The pixels nearby are different. But we still know that it's a four. But that's right. Next time, if somebody writes four and tuits it, whether it's a four or a first, I have to scramble it in the same way. Yeah, you have to apply the same scrambling of the transformation, right? Same implementation, we fix random seats, yeah. The whole point is to show that if those assumptions we had before of locality, stationarity, and the compositionality are not anymore valid because we scrambled the position, we cannot exploit any more that specific characteristic of the input in order to improve performance. Whereas the fully connected layer doesn't have any assumption. So connection, you can scramble them. They are still the same connections, right? You have to preserve the strong... Oh, yes, of course. That's a deterministic... It's not a four anymore, just label both. Yes, it's a deterministic scrambling of the pixels. Yeah, I don't really know how to phrase this as a question, but it's just... Like, those don't look any different, right? Like... Which one it does? Pretty much. Yeah, so like, even if the label is still the same, like how... It's surprising that it could easily... With 80% accuracy, like, oh, yeah, that middle one, that's a four. The one just to the right of it, that's a one. That's why convolutional neural networks work so well. They can do magic even though we try to kill them, right? Because it's still... You can still think the convolutional neural network... The convolutional neural network, you can still think about it as being a fully connected layer for those central pixels, right? So although we have so many parameters, that the network managed to learn something even without using the neighboring information. So right now, every kernel is just tuned to find these specific pixels in these specific locations. So that's why they still... It still performs fine-ish, 85%, I don't know what that is. The scrambling is random? No, the scrambling is a deterministic function. So every time you have the same scrambling, okay? It's just to show you that if I change the location of those pixels, the fully connected layer doesn't see it, it's the same. Therefore, the convolutional neural net instead is gonna perform worse. You don't have any more of that advantage with respect to the... So the scrambling here is basically with the random permutation, with the fixed random seed. And before we permute, we flatten the image, we permute the pixels, and then we put it back to D. Yes? My question I think goes back to the difference between the fully connected and the convolutional neural net in terms of the training with it. If we would take the fully connected one and just run the training for more edbox, we could still get the same, but with the convolutional one? No, so if you have the same number of parameters, the modeling power of the convolutional network on natural data is much higher. So given the same number of free parameters for both models, the convolutional neural net can exploit those parameters much, much more because it doesn't use those extra parameters to try to figure out connection with further away values or with different characters in every position. So you can use better, you can reuse your parameters in order to extract multiple... In multiple locations, the same kind of feature. So convolutional neural net, given the same number of parameters and given that you can deal with data, which is again, have those three main assumptions valid, then it's gonna be having a higher modeling power. On the other side, if you have the same modeling power, so convolutional neural net and a fully connected layer, fully connected network, which perform the same with the same accuracy, then you're gonna figure out that the convolutional neural net has much, much, much, much less parameters. So given... To add to what Alfredo just said, as you can see from the result, actually the fully connected network had pretty high training accuracy that's kind of along the lines with what you said. If we train it, we can get very high training accuracy, but the generalization power will be very bad. And on the test set, it actually pretty low, which means with the same number of trainable parameters, these are less meaningful, as Alfredo said. So one could devise a strategy where you start with a fully connected network and then you see which weights they go to zero or they go close, really close to zero and use that as a way to guide your convolutional architecture. Potentially, but then if you just start with many less weights, you're much faster. You have many less computation. Yeah, but maybe you didn't put enough. Oh, okay, so every time, okay. Sure, I could have a full course here. Initially, you're gonna increase your dimensionality of your network, perhaps increasing these six here. As soon as you notice, I mean, you have to increase it until you see here 100%. So you go and increase your model capacity up to the point where it is 100% able to model your training data. But then it's gonna be performing very poorly on the validation set because it's gonna be basically memorizing your input data. And that's when you are actually introducing other regularizing techniques, let's say, namely dropout, which is somehow taking off, turning off some neurons, or you're even maybe willing to use batch normalization, which is not a regularizing technique, but it works as a regularizer.  So first, you try to overfit your training set. After when you're sure that you can completely fit your training set, you start adding regularization blocks, which are gonna be making you improve performance on the validation set. And when you reach the highest validation accuracy or the lowest validation loss, you stop there. This is like the cross-validation technique. So actually about batch norm, it will speed up convergence, but the training itself time per epoch won't be speeded up. It will speed the data. Yeah, of course, yes. It speeds up convergence. Yeah, sure. And it also performs this regularization, which again, I should tell you more why it does. So if someone asks you, asks you in a, let's say in a job interview, is batch normalization a regularization technique? Your answer is gonna be no, but it performs regularization as a byproduct. Bless you. All right, any other question? No? Yes? So you know what is the information that the fully connected network can learn from a picture? Just how many pixels are of one color with respect? Right, right, right. So if you think about that, can you scroll to the 700 something number? Where is the 700? You mean? There's a number, there you go, here. So this number here, you can think one image of those numbers is one point in a 784 dimension. And then those neural networks are simply moving those points in different regions. So that the last layer can just chop them with linear lines, with the hyper planes. So the only thing we have seen that yesterday, right? Whenever you have those neural networks, you are warping basically the space. And in this case, you have a 784 dimensional space with those dots. Each dot is representing a specific image. You're just moving things around so that they are all together in different regions and then you just carve out that region in order to tell, oh, that number belongs to that class. So that's how the fully connected layer works. The other one does something similar but has a more principle way because it deals with those other properties of the images that we mentioned before. Yes? Are there ways to use within the framework we have here to sort of, you feed it and you look just one image and see what it talks to, like to test what you've trained at the end. As opposed to say, oh, okay, cool. I know that it's nine ports and accurate. Can you simply just give it things Yes, yes, of course. So that's actually here. If you scroll down to the test loop or wherever the test loop is. You want a test loop? Test loop is here. Right, so this is testing loop.  You just take a picture with your phone. You resize it to 28 by 28. Then you just, you know, you do NumPy image load, something like that. And then you put it here.  So the probability distribution over the 10 classes is gonna tell you how likely the drawing you made is gonna be respecting one of the 10 digits. So you can actually do that. Or maybe, okay, next time I'm gonna be adding, I can add one extra cell. Okay, I'll do that tonight.  Any other question? If not, thank you for listening. And I see you, I guess, tomorrow for one more lesson on machine learning. Thank you.


That is why I'm asking for your vote, not just for me, but for this country that we believe in. We love America, we know where this country needs to go, and we're going to get it done. Well, America's position on Iran. U.S.-China relations are going to be a big issue for the next 100 years or more, but the campaign is probably being characterized by a focus on the domestic economy, because unusual for Republicans usually want to present their credentials as being hard-meant on foreign policy. I think it's been pretty effective. I think he's underplayed America's hand in the world quite often, say in the Arab Spring. The drone strikes in Pakistan and Afghanistan, I think I'd personally fault him for maybe overdoing that as a policy to try to look tough. Some people would describe him as someone who thinks about American power in complex ways, but doesn't want to overuse it. But he certainly hasn't been someone who's put a kind of liberal left foreign policy agenda forward on a range of issues. I've often thought of Australian foreign policy towards the U.S. as a kind of desperately seeking SAM approach, that we want more attention, we want to be recognized. Now we're being recognized, there's a nervousness of saying, OK, we wanted to be not forgotten, but this attention which may draw us into complex questions about the Chinese-U.S.-Australia relationship. Maybe we would want to fudge those a bit. Our country survives pretty well, actually, by being a strategic backwater. I think it matters on really specific country-to-country issues. It will make our relations much more complicated, I think, with the U.S. if the Iranian situation was to go into war. Obama is much more of a voice of caution than Romney, who I think would be more sympathetic to an Israeli strike. Romney might in fact create more problems for Australia than Obama.


So thank you very much for having me. It's a great pleasure to be here. My presentation will be about international corporate income tax reforms, and the views expressed in this presentation are my own personal views. I think before we start speaking about reforms, it's important to recall what triggered these reforms. There are three set of issues that pressured us, basically, to think hard about the taxation of the global firm. The first one is profit shifting. So multinational shift profits from high to low tax jurisdictions. In this area, we roughly know the involved magnitudes. So for example, Zakhman, Tosloff, and Vir find that, roughly speaking, about one third of multinational profit is shifted to low tax jurisdictions. This is among the highest available estimates. We also know that micro studies tend to find smaller numbers, in part because they focus on specific profit shifting mechanisms or because of some specific issues with the data. But by and large, and despite this variety of estimates, we know a little bit what's happening in terms of magnitude. What I would like to stress here is that beyond the direct revenue impact of profit shifting, it triggered public dissatisfaction. And that made the topic very, very salient. So this is one set of issues. The second set of issues, it's basically tax competition, and it's underlying deep problem. So if we think from a game theoretic approach, when countries compete to attract these multinationals, whether it's just the paper profit or the real capital and investment, we end up with a lower tax rate than what is optimal. So that's an uncoordinated equilibrium, which is typically inferior to an equilibrium with coordination. And the issue here is that when you read. So in one way to visualize tax competition is a chart with CET, which is the Statutory Corporate Income Tax Rate. That's the famous downward trend. And basically, when you lower the tax rate, what happens is you lower the tax rate also on the immobile base, which is relatively inelastic. And you can make some efficiency argument that you like to tax it. But also importantly, when you lower the tax rate, you are lowering the average tax rate on the economic rent. And we know that a significant share of multinational profit is generated through economic rent. Economic rent is the portion of return above the opportunity cost of the investment. And again, you can make efficiency argument to tax it. But of course here, the difficulty is that the corporate income tax falls on both, on the normal return, on the opportunity cost of the investment, and on the economic rent. The third set of issues is digitalizations of the economy. And basically the question here is, which country should tax what? So it's an exercise of the allocation of taxing rights in a world where companies can do business without physical presence within the board of the country. So giving this pressure, the result was we have the base original profit shifting initiative, among other initiatives. We have 15 actions. The first one was meant to deal with the digitalization challenge that I mentioned. But it kept it open at the end for future work. And but basically the rest of the action is about anti-tax avoidance. It makes it more stronger, and then having transparency requirements, country by country, and so on, reporting by multinationalists, and so on. But we ended up, we have now the inclusive framework. As of today, we have 143 countries. And indeed, the inclusive framework in October 2021 reached an agreement. It's a two pillar agreement described by many as historic because it's the first of its kind for one century. Just quickly, just as a freshman, the first pillar is actually, again, meant to address the digitalization challenge that I mentioned. And it's meant to take the largest multinational, take a portion of their profit above 10% of their revenue, and then take another quarter of that, and reallocate it to destination countries, to the countries where the consumers are. What's important to note about pillar one that it needs a critical mass to work. And basically, if you are committed to it, you don't have a margin of response. You're just committed to it. Pillar two, in particular, the global rules, is a minimum tax of 15%. But it allows for a portion of income to be carved out, so there is a substance-based income exclusion. What is interesting about pillar two is so-called common approach, meaning that if you commit to the agreement, you commit to accept the minimum tax applied by other countries. But it doesn't say necessarily that you should implement a minimum tax, so that's a margin of response for the countries. There are other rules under pillar two. I would not speak about them in this presentation, but they are important for developing countries. For example, the subject to tax rule, which is a treaty-based rule to impose a cross-border withholding tax on specific payments, and simplification rules, which are still under discussions, which are particularly important for developing countries. But let's speak about the impact of pillar one and pillar two, and I think it's important to fix ideas here. So usually we speak about the static impact, and that's basically, we wake up in the morning and the reform is implemented, so nobody had any time to react, right? So that will give you the direct revenue impact. But remember, the underlying idea of this reform is to trigger behavior response. So you want countries to react, either to implement the rules or part of the rules or even broader reforms. You want also company to react. So you want that profit-shifting behavior changes, and maybe also investment would change. So all that need to be taken into account. And there will be also, of course, administrative and compliance course, giving the administrative complexity of the rules. I'll not speak about that, but of course if you wanna have a full assessment, you would need also to speak about compliance and administrative course. So let's speak about the revenue impact. This is a static impact. So for pillar one, I think we can reasonably pin down the in-scope companies, and these are about 100 multinational group. There is a discussion whether they are 90 or 110, but you know what? In the grand scheme of things, they are about 100 group, okay? And we can also reasonably capture the amount of profit that will be reallocated.  That's the way I like to present it. Many impact assessment will present a dollar amount, we can do that. So we find it's 150 billion to be reallocated, and there is a discussion whether it's 180, 190, but again, you know what? It's 1. something percent to be reallocated. Now then you will have the first step is to say where is it? And here you would look at country by country reporting, you would need to do some assumption. There's some uncertainty, but more or less most impact assessment would agree that it's currently in low tax jurisdiction. And the cost will be around 2% of corporate income tax by reallocating this tax base from them to other countries. But that's step three, what is the other countries? And here you would entail more uncertainty because ideally you would like to have the firm level wait so you would like for each in-scope company to see the share of each country in its sales. We don't see that, so we do some approximation using some country by country weights and others. And what we will find, it's up to 1% increase in corporate income tax in the other countries. So the bottom line about pillar one I would say is that it's limited in-scope in terms of companies, in terms of the definition of profits, and hence in terms of corporate income tax revenue implications. However, what is novel about pillar one is that it introduces the destination-based principle. And that's something economists tend to like because it's robust toward profit-shifting and tax competition. On pillar two, again, we can kind of roughly identify the global amount of profit that is currently taxed below 15%. And this is around 15% to 17% of the global multinational profits. In terms of dollar amount, it's roughly 1.5 trillion. We find that it's currently taxed at around 5% on average. So if you want to collect a top-up tax that is 10% of 1.5 trillion, it's around $150 billion increase in revenue. So that's the bar you see here, the dark blue bar at 5.7. So that's about 5.7% of global corporate income tax. If you ignore, of course, the substance-based exclusion, you will go up to 7.6%. Now it's natural at this stage to tell me, OK, but which country will collect the revenue? And here I would like to raise an important, what I would say, caution. We can reasonably compute the amount at the global level. But to compute it at the country level, because the top-up tax is the same, whether it's collected by the headquarter country or by the source country, it doesn't really matter. But in order to present country-specific estimates, and I know some impact assessments do that, and this can be useful, but you need to do more assumptions. And I really think we need to be very clear about these assumptions we make when we start saying which country will get what. Because as I said, countries will react, firms will react, and it is not 100% clear which country will collect how much. To show you the last bar, just to explain a little bit the dynamic effect. So if we think about putting a floor on tax competition, because we have the 15%, so all low-tax jurisdictions will go to the 15%, including the zero-tax jurisdictions. From game theoretic approach, you would think then the high-tax country, they can react to that. So we have a tax rate reaction function. And usually what we think is that the tax rates are complemented. So if a country cuts its rate, I am more likely to cut my rate. But if a country erases its rate, I am more likely to raise my rate. And if we do this exercise, we estimate the slope of this function, and we see how much high-tax country will go up. We find that the revenue implication will be about 8%. So that corresponds to about increase in the average corporate income tax rate globally of 2 percentage points. So basically, all what you need to do is to have the downward trend that I showed you to stop. And it will slightly go up. I think, though, the main point of this exercise is just to say that the dynamic effect as such might be larger than the static effect. Although, of course, it's also surrounded by a lot of uncertainty. So we talked about the floor-on-tax competition. What about profit-shifting? So this is based on a paper, a policy paper published last March. Again, you can do some back-of-envelope calculation. And you can say the distance between countries in terms of tax rate is going down, right? Because the low-tax restrictions go to 15%. And then if I know that the difference between my tax rate and the average, word average, is got smaller, there is less incentives to shift profit. So we can assume an elasticity of reported profit with respect to this tax differential. If you are above average, you will lose less profit. If you are below average, of course, you will get less profit-shifted into your country. And doing this exercise and assuming some elasticities, we get that the increase in the global corporate income tax will be around 1% globally because of profit-shifting. Of course, it's, again, surrounded by some uncertainty, but just to get the feel of the involved numbers. The investment impact, I think I'll leave it to Mick to speak a little bit more on that. He has a nice paper on this coming out soon. But what I would like to say is investment will be impacted because the rate will go up. We have low-tax restrictions going up. Maybe high-tax countries will go up. And also, profit-shifting is less. So all that means that the effective tax rate on investment will go up. But it may not go up so much as in a textbook story because usually you say, you raise your tax, capital will go out. But here, remember, many other countries are also raising their tax rates. So you are leveling a little bit the play field. So you need to factor in this impact. I suggest really this report by the United Nations Conference on Trade and Development was published in 2022. It's a great report that lays out all these investment channels. And one of their conclusion is that FDI may decline by about 2% because of the raise in the effective tax rate. I will skip, in the interest of time, the other issues. But I would like really to conclude on two points, which are important. One, what is the strategic reaction for countries? And I think there is one point I didn't mention. It is a so-called qualified domestic top-up tax. And this fancy name basically says, if you apply this at your own rule, you as a source country will become top on the line, kind of the first to collect the revenue. If you don't apply it, it's the headquarter country that will collect the revenue. So in that sense, it's a dominant strategy for your reaction to just apply it as a defense line. But abstracting from these exact pillar two rules, I would say that it's an opportunity for broader reforms. And the word tax incentives has been mentioned multiple times throughout this conference. So now we know that the design of existing tax incentives in terms of effectiveness and efficiency is unfortunately not encouraging in many countries. And now yet we have one more reason to rethink the design of these taxes. Because if I offer a tax holiday for an in-scope company, I am generating revenue in the headquarter country now. So I am basically exporting revenue. Of course, there are some exceptions. Some companies are not in scope. There is the substance-based exclusion. But by and large now, it's time to rethink the design. And I would think of it as a stronger argument against profit-based tax incentives. So if we are really serious in designing tax incentives to encourage investment, then you can move toward more cost-based. So think of cash flow taxations or refundable tax credit if you can afford that. And I think the major issue here is if we have something like a cash flow tax or some kind of, if you think in the language of incentives, incentives targeting the normal return, targeting the expenditure side, that makes us think of the entire design of the income tax because we would like to target economic rent, which is really something if we can target without taxing normal return, we can even increase our rate, our tax rate, and possibly efficiently kind of raise revenue. So that's the famous kind of topic of tax incentives. I'll be happy to follow up in the discussion. The second point I would like to conclude on is basically, oh, so I was a bit quick, but I'll be happy to follow up also with discussions, is the financing needs. OK, so it is welcome step. It's an important step in the right direction to coordinate on the taxation of multinational. And maybe we can raise 0.3, 0.4% of GDP. So that's a welcome contribution. That's important for all sorts of reasons. But if we look at the financing needs of developing countries, it's certainly not enough. It's just one component of many other things we need to do. If you look, for instance, at the middle blue bar here, this is 8% of GDP that we need if you follow some tax capacity and tax efforts estimations. There was a session in this conference on this. If you look at the SDGs, it's even larger, the number that we need. If you look at the last bar, which is just if you try to bring the average tax GDP ratio of low income countries to the emerging market level, it's 5% of GDP that we need to raise. So in short, no matter what we do on the international corporate tax front, other tax reforms remain important. We need to improve the VAT. We need to improve the entire tax collection in order to respond basically to the financing needs in the future. So it's important, but certainly there are other things and there are other reforms that we need to worry about. So yeah, so I actually spoke a little bit quick. I'm really sorry about that, but I would be happy to follow up in the discussions after the presentation. Thank you.


You know, each rotation of this world of ours presents to mankind a constantly changing panorama, but unfortunately is not always a pleasant picture. Our turning globe produces many imbalances, floods, earthquakes, famine, disease, and man's encroachment upon the rights of other men. Since our early history, we Americans have sought ways to combat these conditions throughout the world, and particularly to alleviate the resultant suffering. These efforts have faced the time barrier of surface travel, often affording too little too late. Today however, air transportation has whittled this barrier to a matter of hours, and to assure that there'll be enough of anything at any time, any place to aid their neighbors, the people of the United States often call upon the services, their military, air transport, and rescue forces. Although humanitarian airlifts have been employed in the past, the first mammoth application began in June 1948 to bring relief to western Berlin. On the 24th of that month, with all highways already blocked and river transportation cut off, the city's remaining surface contact with western Europe, its rail traffic, was terminated. The only access to the city was by air. For the first time in modern history, more than two and one-quarter million people had recently faced the privation of war, now faced starvation and peace. To meet this crisis, the decision was made to institute an airlift to Berlin from the western sectors of Germany. The United States employed military and commercial aircraft, relying heavily on its newly formed Air Force Command, MATS, the Military Air Transport Service. And on June 26th, assisted by planes from Great Britain, a seemingly impossible task began. The ensuing action became a gigantic peacetime airborne operation. Traffic schedules at the onset of an aircraft dispatched every six minutes. As time rolled on, this was gradually reduced to three minutes. For 15 long months, 24 hours a day, the people of western Berlin were sustained entirely by this humanitarian airline. During the period it brought in products equal to more than one ton per inhabit. The mission of the Berlin Airlift was to supply the island of Berlin by air with the necessities of life. In September 1949, the lift was concluded. Mission accomplished. Forces of nature, however, bear no allegiance to race, color, creed, or country. Thus it was that in January 1949, in the midst of the Berlin Airlift, western America was invaded by the most severe weather in its history. Here was snow incited by wind and temperatures falling to 40 degrees below zero, whipping across thousands of miles of open range, drifts piled to enormous heights, train stop, road traffic, hauling, rural communities cut off, thousands of sheep and cattle were snowbound. Denied access to natural forage, these animals faced starvation in their cousins. The deer and elk of the area suffered with them. The only solution, airlift and drop hay. Mustering their tactical air units, Americans turned to the task at hand. Aerial dropping of hay to all of these snowbound creatures was the order of the day. As this project proceeded, surface forces began clearing the way to hundreds of ranch homes and communities isolated by the storms. This is Beirut, Lebanon, August 1950, from all parts of the world. Thousands of Muslim pilgrims have gathered for aerial transportation to Jeddah and Saudi Arabia, air gateway to their revered Mecca. The unprecedented influx was far too much for the available commercial aircraft because Muslim law prescribes that a pilgrim must reach Mecca by the 28th of August. It was suddenly apparent that over 3,000 Muslims would face the crushing disappointment of not fulfilling their sacred pilgrimage. On direct orders from Washington, American military planes winged to the rescue. Operating around the clock, these United States transports carried over 3,700 pilgrims to their destination in just four days. The Mecca airlift was dramatic and in religious history unusual, but the real story lies deeper. Perhaps it is best expressed by an 85-year-old pilgrim who kissed the ground at Jeddah and looking at the American crew said, today we have become brothers. Less than 150 days had passed before the unpredictable forces of nature levied another tax on humanity. This time, the ravages of the sea. The violent winds of a storm which struck the North Sea reached the sea wall and dikes of the Netherlands tearing out gaps thousands of feet wide. Holland faced a national disaster as the gale-driven flood swirled over hundreds of square miles inhabited by nearly a million people. American and Allied forces in Europe prepared immediately to rush construction and relief supplies to the stricken area. While the most urgent requirement of evacuation of people from the dangerous flood areas was begun by U.S. Air Force and Army helicopters, warm and serviceable clothing was packed for delivery to the thousands of homeless. In the larger land areas, transports landed and unloaded their cargo. In addition to food, medicine and clothing, generators, high-capacity water pumps and sandbags for the emergency repair of the breaches in the bike system were delivered. Emergency Red Cross centers distributed clothing and supplies to those flood victims who had been rescued from the ravaged lowlands. The death toll climbed toward 2,000. Property damage into unestimated figures. Special reconnaissance flights haul life rafts to marooned flood victims and drop them for use in the restoration of the dikes. Other transports took off with bundles of food, hay and fodder, blankets, emergency rations and hand tools. Dropping over 65,000 pounds of these supplies brought speedy relief to hundreds throughout the stricken area. Victims of Europe's worst peacetime disaster in recent years. August 1953, the United States Air Forces in Europe launched the first of one of the most unusual airlifts in history, the Kinderland. An operation to provide free summer vacation for Berlin's needy children who could not otherwise leave the streets in pavements of the city. The political refugee status of many of these youngsters' parents made surface travel too risky. An American airlift was the best way to move the kids to and from West Berlin. Gathered at Temple Hall Airport by the Red Cross, they were flown to airports in the German Federal Republic. After a good meal, they would go by rail, bus and car to special youth camps or private homes of American and German families who would sponsor them.  The language barrier proved no problem as the children visiting American homes were all taking English courses in school. The delight and well-being which Kinderlif brought to these youngsters marked the program's success and gave reason for its continuance. During five consecutive years, Kinderlif carried nearly 10,000 refugee children to five weeks of summer happiness. The most severe winter in a generation, lashed into Europe in February 1956. Buffeted by snow, cold and high winds, South Central Italy and Northern Greece were particularly hard hit.  In dire need of food, clothing and medicine, the U.S. Army opened the doors of its depots in Germany and the transports from Air Forces in Europe, loaded with 700,000 pounds of supplies, bought blizzards and sub-zero temperatures to ease the plight of the suffering peoples of those two countries. Rome was the immediate downloading point. In the eternal city, the supplies went by surface vehicles, helicopters and airdrops to the isolated regions. We in America well remember our winter of 1957 with its record snowfalls and blizzards that isolated entire townships. It was a far-reaching cold that stretched even in a normally warm and sunny Florida where citrus crops froze on the trees. But our hardships were dwarfed by those which earlier faced nearly 15,000 of our fellow humans at Hungary. Fleeing their strife-torn country to seek a haven in the West, they had gone to refugee camps in Germany. By special executive order, they were to be airlifted and admitted to the United States. Immigration dates and quotas required rapid action and the ensuing operation became the largest American airlift mission since the aerial supply of Berlin. Medical crews of an aeromedical evacuation squadron attended the sick, injured and expected mothers. The policy of the entire airlift was to keep families together to accomplish this gigantic movement of refugees. The full support of the Air Force Military Air Transport Service was augmented by units of the Navy and commercial carriers. Even the personal plate of the President was pressed into service. Although plagued with the weather problems of the mid-winter, transportation continued on schedule and without incident. This then was the Hungarian airline. Using their military transports and a token of international friendship, the American people had again confirmed the message graven on the base of their Statue of Liberty. Gimme your huddled masses, yearning to breathe free. Send these the homeless, tempest-tossed to me. This was the work of a typhoon called Vera. She arrived in Japan early in a Sunday morning in September 1959. She smashed her way across the island of Honshu falling with full force on the town of Nagoya. Within hours, Japan's third largest city was a splintered mass of rubble and murky water. Thousands were dead, missing, injured, and homeless. Responding immediately to a call for aid, military transports of the United States began flying in hundreds of blankets, food packages, and emergency supplies. In just seven days, more than 200 tons had been shuttled to the Nagoya area. In the outlying, isolated areas, inaccessible by other means, Navy, Marine, and Air Force helicopters performed the vital missions of rescue and the distribution of supplies. As shattered communication lines were pieced back together, it was learned that the typhoon had cut a vicious swath across the island. No misery and death had been lessened by the efforts of the United States military personnel and equipment. Only time could erase the memory of a catastrophe brought to Japan by her grim visitor. 1960 was a leap year. The extra day, February 29, served as a marker for another disaster which struck on the other side of the globe. Here is Agadir, Morocco, crushed by earthquake and tidal wave as it faced the early mornings of the 1st of March. Answering the news of this calamity, American military transports arrived in the scene with emergency equipment, medical supplies, and aeromedical technicians. American transports also brought special Air Force work crews armed with picked shovels and wrecking bars to help clear the debris and remove the dead and injured. Devastation was practically unaccountable and the death toll reached 12,000. Emergency shelters, cots, and bedding were flown in to provide for the injured and homeless. Patients needing hospital attention were airlifted to Rabat, Casablanca, and other sections of Morocco. By March 4, evacuation of the injured was completed. To assist further in relieving the buried city of Italian of U.S. Army engineers with earth-moving equipment flown into Agadir. With all survivors removed, the devastated areas were sprayed to erase the impending threat of disease. Bringing aid to their Moroccan brothers, the American people at airlifted nearly 400,000 pounds of emergency relief supplies and equipment and flown 500 relief workers to the scene. As 1960 rolled on, it showed itself destined to bring tragedy to mankind. On May 21, the two-day series of severe earthquakes, tidal waves, torrential rains, avalanches, and volcanic eruptions prostrated southern Chile. Relief for these stricken people became an international effort. Practically every country in South America sent help. The Royal Canadian Air Force flew in five planes loaded with emergency supplies and the people of the United States assigned their military forces to another vital peacetime mission. Santiago, 4,500 air miles in the United States was the base for initial download. From here supplies were trans-shipped by smaller aircraft, helicopters, and surface vehicles. It was a 24-hour schedule for American and Chilean Air Force personnel. A night they worked by automobile and truck headlights to speedily unload the huge cargo planes. The food, medicine supplies, and medical personnel were urgently needed. Two fully equipped Army field hospitals were soon erected. These units, each with a 400-bed capacity, were put apart of the airlifted cargo. Posted notices informed the people of the medical assistant available and of their need for inoculation against the possible spread of disease. Unloaded planes were used to evacuate victims and refugees to other areas in the country where help from relatives or other more fortunate Chileans was available. It doesn't seem possible. Over 990 tons of relief supplies and nearly 700 field and medical workers were flown into Santiago in only five days. A vivid portrayal of assistance in time of need and of the inestimable value of international cooperation and understanding. Our Air Force aptly named this operation Amigos Air League. Within five days the eruptions of the crumbled southern Chile hurled the forces of a tidal wave against the shores of Hawaii. Hardest hit was Hilo, some 200 miles from Honolulu. The gigantic waves all but demolished the entire town. Power facilities, processing plants, communications. Practically every vital service was wiped out. Winging in from Hickam Air Force Base, military transports brought the supplies, food, stuffs, clothing, and equipment to rehabilitate the town. Critically needed refrigerated vans prevented food losses resulting from the lack of electricity and wave damage storage facilities. Local food suppliers shared the space to assure maximum utilization. Hilo's Public Library is the emergency red cross center for the distribution of clothing to the disaster victims. Full-scale activity continued for three days as the transports delivered everything from diapers to 3500 pound generators and a portable chlorinator for the water department. The complete destruction of the city's pasteurizing plant necessitated a true milk run from Honolulu to Hilo with trucks supplying the stores throughout the striccan area. As the people worked to remake their city, the year 1960 planned another regression of mankind. This time the devastator was polioed, the place Hakkaida, Japan. In August over 700 cases the dread disease were reported. From the United States by military airlift came life-saving iron lungs donated by the National Polio Foundation and with them ample supplies of vitally needed salt vaccine. This was one of the major airlifts directed toward fighting the scourge of polio that also marked nearly 10 years of such work by American military transports. Besides scores of such flights within the states there have been many American airlifts of patients, equipment, and vaccine to polio areas in Nairobi, Guatemala, Buenos Aires, and Hawaii. But other forces of nature continued to defy containment. Tanganyika, East Africa. The spring of 1962, swollen by torrential rains the refugee river goes on a rampage. Meagre crops are destroyed. The simple shelters of the natives collapse as they fall prey to the raging waters. In the flood's wake the menacing specter of hunger stands ready to collect its toll. But aid is at hand. Food from the United States is on the way. For the natives of isolated villages that cannot be reached by truck or boat low-flying airdrops bring mace, a staple item of Tanganyika diet. Within a month over 1,500 tons have reached the desperate people. Aids supplied by our nation's agency for international development and delivered to those in need by our military airline. That's our story but it's far from complete. We're missing quite a number of chapters. Chapters which include military airlift of equipment, personnel and supplies too. Flooded Pakistan in August 1954. In the wake of swirling waters the dreaded plague cholera required the quick inoculation of vast multitudes of the population. The Greek islands in the Aegean Sea devastated by earthquake in August 1955. Red Cross aid distributed by helicopter Navy ships and boats. Demolition and cleanup work by Marines. Tampico, Mexico October 1955. Washed with the murky waters of uncontrolled flood. Since that first massive airlift relief for Berlin the American people through their military air transports have helped thousands of their fellow human beings around the world. But these missions of friendship, humanity and goodwill are not confined to the major airlifts depicted here. Whenever and wherever there's an SOS, the cry of May Day or a quest for aid. The military air of the United States stands ready to help. Not a day passes without some aerial unit filling a life-giving or life-saving road. It may be an airdrop to an isolated village such as this on the island of Juxt in the North Sea where ice flows cut off contact with the outside world. Crash flyers, lost mountain climbers, the crews of ships wrecked or lost at sea. The rush of serum and medical supplies to marooned areas.  Doing this work are helicopters, sea planes, search, cargo aircraft on constant alert everywhere. Alert to the task of all Americans, saving lives. And so our story is really a continuing one. Today as a peacetime byproduct of its military airlift capacity, the United States can send relief assistance to any spot on Earth within 72 hours. And as new equipment like the jet-powered cargo ship the C-141 is added to the inventory, this time will be cut in half. Rapid communication and the ever-increasing speed of our transportation have led us to speak of our Earth as this shrinking world. Conversely, the same shrinking is allowed to the expansion of man's humanity toward man. May it continue so.