Skip to content

icemanreddy/challenges

This branch is 1 commit ahead of, 67 commits behind pybites/challenges:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

69bcd62 · Dec 3, 2017
Mar 13, 2017
Mar 13, 2017
Mar 13, 2017
Jul 24, 2017
Jul 24, 2017
Mar 13, 2017
Mar 13, 2017
Mar 13, 2017
Mar 13, 2017
Mar 13, 2017
Mar 26, 2017
Mar 26, 2017
Apr 2, 2017
Apr 10, 2017
Apr 17, 2017
Apr 23, 2017
May 1, 2017
May 8, 2017
May 15, 2017
May 22, 2017
May 29, 2017
Jun 4, 2017
Jun 13, 2017
Jun 20, 2017
Jun 26, 2017
Jul 8, 2017
Jul 11, 2017
Jul 18, 2017
Jul 23, 2017
Aug 1, 2017
Aug 8, 2017
Aug 15, 2017
Aug 22, 2017
Aug 29, 2017
Sep 5, 2017
Nov 1, 2017
Nov 1, 2017
Nov 1, 2017
Nov 1, 2017
Nov 1, 2017
Nov 1, 2017
Nov 3, 2017
Nov 9, 2017
Nov 9, 2017
Oct 3, 2017
Apr 23, 2017
Apr 17, 2017
Apr 17, 2017
Apr 17, 2017
Jul 31, 2017
Dec 3, 2017
May 2, 2017
Aug 22, 2017
May 2, 2017

Repository files navigation

PyBites Code Challenges

Every Tuesday we release a new code challenge. Next Monday we publish submissions that have been PR'd.

Follow these instructions to get coding.

To receive a weekly email notification subscribe here.

Remember, we don't strive for the 'best' solution, it's not a competition. Learning more + better Python is the main objective. Respect the newbie.

We believe solving code challenges is a very effective way to achieve this. Good luck and have fun!

PyBites Challenges banner image


Keep Calm and Code in Python!

Bob and Julian @ PyBites

To follow along with our challenges

I. First time around

  • Make your own fork of our challenges repo: use the Fork button at the top right of the page.

  • Clone your copy:

      $ git clone https://github.com/<your_user>/challenges
    

II. You already cloned your fork

  • In this case you need to sync our new challenge(s), in your fork directory:

      # assuming using ssh key
      $ git remote add upstream [email protected]:pybites/challenges.git
      $ git fetch upstream
    
      # if not on master:
      $ git checkout master
      $ git merge upstream/master
      # at this point you are asked to commit the merge
    
  • Have fun :)

      $ cd <challenge-number>
      # create new file or if template file provided: edit <template>.py 
    

III. Submit your code to our community branch via a Pull Request (PR)

This is still a bit of an experimental feature. We will update it as we go. If there is an easier way please let us know ...

  • Work on community branch and get into sync. In your forked repo:

      $ git checkout community (might need -b the first time)
    
  • Make sure you got the latest changes from PyBites:

      $ git pull upstream community
    
  • From your local community branch Open a new branch, we use PCC<challenge_num> here as convention (PyBites Code Challenge)

      $ git checkout -b PCC14
    
  • Add your code

      $ cd <challenge_number>
      $ mkdir <GH-username>
      $ add files ...
      
      e.g.
      $ cd 14
      $ mkdir bbelderbos && cd $_
      $ vi some_script.py
      ...
    
  • Commit your changes:

      $ git add .
      $ git commit -m "PCC14 bbelderbos"
    
  • Push this local branch to your forked repo (origin is default remote after fork + clone):

      $ git push origin PCC14
    
  • Go to your cloned repo and open a PR by comparing pybites community branch with your newly pushed local branch (make sure only the files of your changes are included):

    • Your push should create this link on your fork's main page:

      step 1

    • When you click it make sure you compare base fork: pybites/challenges - base: community with head fork: /challenges - compare: :

      step 2

    • Make sure you only PR on the files you change, in this example I had 2 files in my new 'bbelderbos' dir:

      step 3

The difficult part here was isolating the changes. We think that if you do the "git pull upstream community" into your local community branch, as described above, you should see only your changes, but we have to do some more testing. Please let us know how this goes ...

Finally we will check your code, merge it into our community branch, and feature it in our end-of-the-week review post.

IV. Optional - Detaching the fork

  • One small issue with working with a forked repo is that Github wont actually recognize any of your activity. If you want to see your activity follow these steps. However be warned that it will prevent you from creating pull-requests.
  1. On Github go to the settings page of your forked repo.

  2. In the Danger Zone click on the Delete this repository button.

  3. Type the full name of the repo in the box and click the button.

  4. Create a new repo with the same name as the original repo.

  5. Push the repo to Github

     $ git push origin master
    

Feedback

  • If you want to share your solution, please use the comments of our review posts.

  • If you have ideas for new challenges or issues with existing ones, please use the issues page.


Remember: there is no best solution, only learning more/ better Python. We're looking forward reviewing our and your solutions. Good luck and have fun!

Keep Calm and Code in Python!

-- Bob and Julian

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.8%
  • HTML 27.6%
  • CSS 0.6%