November 2018 Summaries
7 posts from Pybites
Filter
Month:
Year:
Post Summaries
Back to Blog
This article introduces the Python library dateutil, highlighting its features such as parsing date strings, calculating date differences with relativedelta, and generating date ranges with rrule, making date manipulations simpler than using Python's built-in datetime module alone. The author demonstrates how dateutil can parse complex date formats from log entries, calculate the time difference in months or years, and create schedules for recurring events. The article also mentions that while dateutil offers timezone functionality, the author prefers using the pytz library for that purpose. It concludes by encouraging readers to explore dateutil further for advanced date-handling tasks and suggests considering other standard Python libraries like calendar for basic operations.
Nov 30, 2018
702 words in the original blog post.
The article provides a comprehensive guide on testing a Django application using pytest and Selenium, focusing specifically on the CodeChalleng.es platform. It explains how to set up the testing environment by installing necessary libraries like pytest, pytest-django, and Selenium, and configuring environment variables for database access. The author demonstrates how to write tests for both logged-out and logged-in states of the homepage, using Selenium to navigate the DOM and verify elements. The piece highlights the use of pytest fixtures for managing database connections and Selenium drivers, and it provides examples of assertions to verify page content, such as headers, links, and interactive elements. It also emphasizes the importance of automated testing in handling complex scenarios and growing application functionality, offering insights into potential test cases and strategies for effective regression testing. The article concludes by encouraging readers to engage in further testing practices and explore the provided Django + Selenium code challenge.
Nov 22, 2018
1,990 words in the original blog post.
The text highlights various updates and insights from the Python programming community in November 2018, including the opening of Pycon US 2019 registration with discounted tickets, and a significant uptake in Python 3 downloads from PyPI. It features a career-switch success story by Erik on freeCodeCamp, GitHub's new feature allowing issue deletion, and Google's Tech Dev Guide on programming foundations. Discussions include Andy Knight's thoughts on frameworks, a tip from Raymond Hettinger on using str.format_map() with dictionaries, and Adrian Rosebrock's tutorial on object detection using Python and OpenCV. The text also mentions a new Code.org tutorial for the Hour of Code, France adopting Python as the official educational language, and resources for publishing open-source Python packages to PyPI. Additionally, it highlights Al Sweigart's curriculum for Python packaging and mentions TUI programs for monitoring network traffic, concluding with a nod to the Python community's encouragement to keep coding.
Nov 18, 2018
544 words in the original blog post.
An automated script was developed to streamline the process of converting open pull requests (PRs) from a challenges repository into markdown format for weekly review posts. Utilizing the GitHub API and Python's collections.defaultdict, the script extracts PR information without requiring an API key. It parses each PR using a fixed template to document developers' learning experiences and feedback. A custom regular expression is employed to extract specific content from the PR template, ensuring a consistent format. The script then organizes the extracted data into a dictionary, sorting it by code challenge IDs. Finally, the script generates markdown that is compatible with review posts, which is printed in an orderly manner, showcasing all PRs per challenge. This automation not only saves time but also enhances Python skills, with the complete script available for review in a blog code repository.
Nov 13, 2018
884 words in the original blog post.
The article provides an overview of a recent code challenge focused on analyzing Olympic Games data using Pandas, highlighting the active participation of the community with 12 new pull requests. It discusses various Python learning points from the community's submissions, such as using the difflib SequenceMatcher, collections Counter, API interactions, JSON parsing, the PRAW module for Reddit API, and the PyQt5 framework for GUI development. Participants shared their experiences with datetime manipulation, error handling, and learning Pandas, as well as the challenges they faced with Git. The article encourages continued participation in PyBites Code Challenges and offers resources like the Bites of Py exercises and the #100DaysOfCode course to further develop Python skills.
Nov 09, 2018
524 words in the original blog post.
A code challenge invites Python enthusiasts to engage in a two-part natural language processing project using podcast transcript data, designed to enhance data science skills through hands-on learning. The first week involves selecting a podcast with ample data, retrieving transcripts using methods like web crawling or data extraction, and storing the results in a database. In the second week, participants create a virtual environment, install the Natural Language Toolkit (NLTK), and analyze the data to find patterns of interest, such as sentiments or recommendations, showcasing their findings creatively. The challenge emphasizes learning and encourages feedback or ideas for future challenges through various contact methods. PyBites offers additional resources, including a collection of code challenges and exercises, to further develop Python skills.
Nov 09, 2018
374 words in the original blog post.
The text presents a collection of tweets and announcements from various sources related to programming, particularly focusing on Python and other open-source technologies. Highlights include an interview with Mike Kennedy, host of the popular Python podcast "Talk Python," and a guide on advanced Git features. There are tutorials on setting up Python for machine learning, using JSON in Python, and performing linear regression, along with resources for learning Unix and teaching with comics. Notable mentions include the introduction of new GitHub notification features, Digital Ocean's report on JavaScript's enduring dominance, the launch of Code.org's #HourOfCode with new tutorials, and the game "Super Potato Bruh" developed in Python, which is now available on Steam. Additionally, a Visual Studio Code extension called Neuron for data science is introduced, and the Python Software Foundation announces the launch of its newsletter.
Nov 04, 2018
479 words in the original blog post.