Giter VIP home page Giter VIP logo

Comments (2)

egabe05 avatar egabe05 commented on July 17, 2024

Couldn't get the entire block of code to formate correctly(for statement should be in the code block) but I think it still makes sense.

from pcc.

ehmatthes avatar ehmatthes commented on July 17, 2024

Have you seen the updates section in the online resources? There's an update for this issue here.

You and I came up with similar approaches. Here's what I wrote for the update:

names, plot_dicts = [], []
for repo_dict in repo_dicts:
    names.append(repo_dict['name'])

    # Some projects lack a description, which causes an error when 
    #  labeling bars. Specify a label if there's no description.
    description = repo_dict['description']
    if not description:
        description = "No description provided."

    plot_dict = {
        'value': repo_dict['stargazers_count'],
        'label': description,
        }
    plot_dicts.append(plot_dict)

We pull the description from the repo_dict, and then change the description if none is provided. We don't change the repo_dict itself. Same result though, so nice work troubleshooting!

Couldn't get the entire block of code to formate correctly(for statement should be in the code block) but I think it still makes sense.

You can start a code block with triple backticks followed by python, and close the code block with another set of triple backticks. This formats your code with python syntax highlighting. I edited the formatting of your code block with this style.

from pcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.