Home / Companies / Pybites / Blog / May 2017

May 2017 Summaries

22 posts from Pybites

Filter
Month: Year:
Post Summaries Back to Blog
The article explores the use of the property decorator in Python, demonstrated through the creation of a simple Account class. It highlights the advantages of properties in object-oriented programming, particularly in managing computed attributes and encapsulation. The author explains how properties allow for the control of attribute access, enforcing constraints such as type and value limits, with examples of setting and modifying a start balance. The use of property decorators enables attributes to be computed on demand, enhancing efficiency, especially when external resources are involved. The text also underscores the Pythonic approach to getters and setters, advocating for the use of property decorators over traditional methods, and suggests exploring other use cases such as caching and refactoring. The author encourages readers to experiment with property decorators and share their experiences, hinting at potential collaborative challenges to explore their application further.
May 31, 2017 820 words in the original blog post.
In this week's Python coding challenge, participants are tasked with creating an app that calculates the cost of operating an electrical device based on its wattage and the cost per kilowatt-hour (kWh). The basic requirement is to develop a command-line interface that allows users to input device wattage and kWh cost to calculate the hourly operating cost. For those seeking an added challenge, bonus features include transforming the app into a web application or a GUI using frameworks like TkInter, allowing users to input the number of usage hours, and incorporating persistent storage to track and display past queries. Participants are encouraged to focus on learning and problem-solving rather than the app's aesthetic appeal, with support available through instructional documents and community submissions via Pull Requests. The challenge emphasizes growth in Python skills and creativity in execution, with feedback welcomed for future challenges.
May 29, 2017 415 words in the original blog post.
Challenge #20 of the coding series has been enthusiastically received, with participants submitting impressive pull requests that showcase their growth and creativity in Python programming. This challenge involved exploring object-oriented programming, with projects ranging from Julian's exploration of inheritance in the World of Warcraft character system to Bob's task planner that utilizes the Twilio API for weekly updates. Other notable submissions include a Karma app using inheritance and dunder methods by 100DaysOfCode, and Dante's Rooms framework for creating adventure games, complete with unit tests. The community is encouraged to continue participating at their own pace, with no deadlines, and to contribute by branching their changes and submitting them against the Community branch. The organizers express their joy and humility at witnessing the participants' progress and innovation, and they invite more coders to join in by forking the challenges repository.
May 29, 2017 279 words in the original blog post.
The text is a collection of tweets and retweets from various Python enthusiasts and developers highlighting notable updates, resources, and tips related to Python programming. Key mentions include the early access release of "Cracking Codes with Python" by Al Sweigart, a blog post explaining PEP 518, and several Python tools and projects such as Gitsuggest and top machine learning open-source projects. It also references recent releases and tips, such as Pytest 3.1.0, navigating edits in PyCharm, and understanding shallow and deep copy in Python. Additionally, there is mention of a new book on Tkinter, a post about responsive bar charts using Bokeh and Flask, and blog posts inspired by talks from PyCon 2017.
May 28, 2017 331 words in the original blog post.
The blog post provides an engaging exploration of Python classes within the context of Object-Oriented Programming, using relatable examples like Angry Birds and personal coding experiences. The author demystifies the concept of classes by explaining them as templates for objects, illustrating through the creation of a Pig class in Angry Birds and a Person class with attributes like name, age, and job. The post further elaborates on the use of classes for repetitive data sets, such as movies or complaints, and highlights the utility of class functions for specific tasks, like calculating BMI. Emphasizing the necessity and versatility of classes in programming, the author encourages readers to practice by coding their own classes, like a car class, to enhance understanding and fluency in Python.
May 25, 2017 1,003 words in the original blog post.
PyCon 2017 was a vibrant and inspiring conference that offered extensive networking opportunities, stimulating talks, and hands-on workshops. Attendees, including the author, prioritized networking over talks, as the latter could be watched online later, while in-person interactions were unique to the event. The expo hall was bustling with companies and developers, sparking inspiration through discussions with notable community members like Dan Bader and Trey Hunner. Keynote speeches, such as Kelsey Hightower's talk on Kubernetes, were highly praised, and various sessions covered a range of topics, from command-line tools and Python dictionaries to data visualization and software testing. A notable talk by Mariatta Wijaya emphasized finding mentorship within the Python community, underscoring its supportive nature. Overall, the conference highlighted the growing popularity of Python 3.6, showcased innovative ideas, and celebrated the community's inclusiveness and collaborative spirit.
May 24, 2017 777 words in the original blog post.
PyCon was a highlight this week, with enthusiastic engagement from fellow Python enthusiasts, particularly around the code challenges that stretch programmers and allow them to submit their work via pull requests. In the spirit of these challenges, scripts were shared from the 100 Days of Code repository that demonstrate posting to various APIs, including the Facebook, Twitter, and Slack APIs, showcasing practical applications of Python skills. Although plans to explore the Spotify or YouTube APIs were postponed, the community is encouraged to contribute their own projects or ideas. Looking ahead, the focus will shift to Object Oriented Programming with a new free-form challenge designed to explore classes and inheritance, inviting participants to contribute at their own pace and share their progress by forking the challenges repository and following submission guidelines.
May 22, 2017 367 words in the original blog post.
This Python coding challenge encourages participants to explore Object-Oriented Programming (OOP), a fundamental concept in Python where everything is considered an object. Participants are tasked with defining a class with a constructor and at least two methods, creating a subclass that inherits from the parent class, and integrating another class for use in the initial subclass. Examples provided include creating a Session class with subclasses like Talk or KeyNote, or developing a simple game with various characters and places. Advanced coders are encouraged to implement Polymorphism, Encapsulation, class or static methods, Abstract Base Classes, and special methods like __str__ and __repr__. The challenge also offers guidance on submitting solutions via a Pull Request for community review and encourages feedback and ideas for future challenges, emphasizing that there is no single best solution, but rather a journey of learning and improving Python skills.
May 22, 2017 517 words in the original blog post.
At PyCon 2017, attendees and online commentators shared various exciting insights and tools related to Python. These included the support for Vim mode in PyCharm, the swift availability of conference videos online, and the enthusiasm for tools like bpython and pgcli. Highlights from the event also focused on the evolution and new features of Python 3.6, the use of Speedml for accelerating machine learning projects, and utilizing Jupyter notebooks for enhanced interactivity. Other notable mentions were the development of a 2D platformer game using Tkinter, 3D interfaces for Python with Unity3D, and inspecting PCAP files using AWS Lambda. Talks at the conference emphasized the importance of making APIs user-friendly and fostering supportive community environments, while also offering insights into modern Python dictionaries and creating Facebook Messenger bots with Python and Flask.
May 21, 2017 340 words in the original blog post.
A developer participating in the 100 Days of Code Challenge created a Python-based Steam Game Notifier to send email updates of new game releases on the Steam platform. The program comprises four scripts: email_list.py for storing recipient emails, emailer.py for sending emails, pull_xml.py for downloading the new releases XML file from Steam, and xml_steam_scraper.py for parsing and managing database entries. The database tracks game titles, URLs, and whether they have been emailed. The developer automates the process using cron jobs and expresses a desire for improvements such as handling empty emails, refining database interactions, and enhancing email content. Despite challenges with database management and ensuring games are not repeatedly emailed, the developer is pleased with the learning experience and the project's functionality, inviting feedback to further improve the solution.
May 19, 2017 1,386 words in the original blog post.
In this guide, Julian and Bob discuss the importance of handling external data in Python, emphasizing the use of various data formats such as CSV, JSON, SQLite, and XML. They provide insights and code examples to facilitate working with these formats, highlighting tools like csv.DictReader for CSV files, json.loads for JSON data, and xml.etree.ElementTree for parsing XML. The authors stress the usefulness of SQLite for managing persistent databases and mention challenges that reinforce learning, such as Code Challenge 19, which involves manipulating APIs and necessitates familiarity with these data formats. Encouraging an interactive approach, they invite readers to engage with the content through coding exercises and community contributions, ultimately fostering a deeper understanding of Python's data handling capabilities.
May 16, 2017 581 words in the original blog post.
Last week, efforts to obtain recommendations from Twitter influencers proved more complex than expected, so the task remains ongoing. However, progress was made with the Goodreads API, as the team managed to authorize a user and retrieve their friends' updates, with plans to filter these updates for books rated 4 or above. The idea of creating a Netflix recommendation system was discussed, though hindered by the absence of a Netflix API and the challenge of filtering relevant tweets from Twitter's free text. The team acknowledges the need for more structured data and machine learning skills to build an effective recommendation engine, and they have identified resources such as a machine learning starter book and a practical guide on recommender systems to aid their learning. Current challenges have no deadlines, and the team plans to revisit them after gaining more knowledge. For this week, a new challenge has been introduced, inviting participants to post to their favorite API, with further details to be announced soon.
May 15, 2017 306 words in the original blog post.
Hi Pythonistas, a new week brings a new Python coding challenge that encourages participants to engage creatively with various APIs by making POST requests to edit their accounts or interact with their favorite services. Unlike previous challenges, this one emphasizes pushing updates or creating content across multiple platforms, such as social media, music, books, movies, or even sending SMS via APIs like Twitter, Spotify, Goodreads, Google, Reddit, and Twilio. Participants are urged to be imaginative and explore APIs, with resources provided to discover more. Detailed instructions are available on how to fork the challenges repository, and participants are encouraged to submit their code via a Pull Request for community review. The challenge aims at enhancing Python skills through creativity without focusing on a single best solution, fostering a learning environment where feedback and future challenge ideas are welcomed.
May 15, 2017 355 words in the original blog post.
The text is a collection of tweets and online resources related to Python programming, highlighting various topics and projects for different skill levels. It includes links to guides on web scraping, reinforcement learning, and creating visualizations with Matplotlib, as well as beginner-friendly projects and tips for submitting pull requests. There are also mentions of Python libraries for command-line interfaces, GPU-accelerated data frames, and recovering lost code in memory. Additionally, the text references Python's integration with external tools like Alexa, the development environment in Visual Studio, and publishing packages on PyPI, along with a post on drowsiness detection using Python and OpenCV.
May 14, 2017 313 words in the original blog post.
A simple Flask application is being developed to manage birthdays independently from Facebook, utilizing Flask-SQLAlchemy to handle data operations. The app involves creating a model to store birthday information, with data parsed from an exported Facebook calendar file and stored uniformly for ease of querying. The application currently features basic routes to display upcoming birthdays within 14 days and birthdays for each month, leveraging datetime objects for efficient querying. Future improvements include implementing notification features, expanding CRUD functionality, and adding a related model to track notifications, with the potential use of Flask-SQLAlchemy's foreign key capabilities. The project serves as a practical example of employing Flask-SQLAlchemy for database interactions and offers resources for further learning about both Flask-SQLAlchemy and standard SQLAlchemy.
May 11, 2017 554 words in the original blog post.
Dante shares his journey of building the "Wisdom of the Ages" app for a PyBites code challenge, emphasizing the importance of learning Python through practical application. He created a website using Flask to display random inspirational quotes along with the authors' biographies from Wikipedia, overcoming challenges like handling malformed JSON from the quotes API and issues with anonymous authors. To enhance the app's appearance, Dante utilized a Bootstrap template, and he experimented with the pywebview module to offer different viewing options, although he ultimately decided against it due to increased complexity. After receiving feedback from PyBites, he refactored the code for better readability, added a feature for refreshing quotes, and implemented error handling for server or connection issues. Dante expresses gratitude for the opportunity to peer-review code and looks forward to future coding challenges.
May 09, 2017 498 words in the original blog post.
In a new Python coding challenge, participants are tasked with creating a simple application, ParrotRead, to parse social media feeds, such as Twitter, for book, movie, or music recommendations. The challenge involves registering a Twitter app, managing API keys securely, and using a virtual environment to install a Twitter API module like Twython or Tweepy. Participants then parse updates from their followers or a set of predefined handles to identify positive recommendations, using tools like TextBlob for sentiment analysis. Optional enhancements include notifying users via tweet or email, integrating the project into a Flask app with user preference input, and employing algorithms like k-means clustering for improved recommendation relevance. The challenge encourages participants to submit their solutions via a Pull Request for community review and emphasizes learning and improving Python skills without focusing on finding the "best" solution.
May 08, 2017 384 words in the original blog post.
The text compiles various tweets and posts related to Python programming, highlighting resources, tutorials, and tools that cater to different aspects of the language and its applications. It includes mentions of a "100 days of algorithms" challenge, generating word clouds, Python coding tips for beginners, and an all-in-one notification library. Additionally, it references machine learning tutorials with scikit-learn, using Python's unittest in IPython, and sending SMS with AWS Lambda and Python 3.6. The text also discusses integrating Google Assistant and Alexa on a Raspberry Pi, Python for trading, the educational potential of modern languages like Python, and the launch of Pythonista Cafe, a peer-to-peer learning community. Various articles and community events, such as a Python pub quiz, are also mentioned, showcasing the vibrant ecosystem and the community's efforts to share knowledge and skills.
May 07, 2017 316 words in the original blog post.
The weekly code challenge "Never Miss a Good Podcast" inspired several creative solutions, resulting in three merged Pull Requests for the Community branch. Participants developed different tools to help users manage and stay updated with podcasts. Clamytoe's "Podcaster" offers a command line interface using SQLAlchemy and click, allowing episode downloads. Cverna created a script for fetching podcast feeds with sqlite3 and feedparser, integrated with OS-level cron jobs. Jhervas developed "Personal Podcast Assistant," which maintains a podcast database and sends email notifications for new episodes, using the schedule module for task automation. The challenge encouraged modular code and testing, and participants are invited to experiment with these projects by pulling from the Community branch. The organizers express enthusiasm for future challenges and invite the community to contribute their own ideas.
May 07, 2017 350 words in the original blog post.
Downloading and saving an XML file, rather than merely parsing it, presents unique challenges, particularly for beginners. The process involves using the `requests` library to retrieve the XML content and save it to a local file while maintaining its original format, including tabs. This is crucial for offline parsing and to avoid repeatedly accessing a web server, which can generate unnecessary traffic. The key technical detail is the use of the binary write mode ('wb') in Python, which allows the entire XML file to be saved in its original state without data loss, a concept that initially confused the author. This approach highlights the importance of minimizing server requests and using local file references for efficient data handling in Python projects.
May 04, 2017 790 words in the original blog post.
A newcomer to Python, Martin shares his journey of developing a simple Flask application as part of a coding challenge, aiming to transform a task manager command-line interface into a web app. Initially, Martin faced unexpected challenges integrating his existing code with Flask and explored resources like Flask's Quickstart guide and Bootstrap's templates to streamline the development process. He utilized tools such as Flask-SQLAlchemy for database management and PyCharm IDE for its useful code completion features, overcoming obstacles with the help of online documentation and forums like Stack Overflow. Despite some setbacks, including difficulties with SQLAlchemy and Python datetime objects, Martin successfully created a Todo Task Manager. This experience reinforced the importance of hands-on coding challenges in learning and mastering Python, and he encourages others to engage in similar activities for practical learning and skill development.
May 02, 2017 1,111 words in the original blog post.
In this Python coding challenge, participants are tasked with creating a system to manage podcast feeds by importing them, storing episodes in an SQLite database, and automating notifications for unplayed episodes. Using libraries such as feedparser and sqlite3, the challenge encourages coders to parse podcast feeds, store data, and send regular email updates about new episodes, while also updating the database to reflect which episodes have been played. Participants are also encouraged to incorporate scheduling through cronjobs or Python libraries like sched or schedule to automate these tasks, and they can earn a bonus by including progress statistics in the emails. The challenge is designed to be open-ended, allowing creativity within a structured framework, and participants can submit their solutions to be featured in a community review.
May 01, 2017 393 words in the original blog post.