Tag: python

Intro to Machine Learning with TensorFlow
Event

Intro to Machine Learning with TensorFlow

This is a 16-hour course on Tensorflow. We will explore Tensorflow architecture and application programming interfaces to build machine learning algorithms and train then on a real world dataset. During the course you will cover the following topics: Introduction to Tensorflow Present a small model end to end using Jupyter Notebook Present a small model end to...

Python Switches to Match-Case
Post

Python Switches to Match-Case

Originally posted on dev. If reading about code with foo, bar, and math examples is the bane of your existence, keep reading. Expect examples with sweaters and dogs. Jump to: Past Present Benefits Example 1 Example 2 Future Past Once upon a time, in 2006, a Python Enhancement Proposal(PEP) was introduced. PEP 3103 detailed many different ways a switch...

11 Useful Python One-Liners You Must Know
Post

11 Useful Python One-Liners You Must Know

Originally posted on makeuseof. Python One-Liners can help you perform complex tasks with just one line of Python code. Here are some of the most useful ones to know! Python is known for its short and clear syntax. Due to the simplicity of Python, it’s sometimes referred to as “executable pseudocode”. You can make Python...

How to package your Python code
Post

How to package your Python code

Originally posted on opensource. Use setuptools to deliver Python code to users. You’ve spent weeks perfecting your code. You’ve tested it and sent it to some close developer friends for quality assurance. You’ve posted all the source code on your personal Git server, and you’ve received helpful bug reports from a few brave early adopters. And...

How to use Python to figure out why your friends have more friends than you
Post

How to use Python to figure out why your friends have more friends than you

Originally posted on thenextweb. Allow me to demonstrate: The Friendship Paradox Do your friends, on average, have more friends than you? If you are an average person, there is a high chance that you have fewer friends than your friends. This is called the friendship paradox. This phenomenon states that most people have fewer friends than their...

How to Use Python’s time Module
Post

How to Use Python’s time Module

Originally posted on makeuseof. Time and date manipulation is one of the more complicated coding tasks. Fortunately, Python makes it much easier with its powerful time module. Python’s time module offers a wide variety of time-related features and is often handy when building your backend with Python. Using this library, you can fetch the current...

Python 3.10 is finally adding some much-needed features
Post

Python 3.10 is finally adding some much-needed features

Originally posted on techradar. The next stable version of popular open source programming language, Python 3.10, has been released, bringing with it a host of new syntax and typing features that’ll appeal to long-time developers. Python 3.10 follows the languages’ 30th anniversary earlier this year in February 2021, and though it doesn’t have a long list of new features,...

Getting Started With Python on Hardware
Post

Getting Started With Python on Hardware

Originally posted on makezine. Python is one of the fastest growing languages in the world. It’s accessible enough for schools to teach as a first programming language but powerful enough to handle the complexities of some of the most widely used web services, including Instagram, Spotify, and Netflix. And now Python’s star is rising in...

How I patched Python to include this great Ruby feature
Post

How I patched Python to include this great Ruby feature

Originally posted on opensource. What I learned from adding “else-less” functionality to Python, as inspired by Ruby. Ruby, unlike Python, makes lots of things implicit, and there’s a special kind of if expression that demonstrates this well. It’s often referred to as an “inline-if” or “conditional modifier”, and this special syntax is able to return one value when...

8 Ways to Check if a File Exists Using Python
Post

8 Ways to Check if a File Exists Using Python

Originally posted on maekuseof. Here are multiple ways to check for a specific file or directory using Python. Python’s dependency on external files is a crucial aspect, it’s wise to pay heed to the base/source files before executing any code. Before running a particular program, you need to ensure your source files exist at the...

How to Build APIs in Python: 8 Popular Frameworks
Post

How to Build APIs in Python: 8 Popular Frameworks

Originally posted on makeuseof. So, you want to build an API, but where should you start? Try these frameworks on for size. Python is growing exponentially in popularity due to its simple learning curve and straightforward syntax. The coding language is used in web development, software development, mathematics, system scripting, and just about everything else...

9 Amazing Things To Do With Python
Post

9 Amazing Things To Do With Python

Originally posted on dev. Hello, buddies! We love python, right? So today we’re going to see some amazing things that can be done with python(you may not know them). Interesting? Let’s start! 1. Google Search with Python Sometimes we get so much into programming that we feel lazy enough to open the browser and search...

Python 3.10’s Top 6 Useful Features
Post

Python 3.10’s Top 6 Useful Features

Originally posted on makeuseof. Python’s new version 3.10 brings some exciting changes to the language. Here are the features we’ll be making use of. Python 3.10 boasts of being one of the most stable versions available for users to download, and will be released later this year. The newly released version will come with many...

How different programming languages read and write data
Post

How different programming languages read and write data

Originally posted on opensource. In his article How different programming languages do the same thing, Jim Hall demonstrates how 13 different languages accomplish the same exact task with different syntax. The lesson is that programming languages tend to have many similarities, and once you know one programming language, you can learn another by figuring its syntax...

5 hidden gems in Python 3
Post

5 hidden gems in Python 3

Originally posted on opensource. Python 3 improved upon Python 2 in many ways; here are some of the most notable. Python has made a name for itself in the world of programming for being easy to learn, easy to read, and reasonably easy to debug. It’s seen as a good starting language because it can...

Enter invisible passwords using this Python module
Post

Enter invisible passwords using this Python module

Originally posted on opensource. Give your password an extra layer of security with GPG and the Python getpass module. Passwords are particularly problematic for programmers. You’re not supposed to store them without encrypting them, and you’re not supposed to reveal what’s been typed when your user enters one. This became particularly important to me when...