Code Challenge 24 - Use Dunder / Special Methods to Enrich a Class

Posted by PyBites on Tue 20 June 2017 in Challenges • Tagged with codechallenges, dunders, special methods, magic methods, classes, polymorphism, operator overloading, guest • 2 min read

Hi Pythonistas, a new week, a new 'bite' of Python coding! We wrote an article for Dan Bader's Python blog: Enriching Your Python Classes With Dunder (Magic, Special) Methods. We hope you like it. To put dunders into practice we dedicate this week's code challenge to it.


Continue reading

Code Challenge 23 - Challenge Estimated Time API - Review

Posted by PyBites on Sun 18 June 2017 in Challenges • Tagged with codechallenges, APIs, Github, PyGithub, PR template, tracking, meta, data, platform • 3 min read

In this article we review last week's Challenge Estimated Time API. This was a cool challenge and we implemented it using Github's awesome platform and API.


Continue reading

Twitter digest 2017 week 24

Posted by PyBites on Sun 18 June 2017 in Digest • Tagged with twitter, news, tips, python, Postgres, JSON, Rest, API, Strings, Docker, Flask, React, AWS, learning, Py, Instagram, data science, charts, NASA, Faker, GitHub, Readme, indentation, data analysis, twilio • 2 min read

Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.


Continue reading

Parsing Twitter Geo Data and Mocking API Calls by Example

Posted by Bob on Sat 17 June 2017 in Learning • Tagged with twitter, API, mock, geo, data, unittest, pickle, tweepy, testing, 100days • 2 min read

"Is this Bob or Julian?!" ... yeah tweeting from our shared @pybites Twitter account can be confusing! So I made a little script to parse the location of our tweets. Then I extended it to make it testable. I wrote a decorator to cache a couple of API outputs to be used with the unittest.mock patch decorator I learned about. A simple script turned into a good learning exercise.


Continue reading

How to Write a Python Subclass

Posted by Julian on Sat 17 June 2017 in Learning • Tagged with learning, code, programming, python, classes, beginners • 5 min read

In this article I cover Python subclasses and inheritance using a relatable code example scenario.


Continue reading

Code Challenge 23 - Challenge Estimated Time API

Posted by PyBites on Tue 13 June 2017 in Challenges • Tagged with codechallenges, APIs, Github, Slack, Flask, tracking, meta, data, platform • 3 min read

Hi Pythonistas, a new week, a new 'bite' of Python coding! This week we will give you the opportunity to enhance our challenge platform by creating a simple API to track how much time our challenges take (and possibly other metadata).


Continue reading

Code Challenge 22 - Packt Free Ebook Web Scraper - Review

Posted by PyBites on Mon 12 June 2017 in Challenges • Tagged with codechallenges, webscraping, BeautifulSoup, Selenium, Packt, Pybonacci, ebooks, community, automation, sponsoring • 3 min read

In this article we review last week's Packt free ebook code challenge. We really scratched our own itch building both a notification service and an ebook download manager.


Continue reading

Twitter digest 2017 week 23

Posted by PyBites on Sun 11 June 2017 in Digest • Tagged with twitter, news, tips, python, Elizabeth, books, packtpub, data analysis, objects, sentiment analysis, VADER, matplotlib, pandas, help, R, machine learning, cli, Django, REST, Pelican, Jinja2, asyncio, learning, coding • 2 min read

Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.


Continue reading

Using Python Requests on a Page Behind a Login

Posted by Julian on Fri 09 June 2017 in Modules • Tagged with requests, code, web scraping, python • 4 min read

In this post I discuss using the requests module on web pages behind a login


Continue reading

Next Time I Will Use Pandas to Parse Html Tables

Posted by Bob on Thu 08 June 2017 in Concepts • Tagged with BeautifulSoup, regex, Pandas, parsing, data, data cleaning, energy, json, csv, html • 2 min read

Last week I did some html table parsing with BeautifulSoup and regex. It turns out there is an easier way to do this: Pandas.


Continue reading