Sentiment Analysis, Fourier Transforms, and More Python Data Science
Play • 57 min

Are you interested in learning more about Natural Language Processing? Have you heard of sentiment analysis? This week on the show, Kyle Stratis returns to talk about his new article titled, Use Sentiment Analysis With Python to Classify Movie Reviews. David Amos is also here, and all of us cover another batch of PyCoder’s Weekly articles and projects.

Kyle discusses an article about distance metrics for machine learning. David shares a Real Python article about Python signal processing and Fourier transforms with scipy.fft. We also cover several other articles and projects from the Python community including, simulating real-world processes in Python with SimPy, working with Microsoft Excel using Python and OpenPyXL, why running code during import is a bad idea, what I wish I knew as a junior dev, the Raspberry Pi 400 personal computer, dynamic sky replacement and harmonization in videos with SkyAR.

Course Spotlight: Simulating Real-World Processes in Python With SimPy

In this step-by-step course, you’ll see how you can use the SimPy package to model real-world processes with a high potential for congestion. You’ll create an algorithm to approximate a complex system, and then you’ll design and run a simulation of that system in Python.

Topics:

  • 00:00:00 – Introduction
  • 00:02:56 – Use Sentiment Analysis With Python to Classify Movie Reviews
  • 00:09:49 – OpenPyXL: Working with Microsoft Excel Using Python
  • 00:12:41 – An Illustration of Why Running Code During Import Is a Bad Idea
  • 00:16:52 – Distance Metrics for Machine Learning
  • 00:22:52 – Sponsor: linode.com
  • 00:22:52 – What I Wish I Knew as a Junior Dev
  • 00:35:29 – Fourier Transforms With scipy.fft: Python Signal Processing
  • 00:39:44 – Simulating Real-World Processes in Python With SimPy
  • 00:43:30 – Video Course Spotlight
  • 00:44:35 – Raspberry Pi 400 Personal Computer Kit Now Available
  • 00:49:55 – SkyAR: Dynamic Sky Replacement and Harmonization in Videos
  • 00:52:04 – Creating an Idea Factory with Roam Research
  • 00:56:02 – Thanks and goodbye

Show Links:

Use Sentiment Analysis With Python to Classify Movie Reviews – In this tutorial, you’ll learn about sentiment analysis and how it works in Python. You’ll then build your own sentiment analysis classifier with spaCy that can predict whether a movie review is positive or negative.

OpenPyXL: Working with Microsoft Excel Using Python – Ah, Excel. Everyone loves to hate it. But let’s face it. Excel is one of the most popular pieces of software ever written. But you love Python, not Excel, which is why you might want to learn OpenPyXL.

An Illustration of Why Running Code During Import Is a Bad Idea (And How It Happens Anyway) – Code that runs when a module is imported is usually a code smell. But sometimes there’s no way around it.

Distance Metrics for Machine Learning – Many machine learning algorithms can be summarized as transforming data to n-dimensional vectors and computing similarity between points by means of some distance metric. This article explores four of these metrics—the Euclidean, Manhattan, Minkowski, and Hamming distances—and how to compute them with Python.

What I Wish I Knew as a Junior Dev – Some of these are things even senior devs need to be reminded of sometimes!

Fourier Transforms With scipy.fft: Python Signal Processing – In this tutorial, you’ll learn how to use the Fourier transform, a powerful tool for analyzing signals with applications ranging from audio processing to image compression. You’ll explore several different transforms provided by Python’s scipy.fft module.

Projects:

Additional Links:

Support the podcast & join our community of Pythonistas

Google Cloud Platform Podcast
Google Cloud Platform Podcast
Google Cloud Platform
2020 Year End Wrap Up
This week, four of the podcast’s greatest hosts come together to celebrate all of the fun and informative episodes we’ve been privileged to do this year! Join Mark Mirchandani, Jon Foust, Priyanka Vergadia, and Brian Dorsey as we talk about our favorite guests and shows, some cool things that happened this year, and what we’re looking forward to in 2021! Cool things of the week * A Giant List of Google Cloud Resources blog * Google Cloud 4 Words site Our favorite episodes * Jon’s Favorites * GCP Podcast Episode 212: Data Management with Amy Krishnamohan podcast * GCP Podcast Episode 237: NVIDIA with Bryan Catanzaro podcast * Priyanka’s Favorite * GCP Podcast Episode 240: reCAPTCHA Enterprise with Kelly Anderson + Spring ML Potholes with Eric Clark podcast * Mark’s Favorites * GCP Podcast Episode 242: NASA and FDL with James Parr and Madhulika Guhathakurta podcast * GCP Podcast Episode 217: Cost Optimization with Justin Lerma and Pathik Sharma podcast * GCP Podcast Episode 228: Fastly with Tyler McMullen podcast * Brian’s Favorites * GCP Podcast Episode 223: Voice Coding with Emily Shea and Ryan Hileman podcast * GCP Podcast Episode 233: Bare Metal Solution with James Harding and Gurmeet Goindi podcast * GCP Podcast Episode 212: Data Management with Amy Krishnamohan podcast Sound Effects Attribution * “Bad Beep” by RicherLandTV of Freesound.org * “Small Group Laugh 6” by Tim.Kahn of Freesound.org * “It’s Always Night in Space” by JamesSilvera of HDInteractive.com * “Easy Cheesy” by LoboLoco of FreeMusicArchive.org
36 min
Towards Data Science
Towards Data Science
The TDS team
66. Owain Evans - Predicting the future of AI
Most researchers agree we’ll eventually reach a point where our AI systems begin to exceed human performance at virtually every economically valuable task, including the ability to generalize from what they’ve learned to take on new tasks that they haven’t seen before. These artificial general intelligences (AGIs) would in all likelihood have transformative effects on our economies, our societies and even our species. No one knows what these effects will be, or when AGI systems will be developed that can bring them about. But that doesn’t mean these things aren’t worth predicting or estimating. The more we know about the amount of time we have to develop robust solutions to important AI ethics, safety and policy problems, the more clearly we can think about what problems should be receiving our time and attention today. That’s the thesis that motivates a lot of work on AI forecasting: the attempt to predict key milestones in AI development, on the path to AGI and super-human artificial intelligence. It’s still early days for this space, but it’s received attention from an increasing number of the AI safety and AI capabilities researchers. One of those researchers is Owain Evans, whose work at Oxford University’s Future of Humanity Institute is focused on techniques for learning about human beliefs, preferences and values from observing human behavior or interacting with humans. Owain joined me for this episode of the podcast to talk about AI forecasting, the problem of inferring human values, and the ecosystem of research organizations that support this type of research.
48 min
Kubernetes Podcast from Google
Kubernetes Podcast from Google
Adam Glick and Craig Box
Cilium, with Thomas Graf
Thomas Graf is the inventor of Cilium and the co-founder of Isovalent. Cilium is a container networking plugin built on top of eBPF, bringing modern SDN technologies to accelerate your pods. Adam and Craig also discuss the many uses of Christmas trees. Do you have something cool to share? Some questions? Let us know: * web: kubernetespodcast.com * mail: kubernetespodcast@google.com * twitter: @kubernetespod Chatter of the week * Christmas trees: * Keep clear (mostly) * Culinary uses * Discussed in episodes 104 and 111 News of the week * Google grants $3m to the CNCF to run the Kubernetes infrastructure * AWS Managed Grafana and Prometheus * In partnership with Grafana Labs * Red Hat acquires Stackrox * Windows Containers GA in OpenShift 4.6 * CNCF Annual Report * KubeCon NA 2020 Transparency Report * Rancher announces Harvester * I’ll give you the key * Kubernetes 1.20 feature deep-dives: * Pod impersonation an short-lived volumes * Third-party device metrics GA * More granular control of storage permission * Sonobuoy goes beyond conformance * Project Contour security audit * Pulse: stats from Envoy Mobile * Crossplane 1.0 * Project Karavi from Dell Technologies * Cluster API provider for Microsoft Azure * Vitess project journey report * Tanzu Gemfire * Kubernetes Security Essentials from the CNCF Links from the interview * Chains and tables * Berkeley Packet Filter * eBPF * Episode 91: eBPF and Falco, with Leonard Di Donato * High level languages for kernel developers * eBPF Summit 2020 * Cilium * Is it DNS? * Is it a series of tubes? * BGP * Hubble * Accelerating Envoy and Istio with Cilium * Episode 128: Antrea, with Antonin Bas * Bringing Cilium to GKE with Dataplane v2 * Maglev load balancing connection scheduling * Isovalent * Notes on A16Z’s investment * Thomas Graf on Twitter
41 min
Python Bytes
Python Bytes
Michael Kennedy and Brian Okken
#216 Container: Sort thyself!
Sponsored by Datadog: pythonbytes.fm/datadog Special guest: Jousef Murad, Engineered Mind podcast (audio, video) Watch on YouTube Brian #1: pip search. Just don’t. * pip search [query] is supposed to “Search for PyPI packages whose name or summary contains [query]” * The search feature looks like it’s going to be removed and the PyPI api for it removed. * Alternative, and better approach, just manually look at pypi.org and search for stuff. * Right now it does this: $ pip search pytest ERROR: Exception: Traceback (most recent call last): ... [longish traceback ommited] --- xmlrpc.client.Fault: [Fault -32500: "RuntimeError: PyPI's XMLRPC API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information."] * The Python Infrastructure status page says, as of Jan 12: “Update - The XMLRPC Search endpoint remains disabled due to ongoing request volume. As of this update, there has been no reduction in inbound traffic to the endpoint from abusive IPs and we are unable to re-enable the endpoint, as it would immediately cause PyPI service to degrade again.” * This started becoming a problem in mid December. * The endpoint was just never architected to handle the scale it’s getting now. * There’s a current issue “Remove the pip search command”, open on pip. * The commend thread is locked now, but you can read some of the history. * I personally don’t understand the need to hammer search with a CI system or other. * Probably should be using a local cache or local pypi mirror for an active/aggressive CI system. * If you have scripts or jobs that run pip search , it ain’t gonna work, so probably best to remove that. Michael #2: QPython - Scripting for Android with Python * Python REPL on Android - interesting * Scripting Android tasks with Python - more interesting * Free, open source app that is ad supported. * Some people have commented that their phone is their only “computer” * With SL4A features, you can use Python programming to control Android work: * Android Apps API, such as: Application, Activity, Intent & startActivity, SendBroadcast, PackageVersion, System, Toast, Notify, Settings, Preferences, GUI * Android Resources Manager, such as: Contact, Location, Phone, Sms, ToneGenerator, WakeLock, WifiLock, Clipboard, NetworkStatus, MediaPlayer * Third App Integrations, such as: Barcode, Browser, SpeechRecongition, SendEmail, TextToSpeech * Hardwared Manager: Carmer, Sensor, Ringer & Media Volume, Screen Brightness, Battery, Bluetooth, SignalStrength, WebCam, Vibrate, NFC, USB Jousef #3: Thesis: Deep Learning assistant for designers/engineers * PyTorch (3D) / TensorFlow * The thesis: what is it actually about & goal of the thesis * Libraries mainly used: numpy, pandas * (Reinforcement Learning & GANs) Brian #4: sortedcontainers * Thanks to Fanchen Bao for the topic suggestion. * Pure-Python, as fast as C-extensions, sorted collections library. >>> from sortedcontainers import SortedList >>> sl = SortedList(['e', 'a', 'c', 'd', 'b']) >>> sl SortedList(['a', 'b', 'c', 'd', 'e']) >>> sl *= 10_000_000 >>> sl.count('c') 10000000 >>> sl[-3:] ['e', 'e', 'e'] >>> from sortedcontainers import SortedDict >>> sd = SortedDict({'c': 3, 'a': 1, 'b': 2}) >>> sd SortedDict({'a': 1, 'b': 2, 'c': 3}) >>> sd.popitem(index=-1) ('c', 3) >>> from sortedcontainers import SortedSet >>> ss = SortedSet('abracadabra') >>> ss SortedSet(['a', 'b', 'c', 'd', 'r']) >>> ss.bisect_left('c') 2 * “All of the operations shown above run in faster than linear time.” * Types: * SortedList * SortedKeyList (like SortedList, but you pass in a key function, similar to key in Pythons sorted function.) * SortedDict * SortedSet * Great documentation and tons of performance metrics in the docs. Michael #5: Łukasz Langa Typed Twitter Thread * Let’s riff on typing for a bit. * Here is my philosophy: If I have to type more than three characters to complete a symbol in my editor, something is wrong. * e.g. to go from email_service. → email_service.send_account_email() I should only need to type .sae then tab/enter. These types of things are vastly better because of type hints. * Python type hints are more malleable than even TypeScript. * Lukasz is addressing this comment: Controversial take: Types in a Python code-base are a net negative. * Points * put enough annotations and tooling connects the dots, making plenty of errors evident. * The most common to me at least is when a None creeps in. * The second bug often caught by type checkers is on the "return" boundary: one of your code paths forgets a return. * squiggly lines in your editor * Microsoft is now developing powerful type checking and code completion for Python in VSCode. This effort employs a member of the Python Steering Council, and possibly also the creator of Python himself soon. You think they would settle for "illusion of productivity"? Jousef #6: * Point Cloud operations → open3d Extras: Michael: * via Francisco Giordano Silva: On Brian's ref to using numpy all for array element-wise comparison, also please check out numpy.allclose method. Allows you to compare two arrays based on a given tolerance. Brian: * Just this: 2021 is exhausting so far. * Test & Code has shifted to every other week to allow time for other projects I’m working on. * This is probably a short term change. But I don’t know for how long. It’s definitely not going away though. Just slowing down a bit. Jousef: Engineered Mind podcast
36 min
The Cloudcast
The Cloudcast
Cloudcast Media
An Event-Driven Apps Look Ahead for 2021
James Urquhart (@jamesurquhart, Global Field CTO @VMware, O’Reilly Author) talks about event-driven application architectures, how it's changing real-time business models, and technology stack driven the evolution.  *SHOW: *483 *SHOW SPONSOR LINKS:* * BMC Wants to Know if your business is on its A-Game * BMC Autonomous Digital Enterprise * Datadog Security Monitoring Homepage - Modern Monitoring and Analytics * Try Datadog yourself by starting a free, 14-day trial today. Listeners of this podcast will also receive a free Datadog T-shirt. * Okta - You should not be building your own Auth * Learn how Okta helped Cengage improve student success rates during COVID. *CLOUD NEWS OF THE WEEK *- http://bit.ly/cloudcast-cnotw *CHECK OUT OUR NEW PODCAST - **"CLOUDCAST BASICS"* *SHOW NOTES:* * Flow Architectures - The Future of Event Streaming & Event-Driven Integration * The Cloudcast Eps.43 - James Urquhart * The Cloudcast Eps.344 - Bringing AI to the Edge (Swim.ai) * The Cloudcast Eps.334 - The Future of Edge Computing (Derek Collison, Synadia) *Topic 1 *- Welcome back to the show. We’ve known you for quite a while, going back to working together on very early Cloud stuff. You’ve always enjoyed being focused on complex, distributed systems. Tell us what you’re focused on these days.  *Topic 2 *- Let’s talk about this concept of “event-driven” and flow. Where did it come from, what does it do, why is it valuable to application designers? *  * *Topic 2a *- What is a “flow” and how is it related to event-driven? *Topic 3 *- Events are data. We’ve had relational databases for data, and then we had NoSQL or eventually-consistent databases for data. Are events a new type of data, or a new way to deal with data in a different context?  (channels, replays, etc.) *Topic 4 *- Can we talk through an example of an event-driven application, or an event-driven integration between multiple organizations? How is it new/different? What unique capabilities does it bring now?  (Kafka, IoT, API Gateways, etc.) *Topic 5 *- Cloud made IT self-service. Serverless made Ops become on-demand. If I’m a business leader, what does event-driven give us?*  * *Topic 6 *- Where are we in the maturity of event-driven architectures? What might be some of the next stages coming in 2021 or 2022?   *FEEDBACK?* * Email: show at thecloudcast dot net * Twitter: @thecloudcastnet
43 min
Search
Clear search
Close search
Google apps
Main menu