Home / Companies / Pybites / Blog / August 2017

August 2017 Summaries

19 posts from Pybites

Filter
Month: Year:
Post Summaries Back to Blog
Better Code Hub (BCH), developed by the Software Improvement Group, is an integrated tool for GitHub users that evaluates code maintainability based on ten guidelines outlined in the "Building Maintainable Software" book. It supports 16 programming languages and can assess code quality with each push or pull request, identifying refactoring opportunities. The platform provides a "Definition of Done" for code quality, ensuring compliance with industry benchmarks derived from extensive analysis of over 8 billion lines of code. BCH offers a user-friendly experience with zero setup time, allowing developers to easily analyze their repositories and receive actionable feedback on code improvements. The article shares a practical example of using BCH in a Python project, illustrating how the tool's guidance facilitated significant refactoring and improved maintainability. Emphasizing the importance of software design principles over specific frameworks or APIs, it encourages continuous learning and improvement in coding practices while expressing gratitude for the insights and resources provided by the Software Improvement Group.
Aug 30, 2017 1,093 words in the original blog post.
A new Python programming challenge encourages participants to build a simple API using the Django REST Framework (DRF), emphasizing hands-on learning as an effective method for mastering new technologies. Participants are encouraged to draw inspiration from previous projects, such as creating a House Inventory Tracker API or a Deep Work Logger, and are invited to adapt these or develop new ideas into functional APIs. The challenge highlights the importance of deploying projects to platforms like Heroku and ensuring good test coverage and proper authentication. A variety of resources are provided to assist in getting started, including tutorials and guides from Django REST Framework's home page and Real Python. Participants are motivated to share their work with the community, with the prospect of having their projects featured in the #100DaysOfDjango project on the PyBites platform. The challenge also invites feedback and ideas for future challenges, fostering a collaborative and continuous learning environment.
Aug 29, 2017 559 words in the original blog post.
The article provides an overview of the previous week's "Build a Django Tracker, Weather, or Review App" code challenge, highlighting the community-driven approach where participants submit their projects to a shared branch. A notable submission is by bbelderbos, who is migrating a PHP/MySQL application to Python/Django/Heroku/Postgres, with enhancements such as responsive design and social login integration, and plans to add book queues and reviews. The app is available on Heroku for public viewing. The article encourages continued participation and promises updates with more submissions, while also promoting an upcoming challenge, maintaining a motivational tone to engage the coding community.
Aug 28, 2017 138 words in the original blog post.
In a series of tweets, various Python-related updates and resources are shared, celebrating milestones like PyBites reaching 1,000 followers and offering insightful content such as serverless deployment of Python APIs by Miguel Grinberg. Regular expression tips, JupyterCon talks, and methods for checking anagrams using Python are also highlighted. Other resources include a list of interesting open-source Python projects, survey data on open source communities, and educational courses like MongoDB for Python Developers. Additionally, there are discussions on analyzing cryptocurrency markets using Python, a podcast interview with CPython core developer Mariatta, and a humorous take on the semantics of tabs and spaces in coding. The tweets also pay tribute to Katherine Johnson on her 99th birthday, recognizing her contributions to space exploration.
Aug 27, 2017 329 words in the original blog post.
In this week’s #100DaysOfDjango challenge, Python enthusiasts are invited to enhance their Django skills by building various web applications, focusing on CRUD operations and database integration. Participants can choose to develop an app for tracking activities such as Pomodori reading segments, convert a Flask-based Weather Compare App into Django with additional features, or create a book/movie review platform or a code review tool with roles for participants, reviewers, and admins, possibly integrating the GitHub API. The initiative encourages creativity and offers the chance to be featured under the #100DaysOfDjango project, with completed apps eligible for deployment on Heroku. Participants are urged to share their projects via Pull Requests to the community branch, with standout contributions highlighted in weekly reviews, emphasizing learning and improving Python skills without seeking a perfect solution.
Aug 22, 2017 453 words in the original blog post.
Last week's code challenge focused on testing a simple Django app using Selenium, with participants submitting their work to the Community branch under Challenge 32. Bob Belderbos shared his experience in submitting test_pybites_pyplanet.py, noting that the detailed steps and screenshots were helpful in writing effective tests and that consulting the documentation was beneficial, although more exploration is possible. Bob also mentioned using Selenium for automating banner image generation, which was discussed in a previous article. There is no deadline for these challenges, and updates will be provided as more submissions are received. The article encourages participants to follow the instructions and continue coding, emphasizing the community's ongoing engagement with Python challenges.
Aug 21, 2017 130 words in the original blog post.
In the third part of the PyBites Banner Generator article series, the author demonstrates how to automate banner generation using Python libraries Requests and Selenium, with a command-line interface built using Click. The tutorial, with code available on GitHub, explores posting data to a webpage using Requests to generate a banner and retrieve the image by writing the request content to a file. For a more secure approach requiring login, Selenium and the selenium-requests package are employed to handle cookies and request headers, enabling banner creation on a site with restricted access. The code also showcases how to build robust CLI interfaces with Click, offering options for user credentials and banner customization. The article emphasizes the usefulness of these tools in automating tasks and enhancing Python projects, encouraging readers to further explore the featured modules.
Aug 20, 2017 717 words in the original blog post.
The text consists of a series of tweets from various users and organizations discussing a range of topics primarily related to Python programming and technology. Highlights include a recommendation of an article on the cached_property decorator, Docker tips, discussions about Python deep learning libraries such as Nnabla from Sony, and opinions on using PyTorch versus TensorFlow. There are also mentions of tools and techniques for improving Python programming efficiency, such as IPython magic commands, Jupyter Notebook shortcuts, and a guide to reducing memory usage with Pandas. Additionally, the tweets cover various Python-related resources and projects, including a fast Markdown parser called mistletoe and a Python API for developing chatbots on Facebook Messenger.
Aug 20, 2017 332 words in the original blog post.
The article describes the process of integrating a previous Pillow script, banner.py, into a Flask app to create a PyBites Banner Generator, which is hosted on Heroku and available on GitHub for customization. Users can generate banners by providing a name, background URL, and text, with options to use specific logos when logged in. The app employs Pillow for image manipulation, Flask-WTF for form handling, and Flask-SQLAlchemy to store image parameters, while addressing Heroku's ephemeral filesystem by using PostgreSQL for persistent data storage. The core functionality is managed within a Python script, app.py, which handles form submissions, image generation, and caching, with the final output sent to the browser using Flask's send_file function. The article also invites readers to participate in the related Code Challenge, provides guidance on when to use Flask versus Django, and references additional resources for further exploration.
Aug 19, 2017 862 words in the original blog post.
The text explores the author's journey of learning Django after having become familiar with Flask, highlighting the contrasts between these two popular Python web frameworks. It discusses the ease of starting with Flask due to its minimalistic nature, which allows for quick setup and immediate coding, compared to Django's more complex initial setup that offers comprehensive documentation and built-in functionalities. The author appreciates Flask for its simplicity and suitability for quick, small-scale applications but recognizes Django's strength in building larger, scalable projects due to its extensive features and scalability. Despite initial struggles with Django's complexity, the author acknowledges its popularity and potential, concluding that choosing the right framework depends on the project's requirements and emphasizing the importance of continuous learning and practice in mastering both frameworks.
Aug 16, 2017 962 words in the original blog post.
In this Python-focused challenge, participants are invited to enhance their web development and testing skills using Selenium by testing a Django app, specifically the 100DaysOfDjango home page. The task involves verifying various elements, such as checking for specific headers, links, and buttons, and interacting with the app to ensure functionality like logging in, navigating pages, and testing dynamic content. Participants have the option to test using a guest login or clone the repository for more advanced testing with superuser rights, allowing them to perform additional actions like marking articles as skipped or shared. The challenge encourages exploration and learning through practical application and offers resources on Selenium testing, with an emphasis on continuous learning and community engagement through submission of Pull Requests. Feedback and suggestions for future challenges are welcomed, reinforcing the idea that the process of learning Python is ongoing and collaborative.
Aug 15, 2017 702 words in the original blog post.
Last week's Image Manipulation With Pillow code challenge featured impressive submissions, including bbelderbos's PyBites Banner Generator, which streamlines the creation of banners for PyBites content, and clamytoe's Thumbler, a proof-of-concept script using OpenCV to extract faces as thumbnails from images. The Banner Generator was developed to replace the cumbersome manual process of using Gimp, allowing quick banner creation and inspiring two articles on Pillow and Flask. Thumbler initially aimed to employ machine learning for face detection but used OpenCV due to time constraints and grouped extracted faces by image. The challenge encourages ongoing participation with no deadlines, promising updates as new submissions arrive and teasing the next challenge for followers to engage in continued Python coding exploration.
Aug 14, 2017 252 words in the original blog post.
A diverse collection of tweets highlights various tutorials, projects, and tips related to technology and programming, featuring Docker, SQL, Python, and data handling. Among the topics are tutorials for using Docker with different tools, a brief history of women in computing, tips on writing better SQL queries, and handling data with Pandas. Additionally, the tweets discuss Python-related projects such as a web scraper for baseball scores, visualizing data missingness, writing container daemons, and hacking Nintendo games. The tweets also mention open-source projects for Python applications and replacing shell scripts with Python, illustrating the vibrant and collaborative nature of the tech community.
Aug 13, 2017 321 words in the original blog post.
The article explores using Pillow, a Python Imaging Library fork, to create a simple promotional banner by placing images and text on a canvas, specifically for PyBites Code Challenges. It guides readers through setting up a virtual environment, installing Pillow, and downloading images, followed by creating a canvas and placing the PyBites challenges logo and Pillow logo onto it. The logos are positioned using calculated offsets, and the text is added using ImageDraw and ImageFont with a specified font and size. The author refactors the code to make it reusable, introduces a command-line interface, and explains using named tuples for cleaner code. The article concludes with a preview of future parts, where the project will be expanded into a Flask web app and automated using Requests and Selenium, encouraging readers to experiment with image manipulation in Python.
Aug 11, 2017 1,060 words in the original blog post.
In a Python coding challenge, participants are encouraged to explore image manipulation tasks using the Pillow library, a fork of the Python Imaging Library (PIL). The challenge includes options such as creating image thumbnails, applying Instagram-like filters, designing promotional banners, generating birthday e-cards, and adding watermarks. Participants are also invited to expand their creativity by wrapping their utilities into a Flask app for enhanced user interaction, enabling functionalities like batch image resizing or creating interactive e-card generators with download options. The challenge encourages deployment of solutions to Heroku and sharing the URL via a Pull Request for community feedback and highlights. Resources and guidelines are provided to assist in project execution, and participants are reminded that there is no single best solution, highlighting the emphasis on learning and improving Python skills through creativity and practice.
Aug 08, 2017 462 words in the original blog post.
The article provides a recap of the recent code challenge, "The Art of Refactoring: Improve Your Code," highlighting submissions from participants who refactored various projects. Notable contributions include bbelderbos's work on PyBites’ Slack Karma Bot, where he applied unittest mocking and used SIG’s BetterCodeHub, hobojoe1848's nostalgic revisit of his first script, a "Troubleshooting Wheel of Fortune," and mjhea0's update of a Flask route handler related to a Flask JWT Auth project, which also prompted a blog post update. The article encourages ongoing participation in these challenges, promising future opportunities to refine coding skills without strict deadlines, and invites readers to stay engaged for upcoming challenges.
Aug 07, 2017 265 words in the original blog post.
A collection of tweets highlights various tech-related topics, including improving Docker skills through a digital classroom, exploring Selenium's new headless mode in Chrome, and utilizing comments within regular expressions. It also covers creating SMS-to-email forwarding without a server using Node.js, SendGrid, and Twilio Functions, calculating disk space usage via command line, and praises the PyCon Australia AV team. The tweets discuss the popularity of Python among astronomers, offer a git debugging flowchart, advise against using the 'apply' function in Pandas, and describe the %%HTML magic command in Jupyter notebooks. Additionally, they mention a talk on writing a container daemon in Python, the integration of the Better Code Hub tool into GitHub Marketplace, the use of Nginx as a web server for Python apps, and a humorous GoT-themed Python video.
Aug 06, 2017 355 words in the original blog post.
The article provides a comprehensive guide on setting up a two-phase registration system using Django, the Django-registration plugin, and Gmail for messaging, and then deploying the app to Heroku. It begins with creating a virtual environment and installing necessary packages, followed by configuring Django settings, including environment variables, templates, and database connections for both local and production environments. The author highlights the importance of setting up static files and logging for Heroku deployment, and offers insights on using Gmail for email notifications while recommending alternatives like SendGrid for better security. The tutorial emphasizes reusability, offering a step-by-step approach to coding minimal functionality due to the abstraction provided by Django-registration, and concludes with instructions on deploying the app to Heroku, managing environment variables, and committing the project to version control. The author reflects on the challenges and learning experiences encountered during the process, encouraging readers to explore Django's capabilities and offering to rectify any issues through future articles.
Aug 04, 2017 2,837 words in the original blog post.
This week's Python coding challenge focuses on honing refactoring skills, encouraging participants to improve their code by identifying areas for enhancement and writing tests to ensure functionality remains intact. Participants are advised to use version control and make incremental improvements, submitting a Pull Request (PR) for review with an emphasis on PEP8 compliance. To support the challenge, various resources are suggested, including articles, books, and tools on refactoring, idiomatic Python, and maintaining clean code. An upcoming part II will provide PyBites scripts for additional practice, and participants are encouraged to contribute ideas or report issues via GitHub. The initiative emphasizes continuous learning and improvement in Python coding practices.
Aug 01, 2017 415 words in the original blog post.