Well, so yeah, welcome everybody to this talk. We're going to be diving into as the title suggests secure Python ML we're going to be looking at this from the lens of You know bad practice IE major security vulnerabilities that we can find throughout the end-to-end ML life cycle and also how to avoid them There's going to be a lot on this talk, but fortunately there's practical resources We're going to be delving into a hands-on demo so you can find the slides at the top right corner here So bit.ly secure ML. So let's dive straight into it a little bit about myself. My name is Alejandro I'm engineering director at Selen Technologies. We're a open core machine learning deployment and monitoring Startup so we've developed one of the most popular machine learning deployment frameworks in Kubernetes Almost a chief science at the Institute for Ethical AI where we focus on contributing To frameworks that ensure the responsible design development and operation of machine learning systems And I'm also a governing council member at large at the ACM So yeah, as I mentioned, this is a very practical talk So we are going to have resources in this repository which you will be able to find So this is the Jupyter notebook that we will be using throughout So if you do want to dive deeper into any of the areas you can try it yourself So yeah, and if you find any improvements, please do add a PR So let's take a step back and understand the motivations and the approach that we're going to take for this topic The topic of machine learning security So one of the key interesting things is that the security challenges in the DevOps and traditional software space Are very Actively explored. There's a lot of resources around them However, the key challenges in machine learning itself are still being explored So there's a lot of content around how to use machine learning in security things like spam detection malware detection but best practices of security in machine learning at least from from what what we have found is not is not as defined and For that what we want to make sure is that this talk is more of a call to action For us as practitioners to to continue exploring the best practices The way that we're gonna approach this is in a similar way to how it's approached in just general security Basically with the principle that it's impossible to make systems unhackable, right? But it's possible to mitigate on desired outcomes through introducing best practices And one thing that we have to remember is that even though the solutions will be largely technical In nature, they you know, they're always is going to be relying in humans and process, right when it comes to security You know, you may create a system that is like, you know, highly robust with minimal vulnerabilities But you know that the humans are still going to be involved there And there can still be a potential for social engineering that that can open loop holes So we're gonna be also talking about this concept called ML sec ops, which is now a growing new buzzword Which basically is the the intersection of DevOps sec ops and ML ops is taking You know the extension of DevOps with security But machine learning as a first-class citizen and specifically the infrastructure that that is enabled To make sure that that it's enforced, right that you have best practices on the security life cycle And you know, this is not a very general talk We're gonna dive specifically in the security side, but let's take a step back and also remember why production machine learning is so hard Right to think about this in an intuitive way We're bringing in all of the challenges that we face in the traditional software world But we're adding and sprinkling the machine learning on top, right? The challenges that you have when dealing with You know specialized hardware and the scheduling of the specialized hardware, whether it's GPUs TPUs Large amount of memory, etc. You also have complex data flows, right? You have not just a single machine learning model, but you have machine learning systems and you have Components that may affect other components down the stream or up the stream Similarly, there's dependencies of the data as it flows through the system and then that actually boils down into the next part Which is reproducibility of components, right? There is a challenge to make sure that whenever you want to rerun a specific, you know Inference request you may need to make sure that all of the components are atomic and are reproducible You know whether it's today or or in a couple of weeks and finally is the compliance requirements and the burden that it brings For the practitioners that are very use use case specific now when it comes to the security side We've actually we're actually going to be able to leverage a lot of the resources that have been created in the general software space So similar to a lot of the machine learning engineering best practices that are being introduced in data science We are also going to be able to take that approach in the security world and one of the you know Great resources is this resource called the OWASP top 10 This is basically a report that comes out every year that highlights some of the open web application security, you know project Highlights the top 10 most the top 10 highest vulnerabilities in the web space so you can see things like you know broken access control cryptographic failures Injection so remember this list just because by the end of this talk We're going to have a list similar to this but specific to machine learning So again, you know this talk is not not specifically about machine learning deployment So we're not going to be delving into into the details of that But we are going to be carrying out the the training packaging productionization and an inference of machine learning model There's going to be a little bit of a hand wavy, but you know if you are interested on the details You know, there's other another talk at a previous PyCon and pie data that you can check out You know in your own time So what we're going to be doing is we're going to be training a machine learning model And we're going to be packaging that machine learning model and deploying it So in this case is going to be a scikit-learn model We're going to be converting it into a fully fledged microservice that is going to support, you know rest GRPC and Kafka calls But you know the key thing is we're going to be using frameworks that allows to do this in this case We're going to be using this framework called ML server for the runtime So it's built on fast API and seldom core for the orchestration. That's what's going to be happening in in the background So let's get started So that's basically the notebook that that I was mentioning earlier What we're going to be doing first is we're going to be using, you know, scikit-learn We're going to be using the hello world of machine learning, which is the iris Classifier and the iris data set. So we're going to be training a simple logistic regression model And from that, you know, we can see that we've trained it, you know, very simple And we now have a machine learning model that we can use for inference. So if we pass an input, it provides us with the prediction So what we normally do now, I guess in a production end-to-end machine learning lifecycle We want to persist this machine learning model, right? So we're going to be using our handy pickle or in this case job lip to actually dump that binary And if actually let's have a look at what's inside of that binary just out of curiosity, right? So so so if we if we just yeah, I guess let's start the kernel Unless we run that again, and let's have a look inside of the pickle So inside of the pickle we actually can see some simple things that we would expect, right? So in this case, it is the module that you're expected to use This is the scikit-learn Logistic module the logistic regression class and then the parameters that you want to use to initialize that pickle when you load it From memory, right? So that's basically what you're expected to do So so far so good So now we can actually take this pickle put it in a remote bucket, right? So that we can actually productionize it in this case We're going to be using Minayo which can be s3 or Google bucket or something like that And then we're going to be able to deploy it into our local Kubernetes cluster So this is basically a step that I was mentioning very hand-wavy at this point But you know just for the for the sake of the token security. We're gonna have to yeah I guess skip some steps. So now we can actually see that this artifact that we that we you know Uploaded into a bucket on the the folder FML artifacts slash safe We're gonna be able to see that now we have a microservice running and this microservice similar to how we consume that locally We can now consume it in a remote way So we send a prediction which in this case is this input and then the inference response is basically, you know The one hot vector with the second class as being the prediction, right? So we've deployed a model, right? So so this is the stage where you know, we've done our job We're happy we can go to the pub But the reality is is that the life cycle of the model really begins once it's trained and once it's generating value and You know in other talks that I link we talk about other things like monitoring But in this case, let's talk about security and when it comes to actually Security considerations if we look at the steps that we carried out, you know, this is the traditional, you know ML pipeline, right? So data cleansing Future engineering then model training, you know, several iterations and then once you're ready persist the model and then deploy it And then monitor it. So we ask the question if you know looking at this end-to-end machine learning life cycle Where are the areas that you know, you would imagine are susceptible for potential security vulnerabilities, right? So if we have a think those are the ones highlighted in red, right? So every single stage of our machine learning life cycle can be Exposed to a security vulnerability, right? And this is something that we have to be conscious about when when going through this talk is that There will have to be processes that you can introduce but also Making them proportionate to the risk that is involved, right? If it's only one data scientist the amount of like, you know overhead and automation would be less than if it's a team of You know, 20 data scientists with three machine learning engineers with one DevOps engineer that is like, you know Producing models at scale So now let's actually look at each of those stages of the machine learning life cycle and see how each stage can be exploited so we're going to be looking at you know, some potential vulnerabilities at the loading of the models of the artifacts access to the model and you know potential issues in that front Issues with dependencies and supply chain management Code vulnerabilities model runtime images and then some honorable mentions on infrastructure So let's start with the first part. So in in the crowd here who has used a pickle raise your hand Okay, so for the video is about 90 percent have have used pickle So we all love pickles, right? We use them on a day-to-day basis. Should we use them? I don't know. Maybe maybe we shouldn't use them as as ubiquitously as we are So let's have a look at some of the challenges when when when it comes to to pickles themselves So let's take that pickle that we dumped that binary that we dumped and let's load it back into memory We can see that it still works, right? If we run a prediction, it still it still works But now if we actually look at what's happening and how Python interacts with pickles The way that Python interacts is through the redot reduce function And in this case what we can do is we can inject our own reduced function to tell Python how we want It to handle with this pickle, right? In this case what we can do is we can just make it run Return the package OS that system and this command which is like a base 64 string Which is going to be just taking all of the environment and putting it into a file called pawn dot text But this could be anything else, right? It could be pulling the Kubernetes secrets sending them over an email You can run any, you know command that you want to run So let's actually put that and let's inject it into our class now What we can do is we can dump that unsafe model that model that we are now calling unsafe And then when we actually look at the pickle, it's a little bit different, right? Instead of seeing the scikit-learn module and all of the things that we were expecting We can see that system module and then this command which basically says take the environment and put it in a pawn dot text file Right so on aware of this, you know, we are deploying our model We can see that now our models that are deployed So now we actually have our safe and our unsafe model and we look at the inside of the of the container itself We can see that that pawn dot text file was created So that code is running and if we now actually try to load that pickle locally We can see that the pawn dot text is created locally, right? So basically when loading this pickle we're executing this, you know arbitrary Potentially malicious code which you know Really we shouldn't be doing that So so now you have a bit of an intuition and you know fortunate unfortunately, you know But also with with a lot of you know understanding a lot of you know Libraries that we love and and use on a day-to-day basis use this standard or you know Even suggest a standard or use the standard internally for you know, the artifacts themselves So then this raises the question of like well, you know What should what should be done for this specific context should we introduce some like super smart type? Systems that allows us to scan pickles for Vulnerabilities, well, you know the best practice tends to be similar to general Containers or loading any type of binary code from any resource is the concept of trust or discard, right? You know similar to docker images, you know, you need to make sure that the Location where you're running where you're fetching those containers that have arbitrary code or not arbitrary But like the potentially arbitrary code, you know You can trust those those locations and of course you also can trust the pipelines that generate those artifacts, right? So if that CICD pipeline is compromised, then you may be compromised, you know down the stream in different areas So we're gonna revisit some of this this points The second part that we're gonna now talk about is access to the model on unrestricted access to the model So if we deploy a model and we don't restrict the access that means that malicious players would be able to access and Consume that model to their own liking and one of the interesting areas that we have seen is the concept of Adversarial attacks, so this is basically being able to generate Adversarial examples that can trick the machine learning model whilst also tricking a human So we actually have an interesting example that you can try out with one of an open source libraries called alibi detect So this shows you not only how to create adversarial examples, but also how to create an adversarial detector, right? So that you can put some sort of like, you know Advanced monitoring component to identify if an example itself and input is is adversarial So and here you can actually see how some of the adversarial examples can be created And you can also see how those can be used to trick the machine learning model themselves So that's that's one interesting thing that I would want to point you out and for you to try it out The second one is that if you have access on restricted access to the model artifact itself It is also there's also interesting literature that shows how it's possible to extract the training data from you know Things like large language models themselves So this is another consideration that may you know raise potential privacy data privacy and data leakage Challenges when it comes to under stricted access to the model So that's one one one key consideration moving to the next part is code, right? We tend to forget that as practitioners Maybe we are writing Jupiter notebooks and we may think well That's actually you know not the same as like writing a web application, but once it gets to us a certain you know, I guess Use or scale that actually becomes code or analogous to code itself And it has the same potential challenges that you would find with normal software that you have So code code scan tools are very useful for those type of situations And especially because we have seen in some contexts some of the vulnerabilities that have been highlighted I don't know if people here remember about the vulnerability in the pie in the in the pie YAML package So that actually affected a lot of libraries and you know This is an example that you know practitioners in the data science space may not be aware of of that So, you know from code scans you can use a lot of really interesting tools You know, we actually show how you can use tools like bandit So bandit allows you to actually search across your Python project and identify any vulnerabilities low medium large etc For that so now on the on the next, you know highlights is making sure that you know This also is in compass for Jupiter notebooks Now dependencies are important right now There's a lot of discussion about the supply chain vulnerabilities So if you pull a dependency in Python and you pin your dependencies that doesn't mean that your second third fourth level dependencies are going to be pinned and We actually these are actually vulnerable to supply chain attacks We have actually seen a lot of cases recently where you know pipe-by-packages have been compromised and you know maintainers may actually End up in a situation where that is like a fifth seventh level dependency and that may be highlighted So it's important to be able to address this and we actually have worked with some projects like ML flow To ensure that you know some of these things that were done dynamically of pulling dependencies now It's actually done at once and one of the things that we often try to emphasize is for the pennancy scans There's a lot of tools that you can leverage right so one of them is safety So that's like a Python package that you can leverage and also other packages like pip depth tree to be able to identify What are all of the dependencies that you have now there is tools also like poetry that allow you to create lock files Which basically you know means that you can have an understanding of you know all of your second third fourth level dependencies So you have like fully reproducible environments. So this is an example of a poetry lock file So that there are a lot of resources and that is the emphasis that right now is practitioners You can leverage and you know recently this was a conversation I had with one of my teammates, you know Highlighting some of the challenges where everything was working on a Friday and they go broken on a Monday when nothing changed Finally the last part is on image scans So this is one important thing especially for us that we have to carry out You know the deployment of this you know servers so that people can deploy their models We actually have to run the automation of these scans With every release and we use tools like trivy that you can leverage yourself So this is like you know a free tool that you can you know Leverage in your own CI CD pipeline and you can search for CVEs across your image So for example, you know this morning we identify a CVE and we had to just rerun the image build To address it with the latest package. So that is that is a set of examples You know, this is of course a python conference So I'm not going to bore you with kubernetes related shenanigans But it is equally important to have some of those you know components in your infrastructure Right and that means things like encryption on data and transit in a data address as well as authentication authorization Etc etc Now if we actually look back at some of those components that we that we defined initially with the OWASP top 10 We can now define what we can call the omlsp right the open machine learning Standards project and we have some of those one-to-one mappings between things like broken access control to access to model endpoints cryptographic failures to Access to model artifacts etc etc and we've actually kicked off An initiative within the linux foundation to define some of these things through a machine learning a machine learning security committee So again, this is a more of a call to action to emphasize that we're currently all looking to build those best practices Now I didn't want to stand here and just like raise problems I also wanted to you know emphasize that we are also trying to find some solutions and best practices. So we created a um, I guess Analogous repo to the flood machine learning security. So the fml repo, which is called sml so safe machine learning security Which is basically a base template that you can use to generate a starter I guess machine learning engineering package and what that means is that you can just basically like start it Like such you basically, you know, just run with cookie cutter. It's like a template generation project. Let's call it like example project Then you know, you put things like your your repo username The name of the project the number of the name of the classes the description The license that you want to use and that basically will generate you that base project and the base project itself What that would have is it would end up with you know, a base server Together with the dependency package management The scans for security that you can run as part of your ci as well as you know Your runtime environment that you can leverage to package your machine learning model using this framework called ml server So the ones that we were using as part of this as part of this talk So just to wrap up on some of the things that we've covered If we take a step back, we've talked about technology But it's important to make sure that human and process is heavily involved when we look at production machine learning systems The architectural blueprints always have similar steps of experimentation Taking training data to train models and create artifacts the sort of automation or manual deployment of models Whether it's ci cd or through, you know pipelines to create, you know, running either batch or real-time models advanced monitoring components for the for the, you know, things that we mentioned like adversarial Robustness adversarial detection drip detection outlier detection and then making sure that there's full continuity with some of the data That is part of that the processes are important as each of these areas as you have a data scientist that is creating those models You have a machine learning engineer that is creating those use case automation pipelines And then making sure that there are also those deployment pipelines so that you can have the inference across your your models As well as the DevOps personas that would be involved and security is not just about tools It's about the processes that have to be integrated But also that are proportionate to the maturity of your organization and the risk of the use case Right if you are just building a small prototype with perhaps just a hand, you know a small group of You know practitioners the actual process can be enforced just within this unit, but as it grows standardization, you know Centralization control of the production environment starts becoming more important as well as role-based access control for the for the data that flows So for anyone that is interested on deeper dives, I know that a lot of the deployment stuff was very hand wavy There are other talks to deep dive into things like CICD for production machine learning For machine learning monitoring for machine learning acceleration, etc. So please Do have a look and just a reminder you can find all of the resources in the git repo And the slides at the link at the bit link on the top right So with that, thank you everybody and I hope you enjoy the talks. I'll pause for questions now Awesome. So if there's all right, I guess people come into the mic. Yes. Thank you for the talk Yeah, you mentioned the trust is important to have A trusted pipeline that generates the the model Binary, let's say, but actually that's nowadays inverted that it's important to have zero trust So, uh, can you maybe talk a little bit closer to the mic? Well, you say it's about trust, right? Trusted pipeline that generates a trusted binary in that sense But I think nowadays security is actually more about zero trust Because if you trust the system, then you're open to attack So it's more about verifying your security instead of assuming it Yeah, I mean that sounds more like a like a thought or a comment. Yeah, I mean, I agree. I think I think when it comes to Yeah, security there are probably like two parts to this one is just having a baseline of best practice And the other one is as you mentioned verification, you know over testing itself But I think a lot of these concepts probably focus more on the on the former, which is just What are the basic set of Minimum best practices that machine learning projects should be conscious of You know as it as you're dealing with Scale, especially with more critical use cases.  What would mean the model binary verification then or because I mean you can It's more the subject that you touched but not really any Guidelines, you know, yeah No, I think I think it goes back to that point that was made On emphasizing trust or discard I mean, I think it is possible to go into a sort of like, you know exploration Of advanced methods to be able to verify the binaries themselves But, you know, it's the same sort of paradigm that you have with things like docker containers You're still going to be pulling things that are analogous to You know components that have Code that would be executed So you have kind of a limited amount of how much verification you're going to do throughout each of these areas So, yeah, I think the main emphasis at this point is more that trust or discard mechanism There are some interesting projects that explore actually binary like pickle scanning Specifically in the machine learning space, but again, those are still in the very early exploratory phases Thanks for the talk So we talked about dependencies and one thing particularly that happens with machine learning right now is that everyone builds their own model But now with the large language models, we're moving to have another models as dependencies and Fine-tuning other models into a new one and then over and over again What happens someone to Someone from manipulate instead of fine-tuning manipulating those parameters Uh to trigger not really perhaps not remote the execution or whatever but unintended side effects on the execution of those parameters of that prediction The challenge here is that when you do the penises scanning or you go through The penises upgrade the penises to have a track of what was changed on those dependencies And that doesn't exist anymore on is not as human readable Anymore on the machine learning side because you only see numbers changing you don't see it's a lot more similar to I don't know assembly code being changed or anything How do you see this in a few years from now when Machine learning becomes as much as building software where you depend on a lot of dependencies of machine other machine learning models instead of just like building your own all the all the time Yeah, well, I mean I would say that that's the case now. Um, you know, we we see that already causing Introducing risks in production So the tool that I was showing you a seldom course that allows you to deploy inference graphs with multiple stages So you can have like, you know preprocessors post processors each of them with like different versions different frameworks different libraries Um, I think that that is why right now there is such an important such a critical emphasis On start on thinking about the best practices around security So although I agree that, um, you know, it does become quite almost impossible to to to go into the You know code specific change Across every sort of like, uh, you know dependency modification throughout your supply chain That's why it is important to leverage some of the best practices that have been created in the software side Which is leveraging things like CVE scanning and cv databases So that actually keeps track of some of the common vulnerabilities Exploits as well as remediations And that is something that will only grow in the machine learning space making sure that Perhaps even some of those cvs are tailored specific to to machine learning type use cases Perhaps even for things like adversarial robustness or, you know, perhaps even like privacy preserving areas That that may result in in risk So it it's more about bringing what is already Being used in practice in production as opposed to reinventing the wheel So that's what I would suggest and that's how we are approaching it, right? That's what we we were taking the OWASP and trying to see well, what do we take? What do we leave what what what needs to be rethought? Thanks also from my side I have a question about the possibility to Reverse engineer machine learning models because I often hear people being afraid, especially when dealing with sensitive data That they are afraid of the possibility Of reverse engineering the machine learning model or even the data itself that was used with and I was wondering if you have any insights on that Yeah, absolutely. So so I think that was one of the the research papers that Yeah, was linked here that that you may be quite interested about So so this one actually explores that exactly is is reverse engineering Um, I guess training data from from large language models, uh, which you know, in in some cases may include Potentially personal identifiable data or or you know critical data So this is certainly a risk and I think that is why it's important to emphasize that when it comes to security Is not just about you know verification of an artifact at a particular point in time It's making sure that you know, you're leveraging best practices throughout your entire operational Touchpoints with the stakeholders that are involved, right that your ci pipeline is is is robust is It has a relevant role-based access control. It has the relevant practitioners, you know Involving the development and extension of that And then the same way for the management of artifacts making sure that those Are, uh, you know restricted in terms of access Similar to how you have restriction of access for for data, especially critical data So it's just introducing those best practices, but To the broader set of artifacts that are involved in the machine learning life cycles All right All right guys that was that was an amazing session and a very insightful q&a, but unfortunately we're On time so like we've just run out of time. So yes, uh, you guys can move into the coffee area and Like ask more questions over coffee So thank you


Have you started your holiday shopping yet? If you're like many people, you're probably enjoying the convenience of online shopping. The trouble with online shopping is that your parcels could be delivered anytime and you could be anywhere but there. Thieves will steal anything. Thieves are waiting and watching for your parcels to be delivered so they can help themselves. Here's some tips to keep your parcels out of the hands of thieves this holiday season. Consider an alternate shipping address where your package can be received such as your work, a friend or neighbor's house. Customize your delivery if possible by requesting a signature or holding your parcel for pickup. This holiday season, make life hard for thieves. Come with me, you Grinch.


Okay First of all, thank you for coming I'll tell if you worked about myself. My name is Yvail Donchev and I'm a technical community to hacksoft You can find me in any of these social channels and we're going to pull the slides from the talk in LinkedIn after a call I'm working in a Bulgaria software company for end-to-end development and we are based in Bulgaria You can see it north from Greece and South from Shingen And we kind of have a tradition to go to your partner conferences in the lab Eight years excluding the pandemic years and this is my third time making a talk here By the way, I have more sliders than minutes. So bear with me. Let's see how it goes First of all, how many of us have experienced and use Django in their daily work Cool and how many of us have experienced production outage with their current project this month Well, yeah, it's usually like that and it's usually in the times when you're it's not in the working hours It's either during the night or when you drink beer on the beach or when you have conference and Yeah Yeah to a development team. I love you guys. Nothing personal. Just a fresh example. That's how it goes and Well, when this happened Usually the priorities obviously to bring production back online It's not so important what happened and how it happened the first priority is to get production back online And the first step is usually just restart the workers and see how it goes but then it's Monday and We need to actually figure out what happened and why the production went down and we have two friends that can help us and that's the Monitoring and the way usually Monitoring to see how the resources are going or and how the traffic is going and walking for everything else Okay, last question. How many of us are comfortable when seeing the Django in configuration? By the way, the default Django walking configuration sounds pretty much complex per side Now while I was preparing the talk I saw a token junk on us with this meme and yeah, I had to put it here So before we start let's define what exactly is walking. I made a quick experiment and asked just GPT What is logging and it gave me gave me that complex explanation, which is true But it's kind of more abstract I'd love to read and Then I saw in the Python documentation and they say something more clearer and simpler that the logging is a means of Tracking events that happen when some software runs so it's always about tracking events that matters and If you start dink in the logging, that's the first example that you see you have the logging library that comes from the standard Python library And you have a method like warning and you could pass a string and you see outputs in your console And this is a good start, but it's actually a bad example to start with because We'll see why A better example with this We always use the logging library Python and We need to instantiate a lower class. We'll see what that means later And then Interface with the lower class to implement our logging for the software. So if we see that two lines First thing we see that the logging dot get lower the instance that the method that returns us the class has name And this is the core Principle in the lower that they're named And this is the equivalent with the logging dot warning the method internally instantiate the root water Which is the default over in the Logging module The next thing that we can see is that we pass a string watch out Which can be whatever string we want and this is actually the event if the logging is Tool for tracking events the event is what we pass to this method And it's usually a string and we see the warning method, which is just an example of what we could go and it's actually a set of levels That an event could have the level refers to the urgency of the event that we are tracking and we have five predefined levels that we have from the Python debug which is used only for diagnostic and we I mean walking by definition is made for bad times. You usually don't want to see the walking when the software runs properly but debug is something that you should Want to see only while developing Info is Level that refers to a confirmation that everything is working. Okay. Good example in Django is the HTTP request for example or the seller it does Warning means something bad happened, but it's not urgent. We could delay the fix software is running. Okay Error means something bad happened and part of the software is not working. For example, your API is broken And critical means just everything under fire and it's interesting that these are predefined levels They have numeric values and you can actually define your custom level for your Logging events So events or records have levels, but it's also case that the lowers have levels and The difference between the events levels and the overs levels that the event is the urgency of the message the level the lower means Basically the urgency of the lower this lower is supposed to to output only for example origin messages errors and Criticos and then we can see that the records have a destination which is by default your terminal and The destination is defined by the so-called handwar. Handwar is a class that comes from the login module in Python and it's responsible for Forwarding the events that you track to the destination that you want terminal file or some Web cloud like the socket handwar is just forwarding to the web Your events and a good example for this is sentry for example You normally in production would want to use something like socket handwar and we have a third place that have defined own level the handwar So you could have Event level you can have a lower level which is a future Logger with level warning without put only warning carrier and critical But the handwar defined in itself what kind of levels it's supposed to handle and forward So we have three components lower is the universal class. That is an interface that the code uses lock record that is the event and the handwar that sends the walk records to the appropriate destination and if we see that visually an example if we have the lower with Level warning Handwar with level error that would mean the lower is supposed to output only error warning carrier and critical messages But the handwar will only forward the error and critical messages and This is this is actually a good example of how you could manually configure the walking But that is not the recommended way that Python says Because imagine every time you you're making a jungle up You have to define step-by-step adding handwar setting levels and everything is to be nightmare The preferred way is what they call a dict config dict config is The out-of-the-box way that Python provides for configuring your walking And it sounds really similar to what we have in jungle. We have the lower ski the handwar ski and it basically a Dictionary with links between the keys. You have the my logger name to logger On level warning and he has console which is defined in the handwords console Just the linking between the keys in the dictionary By the way, we are going to use this dict configuration for the rest of the So a quick recap Lovers are named name is always unique if you get a water twice by the same name. It is the same water Loggers work with records or events Handwords is what defines a destination for events and all of the lowers records and handwares have their own levels Addiction reconfiguration is the preferred way for to define a walking for your app. So two more things handwares can Define their all for matters for matter is a class that comes out of the box from the logging and it's supposed to Get the record format it in a way literally format the string that goes to the handwar and then forward to the destination You could use the Python class or you could use the direct interface with this string like format and The next thing we have is filters filters are something that you could bind to either the logger or the handwar and You could execute an explicit Python logic when the event is forwarded either forwarded from the water or arriving in the handwar and The way that John will use it is by so-called debug true or give up false filters for example, you would want to Look basically queries if you are in development mode and you're you've set the true button production you want and The filter looks like that. It's just a Python class that Inherits the the logging filter and then Make the explicit check and maybe the most important thing about the loggers are that they actually have a hierarchy when you have a login configuration is always a mathematical tree of loggers that you have and The here he defined by the names with a separation of a point For example, if you have the loggers parent parent dot child Parent dot child is always a child word parent And if we have these three words defined here parent dot child parent dot child dot one child parent and We output a message from all of them. What would happen is that? the parent logo We output this message once Because of its handler the console handler The parental child's logo will output his message once for its own console handler and once for the parent handler because it will handle the child messages We have two messages and the grand child logo will output his message three times And that's something that we usually don't want sometimes we want but usually don't And we can manually configure that by setting the propagate boolean by true or false. It's part of the configuration Where you can set for a certain logger for example grand child. I would want to propagate the grand child Events to the child events, but I don't want to propagate the child events with the parent events This is a kind of fine-tuning configuration so if we have a logger that has its own handler and Has a parent over which has a parent handler and the propagates true the message will be Forwarded to where the propagate is set to true. This is the example from the login configuration that we saw so more of the story the hero is really important and Ideally the hero he should match your application's module structure Most of the time that is a rule of thumb We'll see an exception to a few sites So what about Django? We saw how the walking in Python works, but how does Django uses it? Well, even if you open the documentation you you'll see Sentence that say that Django actually use The Python configuration out of the box. He doesn't upgrade something. He doesn't provide a new interface for it just use the Python configuration and What is really good is that Django provides the entire here here vloggers Comes out of the box and it's a here here Meanings basically it's each logo is for example Django server is supposed to work on the HTTP request Django DB is a parent for SQL queries transactions and scheme and everything Which is really powerful So get back to the login configuration of Django. What it means we have the lower ski with Hope you can see it We have the lower ski and Each of the lower have defined their own handlers. So we have a dark linking between the keys and then We have defined Formatter for Django server and that's how a sample format or use that's the source code Django Literally checks the status code of the request and formats making the 500 red and 200 wide for example, and then we have explicit filters for The terminal output and the My what means output and the reason is you wouldn't want to send emails locally and you wouldn't want to Logs over both output in production probably So this is how it looks like. This is a default when configuration in Python We have the Django logo and the Django server logo and there's an explicit Propagate false setting that says, okay, I want to configure my Django server logo But I don't want to get from the handlers with Django over explicit check and We have the format or attached our Django server Formatter Django server handler and the two filters attached to the Django handlers So what if we want to use the lock all of our SQL queries? Well What we do is define Django DB backends logo in our lower key and This is a lower that comes out of the box from Django. It's a Document in the Django documentation we define our handler, which is forwarding to the stream handler, which is supposed to output in the terminal and We have the our own format or SQL format or which Only outputs the SQL query string without the time of execution and all the other things in the record custom lowers so in our app, we would want to place locks for debugging if something happens and We can configure them by explicitly saying the name of the lower and again the same pattern handlers and Everting and you could see that these two keys in the top version and disable existing cloggers so version is something that's Provided from the Python logging module, but it's not used yet. It's kind of Made with the idea that some if someday Python decides to change the format of the logging configuration entirely It should be backward compatible to the old software Disable listening cloggers is saying Okay, I want to define my login configuration as a dictionary and overwrite everything that I had disable everything that I've had before and So the next question is where to store the walks When when we are developing it's easy there me now. Well for urgent walks Sentry does the great job for storing this. It's a In the example that we saw it would be a hand word that only captures warning error and critical messages and forwarded to the Web socket handler to to sentry and this is this is really good to have this Split by urgency because when you open sentry you remove all the spam from the confirmation that things are working okay, and you see only the The things that are bad For non urgent walks, there are plenty of services outside and if you use some cloud-based deployment like Heroku or AWS It's usually a bad idea to store Files on the operating system where you put the locks It's usually a good better idea to use some cloud service like that's a dog to Have a good interface for querying because that that's what's important when you have You're walking and a few tips. So The locks are made for bad times. This is something that you realized with the first production outage and It's a good idea to put as much context as you can in your error handling and walking because When production is down, you might not be the one who write the code and remember what happened. It might be other person So, yeah, save that in mind The next thing is use sound visualization tool I found a cool package walking tree which you can call a method to and see a tree representation of your all of your logos in your app for a certain moment and then as I said, ideally the hero he should match the module structure But that know not always a good idea and channels is a good example of that in an older version of channels They have used the underscore the internet method name With the module and it turned out to be bad idea once they refactor their code You're enaming a file and suddenly you're walking configuration breaks Not only you're walking configuration, but anyone that uses channels So if you you're making a library that is supposed to be reused to other software's It's usually a good idea to be a constant exception handling These are three equivalent methods for exception handling and the first of them is kind of bad because you Explicitly assign the exception to a variable and then put it as a string to your lower dot error method a better way it would be calling explicitly the error method and Pass X info equal to true which you automatically capture the context from the accept And of course the logic module provides a short clip for that lower dot exception, which does exactly the same thing So I hope you're more comfortable now in the way configuration of Python and I would be really happy if you can some questions And also our CEO hacks of CEO will be having a lecture on Friday and it will be Really interesting one. So I sure you don't miss it. Oh, well a very interesting presentation Let's give him a second around a pause We now open the floor for questions we have five minutes So keep your question brief and to the point and there are two microphones one standing if it sits closer to the standing Microphone just go to the microphone. Otherwise the microphone myself Hello, thank you for the talk just a quick question Some other work I deal with legacy code Let's say generally where the logging had no configuration Just use the default in Django And I need to change that Throughout the code is logger info logger debug fairly random Any advice on how to treat that kind of sectional code? So it's older version of Python and older version of Django or it's Django 3.2 Python 3.7 at the moment Well, what I would do is first of all visualize the current configuration if I don't have an idea what currently Configure it in the end I would use something like that to visualize it and then define it explicitly in one place In the setting and start modifying on by one So I need to create a convic Yeah, it's like it doesn't even have one or you could define a new configuration and pass the disable existing words to false But then you have the case of mutating the current or in configuration And it's kind of implicit what that's not going to break something Yeah Okay, thank you very much. Thank you Any further questions? Let me check whether there's any remote questions. No Well, this pretty much concludes our talk, but we can continue our conversation In the hallway of a coffee and in the beer garden Thank you very much for coming Thank you


Welcome to economics and beyond. I'm Rob Johnson president of the Institute for New Economic Thinking. I'm here today with Paul Jay Who is the founder of analysis.news? He's a filmmaker currently working on a project with Daniel Ellsberg on his book the doomsday machine And he was the founder of the real news network Paul has been an acquaintance of mine for many many years Has a very very vast sensibility awareness ladder lateral packet pattern recognition skills that are outstanding and So I thought it would be important to share with our audience How Paul sees the current situation Paul. Thanks for joining me today. Thank you, Rob And I thank you for that. I don't even think I can pronounce that skill set. You just mentioned So I'm not so sure I haven't Yeah, I I've always known you to be someone who can integrate, you know You have economists and political scientists and historians and Security analysts and you seem to weave them all into a continuum. So that's That's what I'm celebrating here at the outset and we'll just have to prove the point on the fly Any rate so here we are Near the end of June 2020 the pandemic is Unmasking a whole lot of things we're in a presidential election year the Death of George Floyd and I can't breathe and all kinds of tensions has led to a lot of Activity in the streets and it seems as if if you will the What you might call intimidation or grounding of some kind of conventional wisdom has just broken loose So I'm curious. What do you see? What do you see that you find? Haunting or daunting. What would you like to see and where do you see light at the end of the tunnel? Well, I'll save light at the end of the tunnel till the end and I hope I don't Get too pessimistic as we get there Which I kind of wanted to answer You asked how do people regain Any I don't know if the word was respect or belief in the role of government and capitalism and My answer, I guess is they don't I think we've reached a moment in history I actually let me back up from saying they don't I'm saying they shouldn't Because the role of government now Not government as we would like to see it and The role of capitalism now. I think has reached the end of the road Now end of the road could take decades The problem is we don't have decades The climate crisis has created a kind of urgency That's unlike any other time in history. There's never been a time where you could say there's simply no possibility for incremental slow evolutionary change in Fact, you know, the history really has been on the whole that kind of evolutionary change giving rise to revolutionary changes Some of which have kind of worked and some have not but on the whole History, there's a chance to play things out We're at a moment where there's no time to play things out the leading climate scientist in Australia Just a few weeks ago. I think was quoted as Saying that the path we're on is leading us to the end of human society as we know it It's the dissolution of human society and we're talking a time frame of a matter of a decade like by by by 2030 The window is kind of closing. He most of the climate scientists are saying we already are going to pass 1.5 degrees That's a given. It's not that it couldn't be prevented. It's just given today's politics Given the control that finance has over the politics of virtually every almost every country in the world and the such short-sightedness of finance the the Absolute imperative of short-term gain No matter what and it's kind of blind. It's not evil people. It's the way the system works You know, they take BlackRock and Vanguard BlackRock the biggest asset management company and People that follow my stuff. No, I keep going on about these guys BlackRock and Vanguard and State Street the three just by themselves controls something like 14 15 trillion dollars of Assets, it's not their own money It's pension funds and sovereign wealth funds and billionaires, but they get to vote those shares and Essentially control who gets to manage the S&P 500 they control about 90% of the S&P 500 and You know, their business is they need to return on their they need a return on capital and it's it's kind of blind in a way and and That is forcing us over a cliff The concentration of ownership has reached such ridiculous proportions that you know a handful of these finance companies Essentially can determine who runs the economies of Most of the major countries they don't have the same control yet in China perhaps but even in China They're starting to buy Chinese index funds and such But China has to respond to the world economy that these companies do have such Dominance in so China is part of that global system and They're taking us over the cliff on several fronts They're taking us over the cliff on climate and as I say and I'm not saying anything people haven't heard It's this is a matter of just a few years and we're gonna hit two degrees Probably by 2030 2040 maybe at the latest 2050 and the predictions now is once you cross the two degree mark It's very very difficult and maybe impossible Not to get the three and four degrees and you start to getting into three and four degrees by the end of the century We're talking about most of the planet is unlivable. So we're in that moment and it doesn't matter what we're talking about Whether it's what's going on in the streets whether the the mad men in the White House, which obviously contributes to the climate problem Any other issue you talk about you cannot not put it in the context of This tiny window to save you know human civilization But the same forces that are ignoring this crisis when they pay lip service to it like black rock I can get into that more in detail later black rock supposedly Larry Fink the CEO had this big revelation and now they're gonna Supposedly get out of coal, but that's a crock as I say I can get into that more in detail But they just keep going on the road they're on because it is what it is they are who they are They really can't do otherwise as long as the imperative is Maximizing return on investment and they can't have any other imperative if they did they'd lose their pension funds They'll go to some other fund that will have that imperative So I mean Larry Fink head of black rock may be you know a nice guy may have the best of intentions But it's it's irrelevant what his intentions are That it is a system and we need to break the paradigm change the paradigm of that system They're also taking us over another cliff and this one we don't talk about very much and that's the threat of nuclear war Not only our black rock vanguard and state street The major investors in all the major fossil fuel companies of the world with the exception of total in France Which is owned by the French government and you can add a few other ones that are owned by governments But primarily the big the biggies are all owned by the same asset management companies Controlling interest essentially it's not just the three have controlling interest It's the three allied with other institutional investors wind up being often 70 80% Of the majority ownership of shares so not just fossil fuel companies But they also have control of the companies the 12 major companies that produce nuclear weapons Let's add to that they also have control over Lockheed Martin Boeing Raytheon Let's add to that. They also have control over the companies the biggest ones that own private prisons and Get this they also own Essentially controlling interest of all the major media in the United States with the exception of Bloomberg That's privately owned the Washington Post.  They are the giants the real giants of Wall Street I mean these same three institutional investors along with others They have the controlling interest of Goldman Sachs and the other investment banks that people hear more about Of course, it's also intertwined so and and then the third front is The the the pandemic and there'll be more and of course they everyone Study these things knew this pandemic was coming Why wasn't it prepared for? Because it wasn't prof as profitable to prepare for the pandemic as it was to do other things in pharma and other kinds of areas And there's this pandemic is the beginning of something in all likelihood This is this particular pandemic is going to have a second wave might have a third way And and and more will be coming But part of the pandemic the consequences of which which you've been doing great work on on your podcast Is the economic consequences of this closing down of production? Not only has the closed down production and and Made whole sections of the working class in the United States and and Canada and some extent Europe Thrown into poverty sections of the working class that never imagined they'd ever be poor So a lot of things are converging right in this moment And we we go back to the original Question which you asked and I re-asked myself is The capitalism we know it is done In the sense that it is it is totally out of solutions It can't face up to climate crisis. It cannot deal with the issue of nuclear weapons and the threat of destroying everything alive on the earth it can't even deal with pandemics and Can you trust the future of humanity? To a class to a system that can't even deal with viruses never mind nuclear weapons that's a how we say a Great culminating question with all of the things all the portraits as you painted each one is an evidence of what Mack Hall failed representation failed governance failed balance When you go to the Basic health systems Which had been commodified and privatized in the United States? I Don't know how I don't know how anybody can have any faith in anything right now There is no like pendulum swinging back to the middle. It's as if the fulcrum on the pendulum and broke away and we're just whirling through the sky Well, we are and we're not I would say the The the you know, we live in what what people call mixed economy So there's parts of the economy. They're socialized Publicly owned at various levels whether it's you know federally or state or or city A lot of the economy I don't have the number off the top of my head You might but tremendous amount of the economy actually is government expenditure, whether it's publicly owned or Governments buying services from the private sector, but it's actually public money. That's driving it Finance is completely dependent on public money now. It's just a joke They're the Wall Street would have been done in 0708 and they would have been done now If it wasn't for the Fed and the Treasury Department just shoveling money to shore up the assets of the wealthy So so the kind of social part of the economy Has grown enormously the other thing that's grown is that some of the biggest enterprises are Internally So brilliantly rational. I'm thinking Amazons and Walmart's and FedExpress They work fantastically Internally and our global scale But They they this beauty in a sense and I really do mean it I think Amazon and Walmart all of them just the fact they can keep track of all this stuff in an organized Rational way that's so many people working there and keeping track of all the products Of course, it's a large extent now the product of artificial intelligence Which is opening up tremendous perspective of what society could be But because if you can imagine that kind of structure of an Amazon and a Walmart and a FedEx and such And get rid of the thing. That's the problem. The problem is the private ownership Because it's not at the service of society Whether it's like just imagine a publicly owned Amazon or a publicly owned Walmart And I mean for real not just utopian which would mean there'd still be privately owned Walmart and privately owned Amazon But you have publicly owned with a public interest mandate So like you immediately raised the minimum wage to 25 bucks an hour or something like that You really enshrined workers rights, which would put tremendous pressure on privately owned Amazon and Walmart To do the same because they're gonna have trouble hiring anyone because everyone's gonna work Want to work in the publicly owned Now, of course, there is a problem of concentration of ownership even if it's public You know, if you had FedExes and Amazons and I'm gonna go get on to finance because I would like to see You know the federal government next By controlling interest of BlackRock. I think that would give enormous weight to the public interest But if you concentrate that all in the hands of a federal government and whatever party happens to be in control That can be as dangerous and we've seen that Over the 20th century that that kind of concentration of ownership can also be extremely dangerous even if it's in supposedly public hands But we we don't live in the days of the soviet union. We don't live in the days Where you you plan an economy with a pencil and paper It had to become bureaucratized. It had to become overly centralized and it had not to work Because that kind of planned economy that was attempted in the soviet union and china for that matter It was just impossible without becoming Essentially a police state to try to and to deal with the problems That couldn't be dealt with With pencils and papers. I read an article once They were trying to figure out how to give somebody a raise on an assembly line in the soviet union Let's say workers worked on an assembly line better than someone else on an assembly line How do you figure that out and give that person a bonus? But don't give a bonus to the person that didn't doesn't work harder And in the end it was I think when the the final document had something like 1200 signatures on it That's how many bureaucrats had to get their hands on it We don't live there anymore. We live in a day where artificial intelligence computerization Can be we can have very decentralized forms of public ownership and still Have a kind of overall plan In the public interest We can't get there quickly and it's going to be messy without any question But if we don't have starters public ownership of the critical parts of the fossil fuel industry and start to transition it out of business and transition through You know legislation and through more and more democratized Process of creating that legislation, but we got to get fossil fuel out of the picture And create a green sustainable economy that is not going to happen Evolut in an evolutionary way It's not going to happen because of the marketplace It's going to happen because we the people Say our fate of our future is on the line And we got to do it now because there's no time anywhere else We need to do the same thing with the arms industry. We have to get the profit motive out of us forum policy How much how many wars have we gone into how many tens of thousands even millions of lives have been lost Because the of the appetite of the arms industry We all know it but it just goes on and on the Ellsberg makes this great point. He says there's absolutely no rationale For having intercontinental ballistic missiles They're not functional. They don't act as a deterrent because Russia knows where ours are we knows where that where theirs are And the first thing everybody does is try to take out the other person ICBMs So it doesn't make it they'd not really do anything the only thing that's an effective deterrent Are submarines nuclear-armed submarines can move all over the place. It's not so easy to track them And they actually are a deterrent So why do we have ICBMs? Because the industry that makes ICBMs are making a fortune making ICBMs And I have to say that the same's true true in russia. They have the same kind of military industrial complex just for our listeners ICBM is intercontinental ballistic missiles a land launch missile Yeah, the land launch missiles So we need to take the profit motive out of The arms industry, but then the most critical of all in some ways Because of its power in all the other sectors of the economy I think there needs to be public sector banking not just retail like post office banking, which is fine But I mean on a scale That the people can say You guys who are into speculation and all the rest, you know, go do it if that's what you want to do But no more bailouts And the only way we can actually say that in a way that means anything Is if there's a public option a real public sector financing at a scale That it can deal with the flows of global capital because these institutions do play a real role I mean they you know while they speculate and are dangerous They also do facilitate global trade So it's not like they're you know They are parasitical, but they're not completely parasitical There really is a role for big for that kind of banking at that level But it but it needs to be With a public interest mandate Or we get into the kind of situations that we've been in so So to me, that's the light at the end of the tunnel How we get there ain't so easy Yeah Well, what I often refer to Is the which might call the moral legitimacy Of capitalism Comes from being embedded And governed by democracy But when democracy The rules the appointments the enforcement Regulations become things that are bought and sold By lobbyists to politicians for the what you might call to enable their survival When money matters so much to a politician's survival Then it ceases to be representative and the moral legitimacy of the system And not to mention the outcomes of the system Get torn apart And you've talked about the banking sector We uh how we what you might call reserve our contingent fiscal capacity to protect Too big to fail banks, which Some have called the mother of all moral hazards It encourages them to do more it cuts their funding costs and Gives them a competitive advantage relative to smaller banks We talk about the military industrial complex The pharmaceutical industry could be another case study And it just seems As if I guess what I would say to you know kind of quote our Research director at Inet Tom Ferguson His book is called the golden rule he who has the gold rules And it I think it's become increasingly transparent particularly as wealth concentration has Accelerated tremendously in the last 40 years That fewer and fewer people Not only don't have any say but are not taken care of Fewer and fewer people are taken care of is what I should have said the but The vast multitude of people have no political influence And You can always talk about lesser or two evils, but I think of it as a systemic problem That poisons the entire process both parties need to raise that kind of money in order to Gain the majority for incumbents to hold their seats, etc and the cost To the body politic of where our tax revenues Are spent Is overpowering Let me ask you a little bit You're working with daniel elsberg And I read his book doomsday machine and I think there were several dimensions to the book You know one is related to the kind of refractory economics of the defense area, but also The What you might call not coming clean with the public about how darn dangerous these Weapon systems are that if they get used the scale of the calamity for human life Is overpowering But tell me where how did you connect with elsberg and Where are you going with that project? Um, I I wanted to interview him. I just thought it'd be interesting I did not have on my mind The Extent of the threat of nuclear war it was way on a back burner for me like it is I think for most people I kind of had the same feeling. I think most people have that after the cold war ended Yeah, there's a chance of something accidental happening, you know, because we know the nuclear silos are not that well maintained and so on but You kind of figure jeez where it's gone on this long and we haven't blown up, you know There's we it's probably not going to blow up and we got to worry more about climate and stuff like that But he agreed to be interviewed and I went out And by the end of the end of the interviews, I did like I think 13 parts with him the first time I interviewed He scared the shit out of me Um It changed the way I looked at the world the the The Threat is not a maybe Not just Ellsberg Including people like Larry Wilkerson, you know, who was calling pals chief of staff and But also any number of senior states people military people who talk about this and have studied it They don't think there's a chance of a nuclear war They think it's inevitable They don't think it's an 80 90 whatever percent They think it's 100 percent That eventually if we keep on this path We will have nuclear war that they just think it's impossible to have so many nuclear weapons at play And to have such an unstable geopolitical situation That this doesn't eventually ignite and ignite is the right word Because there's no limited nuclear war if a nuclear war starts that whatever it is it will be enough to start nuclear winter a nuclear war just between India and Pakistan And now we see there's fighting going on on the border with India and China Just India and Pakistan if they start throwing bombs at each other It's enough to create a nuclear winter nuclear winner essentially is When enough cities burn The ash and smoke goes up into the atmosphere And eventually within a year surrounds the globe and ends agriculture It creates famine So yes, the immediate deaths are radiation In whatever region this war takes place never mind if this was a us russia confrontation It would be more than the whole northern hemisphere But the southern hemisphere within a year would have no food It's it is the end of not just human life. It's the end of as Ellsberg says in his kind of clinical analytical way large mammals It's the end and it's inevitable and it's a hundred percent And and you know, it's we need to internalize that and we can't park it at the back of our minds And so for me after talking to Ellsberg for all those interviews And then I read his book And the I know I guess I read the book for the interviews it was I guess the most important book in a way that I've ever read Because if we don't heed his warning We're done In some ways it's a more imminent threat than climate But they're not at all separate issues because the solution To the issue of the nuclear threat and the solution to climate is the same solution uh We need a progressive people's movement that elect a progressive government that First of all seriously Read negotiates arm nuclear arms treaties instead of what trump's doing getting out of them Instead of a trillion dollars. I guess it is over the next 10 15 years. I can't remember the time frame Uh that the united states is going to spend on nuclear new round of nuclear weapons and that wasn't trump That was obama and and the russians are now doing exactly the same and the chinese apparently are ramping up Chinese policy previously was to keep a fairly limited number of nuclear weapons Around 200 they think Now it looks like the chinese might get in on the uh this nuclear arms race um So we need a progressive people's movement a progressive government and we need to negotiate immediately arms treaties to start Significantly reducing the levels of nuclear arms. We have to stop this insanity Of this trillion dollars being spent on a new A round of nuclear weapons to what trump did to this arms Buildup new build up. He's introducing more tactical nuclear weapons Which is the height of insanity that you're going to have battlefield nuclear weapons and think That that doesn't lead to something else now. Yeah, they they would probably only use it against a non nuclear power Like like iran But you really think you're going to hit iran with a tactical nuclear weapon and they're not going to find some way to respond Like larry wilkerson has talked about, you know, just imagine One little nuclear bomb and whether it's terrorist Whether it's a provoked iran or a provoked north korea and it would be the americans that provoke it I I can't imagine they would ever do what i'm about to describe Other than in some weird defensive way Just put something on a container ship and ship it into new york harbour and blow it up Right now we are on a 10 second hair trick. We're back and not back and we never left the cold war strategic Setting is 10 seconds to decide If a blip on a radar screen or a bomb that goes off in new in new york harbour Is that A real attack by a major power Or is it something else 10 seconds And if and within that 10 seconds someone's supposed to decide whether to counter attack or not And if that bomb goes off in new york and i'm quoting larry wilkerson here I'm not making this stuff up. So i'm talking, you know quoting a guy who who's been at the scene most senior levels of military command Um That how would they know What just blew up in new york And the mentality is such That first strike is the solution And and in the pentagon There is a real belief and i'm quoting ellsberg now There's a serious belief and wilkerson backs him up on this That they can win a first strike And it's insane. They don't believe nuclear winter If a first strike knocked out all the major cities of russia And all their icbms And they had no capacity For a second strike back at the united states Just burning all this major cities of russia is enough for nuclear winter You don't need anything else Just that attack will end life as we know it on the planet So when i internalized that It just gave a different kind of sense of urgency to me about this project working working With ellsberg And then ellsberg said something which linked everything together in terms of the work i'd been doing on finance and black rocks and all the rest He said he's come to the conclusion that the cold war was uh essentially A plan to subsidize the american aerospace industry That the big companies that had been producing the aircrafts and such for world war two when the war ended You know the lockheed martins and others They had built such capacity And the domestic airlines industry simply wasn't enough And so they needed something and the something was a rationale of an existential enemy That would justify this massive expenditure In militarization and and nuclear armaments And if you have time i can tell you a story of an example of this I I interviewed a guy named lester earnest and this is a story I don't think anyone's reported on this but me And and i'm gonna make this part of this film project with ellsberg So lester earnest is a guy He goes into the army around 1947 48 um he's Because he's he's a brilliant guy. He later in life goes on to found The artificial intelligence program at stanford But he goes to the army he learns computers and he comes out. He's a whiz He gets hired by mit to work in something on the sage radar system Now imagine the dr. Strange love movie where you see this big board with all the lights and they can track every aircraft that's coming in And and the scheme was This sage radar system, which at the time was the largest gathering of computer power in the history of the world warehouses and warehouses of computers And they would track and coordinate all these radar stations And then when a soviet bomber comes in to bomb North america canada in the united states They have bowmark missiles all over the place and they would shoot these missiles Also guided by the sage radar system and knock out the airplanes. So lester ghost he goes to mit He's he's joins Actually, I think he's hired to lead the command the group that's going to create the command and control unit Of this program So he's there about a week and he tell I have all this on camera and he tells me He says I sat down and I talked to the scientist next to me. I said How did you guys deal with the radar jamming problem? And the guy said what? He says well, we know the soviet bombers and we know all of ours all have radar jamming equipment now How'd you get around that problem with your radar system? And the guy was quiet for a while and the guy says We don't talk about that The whole thing was a scam A trillion dollars Over 25 years And it didn't work for a day Everyone knew All the scientists knew mit knew in fact mit realized after about seven eight years of this How embarrassing it would be if it came out and they spun the company out of mit Into a separate private company that mit I think had a piece of They all knew it was bullshit, but everybody was making so much money And then it got even more ridiculous so Um lester gets called in to the ceo's office or someone and they say to him we want you to go to washington and persuade the pentagon in congress To put nuclear weapons nuclear tipped weapons on the bowmark missiles And lester says to him You mean we're gonna have a soviet bomber coming in over american territory or canadian With nuclear weapons And then we're gonna fire a bowmark missile with a nuclear weapon And we're gonna blow all these nuclear weapons up over north america And the guy said yeah And Lester said okay And lester went to washington. I said why'd you go?  It's it's about commercial interest And a whole system where everybody gets cynical That you know if I don't do it someone else is going to do it I might as well cash in That's just the way things are I mean all the internal rationalizations that go on in every industry. It's no different but you can talk to The guy that used to be the head of Communications for one of the big health insurance companies I mean they knew they were killing people by denying care and the health insurance But if I don't do it someone else will do it. So it's a whole system And and go back to where I was saying earlier. We got to break this paradigm because it's not just about The threat of these things that we're we're on the precipice now Well, there are many public officials Who have been what you might call refuting the pandemic by saying in order to keep the economy low Live we got to let We got to make more people work and be more exposed and have more people die from the covid virus So there's a there's a kind of non humanistic Consciousness or priority where the economy comes before the lives of people Yeah, very much. So uh You know, it wasn't that long ago Or it was 150 years or 200 years, but not that long and that's nothing in human history Were the british it was legal in in in england to have eight and nine year olds working in mines in wales There's a coal mine an iron iron ore mine on the in wales just across the border from england That in fact, there's been continuous iron ore mining there for something like 2000 years the romans used to mine there And I took a tour there and the union does tours. They used to have seven seven and eight year old kids And there would be crevices on the ceiling of the Section of the mine that had opened up.  They had no exhaust systems in those days. We're talking mid-18 19, you know mid-19th century, you know 1840 50 60 until they outflow eventually a child labor And and these kids they used to put sharp little stones now these are little white kids from wales, right? This is this is a kind of dehumanization that wasn't based on color. It was based on class These these kids were so dehumanized. They used to put sharp rocks down the backs of their shirts So when they were lying down chipping away, they couldn't fall asleep I mean get the mentality Of the elites that can think of children in that way And then of course these elites with the cross-atlantic slave trade. It's no it's not a big leap to dehumanize people of color If you want to exploit slave labor I mean they only eventually get rid of slave labor and all that because it turned out for england. It wasn't profitable anymore But of course it was for the united states for a long time You know these elites they dehumanize those who they exploit And people they just exploit more they dehumanize more that you know, there's lots of talk now about systemic racism Well, it's not an ideological problem primarily. It's not a cultural problem primarily Of course, it is cultural and ideological But but you know even now like on mainstream news you can hear people talking about systemic racism and how racism began and this racist ideology and white supremacy began during slave society and all this But I don't think I've heard anybody ask why does it continue in 2020 We're a long way away now from slave society Why do we still have the ideology of slavery? because the economic roots Of the slave system, which is exploit this totally unpaid black labor It reproduces that slave Ideology slave white supremacy because the elites are still exploiting black labor as this source of super cheap labor You know, I lived in baltimore for eight years um There's a story of a guy named rodney todd. I've written about So that rodney todd has seven kids He works at a university and on the east shore of maryland Um, he's divorced. So he he's in the house alone with the seven kids He's at the time in 20. This is 2015 because it was just the fifth anniversary of what i'm about to describe um He can't afford electricity. He's making eight dollars and 25 cents an hour seven children full-time job Described as an absolutely wonderful disciplined hard worker He can't he doesn't afford electricity. So it goes out and he gets uh propane heater And apparently in order not to wake up his neighbors with the sound of this generator And the propane heater.  That's the first question which nobody asked in the media They were all talking about well, why'd the power company cut off the power? Because you're not supposed to do that in winter and so on and so on and that's not a bad question But the more important question is why the hell couldn't he afford electricity? Why is he working for eight dollars and 25 cents an hour? He's working at that crazy minimum What was then the minimum wage? because There's a pool of desperate people willing to work for anything which is why This kind of poverty that exists in baltimore and many places across the country It continues Because this pool of cheap labor not only are people willing to work for eight 25 But it puts a downward pressure on wages You know all through this kind of service sector and such And then it's interesting. I go to look at well, who's the power company? So I wish I had these things off the tip of my head, but it's something like delmarva Delmarva is the name of the company. It's owned by esalon and who winds up owning the thing Black rock it all goes back to the same institutional investors again I mean it all comes back But the the the reason This kind of systemic racism continues It's it's it is cultural as well There's no doubt if you're born into a family a working class family And we know one of the reasons for the white supremacist ideology is to split white workers from black workers If you grow up steeped in this stuff Yeah, it's going to be hard to break out. It's not that it doesn't isn't a cultural phenomenon But it isn't primarily It's primarily it's it's cheap labor And it continues like in baltimore. I I interviewed a guy He worked he worked for johns hopkins The hospital it's it's it's a non-profit, but they run it just like a for profit He was making 13 dollars and 25 cents an hour cleaning surgical rooms He had to take special medicine to ward off hiv and other possible things He's cleaning blood and guts day after day He worked there for 14 years seniorities making 13 dollars and 25 cents and it's unionized It was seiu So so the economic underpinnings here of the racist structures Are this exploitation of cheap labor and and that if you could deal with that part the chronic poverty And the chronic you know the threat of this of falling into chronic poverty Also is terrified workers. So they're you know, they're just just having a job is all they want In fact, if you go into the poorest areas of baltimore And you ask about crime and police and and everything else. Yes, they want the police brutality to end and all the rest They also want safety But mostly they want, you know, they want jobs and they want jobs with some dignity so I think a lot of these atrocities I mean the nuclear one in that damage you early uncovered something With your deep dive with daniel elsberg and the others But we've got distortions malfunctions in finance. We've got the climate Challenge that is daunting dangerous and not being addressed We've got poverty and inequality that seems to be systemically embedded And we have governance that's unresponsive I I think that's a proper diagnosis But the question is where do we go from here? What is it That is necessary To transform Many of these dimensions of society to what you might call a healthier more sustainable place That would reinvigorate hope trust faith in governance and expertise the How would I say, uh, I think it's it's Important to diagnose things properly But we can't just throw up our hands and resign in despondency. Yeah, I agree So where do where do we go from here? In your mind, what what's what are the Things you're calling on Every citizen of this country or this world to do To Catalyze the transformation that we need Well, I I don't have a platform to call on the people of the world But I know what I would say if I did That's good enough. We'll work on amplification. Maybe your wife's good at that stuff We need a broad And let's start with the united states, but I think it's similar in other countries We need a broad popular front A real alliance of different sections of the society Including sections of the elites because I know there are sections of the elites that get how dangerous the moment is and have some rationality the the They're very Unfortunately, so far at least they're very marginalized themselves. It's not like the 1930s where an fdr could develop Who had a long-term vision? You know, it was there to save capitalism and I don't I don't think anything else was possible at that point anyway so But he was looking at the longer term Interest now the people in the elites that look at the longer term interest. They're they're really in the minority But they're there But led by working people particularly people of color There has to be a broad front outside the democratic party It has to I think it should literally have membership like it should have You know people pay five bucks and they they join And all of these kinds of organizations that exist that are dealing on specific issues You know, whatever it is, you know, whether it's black people defending themselves from the police or women fighting for women's rights People fighting against discrimination based on sexual orientation Uh, it doesn't matter which section of the society that rightfully justifiably Organizes to defend themselves because they get oppressed or attacked just because of who they are but Especially the working class in general We need a broad front that takes a position on the things I've been talking about Demand urgent action on climate finance fossil fuels the arms, you know, the the critical sectors We're going to be looking unless something remarkable happens at a biden government um I think biden's history Does not suggest that he will be what he said he wanted to be and this he did this Web cam with sanders. He says he wants to have the most progressive administration since rooseville There's nothing in biden's history that suggests um He will do that He will lean in all likelihood or he will Be under incredible pressure by the corporate democrats the chuck schumers and such Um But if the if the people if the movement in the streets and this incredible shift in public opinion That's happened over the last few weeks On the issues of the police and the issue of racism and it's been remarkable a majority of people Coming out and saying no we want justice It's not about law and order. It's it's I think unbelievable. I wouldn't have expected it That this tactic of having fires as the iconic image of the protest and those fires justify police repression It usually works It hasn't worked public opinion is with the protesters publicist opinions now demanding police reform It's a just a very interesting unusual moment You know, it's kind of a katrina moment, you know for two three weeks during katrina the media actually realized There's such a thing as systemic racism And then after three weeks was over they went back to the same nonsense that they normally report on But this isn't the same this this window Maybe because of the pandemic, I guess in fact, I think the pandemic has done something else than just free people up to be on the streets It's been a dose of reality It's broken this haze this cloud that entertainment culture and bullshit news culture creates All of a sudden people say, oh my god, these predictions came true. We actually we're all vulnerable here And if you get that we're vulnerable from the pandemic I think people are going to get we're vulnerable from climate Nuclear might be a little more of a stretch, but it's okay So we're in a moment now. We had better not lose Because it ain't going to come again. We're going to get Go back down this road You know gorvidal had this He said usa stands for the united states of amnesia. We'll go back there We need to take advantage of this moment. So what do we need? I think a broad front and I I don't know who can lead this But you know, maybe it's some of these progressive members that are in congress They're certainly activists all over the country But still very siloed and very city by city. There's very little national. There's the poor people's movement Which has some national footprint So I'm hoping and I'm that these kinds of people are getting together But I think it's very very important That the trade unions and and progressive workers in the unions Now's the time they have to make a move On the leadership of the unions that are so wedded to the status quo now not every unions like that. There's exceptions But the majority of the unions the leadership Have given up on any possibility of change They live like rich people, you know, they get two three four hundred thousand dollar salaries They have expense accounts that eat steak at lunches. I mean, I've I've met many of them the Conscious workers and there's lots of them Need to get organized because the unions even though it's a much smaller segment of the society Then it used to be They are a powerful force if they were in progressive hands Just last friday on juneteenth the longshore workers closed down the ports of the entire west coast of the united states and canada for the day In honor of and to support this black lives matter movement and against police repression The power that's in the hands of many unions Even though they're smaller it's still very strategic in telecommunications and transportation and Other sectors including, you know, aircraft airlines and goes on Certainly in the public sector. I mean the unions are still quite strong in the public sector So the fight in the unions is is very very important The need for the broad broad front Don't I would suggest to the working people and others that that help organize While you need sections of the elites Do not let them take it over and and you can see the money that's being thrown At these black organizations right now millions and millions of dollars being rained down On black activist organizations and we saw in fergusson and to some extent in baltimore how corrupting that was And then it starts all kinds of fights amongst the black activists Who's going to get the money and then the people doling out the money get to say Oh, we like you. We're giving you money. No, we don't like you. You're too militant. We're not going to give you money So there needs to be a mature Organization that's very broad very inclusive With a conscious clear leadership that yes If I were in that group, I would say yes vote for biden But have no illusions about who he is and what he represents Do not leave the streets When biden's elected it's time to get even more pressure Demanding, you know, what kind of cabin appointments is he going to have? How's he going to deal with climate? There has to be a feeling within this democratic government democratic party administration That the lid's going to blow off If they don't it really pay attention To what the people are demanding and the urgency of the times And biden and his people will be caught, you know, you know between the pressure They're getting from finance and others which will be enormous And the pressure coming from the people And the urgency of the times Um, do I think this all works out? la di da I doubt it But we'll get you know step by step We I don't see any anything else That points towards a solution And I think globally this is also going to play out in other places As dark as it looks like in brazil I've always had great hopes that brazil would be a place that might lead the way Because they have so much If if a progressive government comes back to power and I think Lula and them Played too much footsie with international capital But they they're hard to push around brazil. It's big They have resources and everything and there's a Very sophisticated working class there And balsun arrow is is looks as even more discredited than trump if that's possible so so We're in a crazy complicated time in global history I I have an underlying faith that we humans have always come through And so what's this quote from grant she it's called A lot of people are quoting it these days a pessimism of the mind and optimism of the will So yeah, I I still have some optimism because we humans have done it before But boy, we don't have much time to do it Yeah, what's the other i'm hopeful but not optimistic I think that that probably captures it Very as almost as well as grumpy that But it's very uh, it's very daunting And like I mentioned at the outset Uh, your lateral pattern recognition skills your ability to see across Different horizons and see how in some sense they're unified in the systemic dysfunction Is very important. It's very helpful to the diagnosis that Uh, we all have to ingest as we fuel our spirits to bring about change What I want to thank you for being here today Thank you. Thank you for Exploring thank you for picking up on jesse Isingers Challenge to In the realm of finance see a way out And and you carried it into many other dimensions. I very much look forward to your project with Daniel Ellsberg. You're an excellent filmmaker and that's a very important Concept and person To elevate at the in these challenging times So let's promise each other that when that film is about to be released We'll come back and we'll make another chapter of our podcast together So you you can uh share with us What you've been able to create And are your interviews still available? You mentioned the 13 interviews with Ellsberg. Are they still online? Yeah, yeah, people can just search for paul j daniel Ellsberg. They'll find them And uh, and i'm gonna be doing some new ones soon Excellent and they can go to the analysis dot news There's a short interview a quick five six minute one with Ellsberg a new one that's there which really lays out the case in about five minutes Okay, excellent. Thank you paul. Thank you very much. Bye. Bye. Bye And check out more from the institute for new economic thinking at inet economics dot org