Why Is the Migration to Python 3 Taking So Long?
- “It’s time to move on to Python 3,” he said, telling the audience that they should start adopting the new version of the language into their workflows.
- In 2019, though, Python 3 has finally (mostly) become the default version of the language for new Python development, and many companies and projects are using the top features of Python 3: f-strings, Path, type hints, asyncio, and, of course, Unicode rendering.
- With these changes, many libraries that people use (like scikit-learn for machine learning) started their migrations to Python 3.
- But, there are a lot of risks with not updating to Python 3—most importantly, the risk of losing security updates, not taking advantage of new features like type hints, and speed gains.
Naïve Bayes for Machine Learning – From Zero to Hero
- Imagine a situation where you are trying to predict whether it will rain the forthcoming week, backed with information relating to weather conditions of the 7 days before the actual “rainy day”, for the past 2 years.
- Prior probabilities are based on previous experience, in this case the percentage of GREEN and RED objects, and often used to predict outcomes before they actually happen.
- In the Bayesian analysis, the final classification is produced by combining both sources of information, i.e., the prior and the likelihood, to form a posterior probability using Bayes' rule.
- Even if these features depend on each other or upon the existence of the other features, a Naive Bayes classifier would consider all of these properties to independently contribute to the probability that the flower belongs to a particular species.
- Let’s build a Naïve Bayes classifier for the famous Iris dataset classification problem.
Offshore wind will be a $1T industry by 2040, but it's needed now
- A new outlook from the International Energy Agency predicts offshore wind generation will grow 15-fold in the next 20 years, emerging as a $1 trillion global industry.
- According to my own analysis, by 2030, the U.S. offshore wind industry will expend some $70 billion to build the wind farms to meet the states' commitment, providing good jobs for some 40,000 people.
- Climate change is already costing coastal communities plenty, but fortunately, offshore wind can not only provide much-needed economic benefit but also play a crucial role as an emissions-free resource.
- In fact, the IPCC report explicitly says that ocean-based renewable energy sources, including offshore wind, can help address climate change and generate economic opportunities.
- Another is the recently-founded Responsible Offshore Science Alliance which will work to increase data on fisheries and wind development to allow both industries to better understand the effects of wind on fisheries and ocean ecosystems.
Build Your Own React
- We start by creating the dom node using the element type, and then append the new node to the container.
- So we are going to break the work into small units, and after we finish each unit we’ll let the browser interrupt the rendering if there’s anything else that needs to be done.
- To organize the units of work we’ll need a data structure: a fiber tree.
- We keep the part that creates a dom node in its own function, we are going to use it later.
- That’s what we are going to do now, we need to compare the elements we receive on the render function to the last fiber tree we commited to the dom.
- Then for the case where the element needs a new dom node we tag the new fiber with the PLACEMENT effect tag.
Turning PostgreSQL into a queue serving 10k jobs per second (2013)
- SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.
- QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.
- There are many advantages to this design, but the most striking is that the queries that workers have to run in order to find a job to work no longer block one another.
Google Cloud Kubernetes in 10 Minutes
- In this hands-on post, we’ll learn continuously deliver a demo application to the Google Kubernetes Engine using Semaphore CI/CD.
- By the end of this read, you’ll have a better understanding of how Kubernetes works, and, even better, a continuous delivery pipeline to play with.
- To get a stable public IP address, Kubernetes provides a load balancing service that forwards incoming requests to the pods.
- We tell Kubernetes that the service will serve the pods labeled as app: semaphore-demo-nodejs-k8s-server.
- You’ll need to sign up few services: Google Cloud Platform will be our cloud provider; also GitHub for the application code and Semaphore for the CI/CD.
- Example application and CI/CD pipeline showing how to run a Node.js project on Semaphore 2.0.
- The build job copies some configuration files inside the Docker image and pushes it to the registry.
- Now you know how to build a CI/CD pipeline for Google Cloud Kubernetes Engine.
Cisco Sales Forecast Falls Short on Slowing Global Economy
- Ian King and Nico Grant (Bloomberg) -- Cisco Systems Inc. gave a quarterly sales forecast that fell far short of projections, signaling that companies are postponing hardware purchases amid global political and economic uncertainty, including the China-U.S. trade standoff.
- Revenue in the fiscal second quarter will decline 3% to 5% from the same period a year earlier, the San Jose, California-based company said Wednesday in a statement.
- Chief Executive Officer Chuck Robbins is transitioning Cisco into more of a networking software and services company.
- Cisco shares declined to a low of $45.12 in extended trading after earlier closing at $48.46 in New York.
- Fiscal first-quarter net income fell to $2.93 billion, or 68 cents a share, from $3.55 billion, or 77 cents, a year earlier.
- Cisco’s hardware business generated sales of $7.54 billion in the period ended Oct. 26, a drop of 1% from a year earlier.
Azure Arc is Microsoft's Latest Enterprise Multi-Cloud Play
- That leaves clouds and vendors alike eyeing big enterprise players who will benefit from taking a cloud-native approach but who need to keep a large part of their infrastructure safely tucked away on premises.
- Basically, Arc brings support for Azure Resource Manager, which ties together compute resources inside Azure, to resources running outside of Microsoft's cloud — whether the resource is running in an on-prem data center or on another cloud.
- Once registered, external Kubernetes clusters — whether in an on-prem data center running Pivotal on vSphere or in another cloud using managed services such as Amazon's EKS or Google Kubernetes Engine — can be managed the same as if they were running natively using Azure's Kubernetes service, AKS.
- Azure Arc can also run managed database services in hybrid and multi-cloud environments, with Azure SQL Database and PostgreSQL Hyperscale currently supported.
Avoid Memory Leak With React SetState On An Unmounted Component
- This error often happens when you make an asynchronous request for data, but the component unmounts.
- In this post I'll show some possible workarounds for avoiding memory leaks with data fetching.
- When you use fetch data, you make an asynchronous request.
- You normally do this by using a Promised-based API, for example, the browser-native fetch.
- Strictly speaking, you don't cancel your data fetching request.
- The StackOverflow code wraps your API call into a Promise around XMLHttpRequest.
- XMLHttpRequest allows us to abort a request without using promises.
- We've now seen a few approaches to avoiding setting state on a unmounted component.
- But if you need another method, you've now seen some ways to avoid a React warning when fetching data.
Recanvass begins in Kentucky governor's race
- In a fight to keep his job, Republican Gov. Matt Bevin requested that all 120 counties recheck results from last Tuesday's election, which showed him trailing Democratic state Attorney General Andy Beshear by more than 5,000 votes.
- Results from the recanvass are expected Thursday afternoon, according to Lillie Ruschell, communications director for the Kentucky secretary of state.
- Kentucky law does not allow for a recount in a gubernatorial general election, but a campaign may request a recanvass of the votes with the secretary of state.
- Unlike a standard recount of votes, a recanvass is a reprint of the receipts from voting machines to check for reporting or clerical errors.
- Should Bevin want to pursue further action, he would have to cite specific evidence with the state's election board after they have certified the results on November 25.