GithubHelp home page GithubHelp logo

allendowney / dsirp Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 49.0 9.49 MB

Data Structures and Information Retrieval in Python

Home Page: https://allendowney.github.io/DSIRP/

License: MIT License

Python 0.84% Jupyter Notebook 98.83% Shell 0.19% Makefile 0.14%

dsirp's People

Contributors

aiyer-commits avatar allendowney avatar lzblack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsirp's Issues

Index Problem

where it says, "element = soup.contents[0]" it should say "element = soup.contents[1]" so that it goes to the Tag element and not the NavigableString element

IndexError when generating links from Wikipedia page that contains half-open intervals (i.e. [0, b))

In chapter Getting to Philosophy, when function link_generator is called with soup based on Python's Wikipedia Page, an error, IndexError: pop from empty list, will be detected while executing the following block:

            for char in element.string:
                if char == '(':
                    paren_stack.append(char)
                if char == ')':
                    paren_stack.pop()

It is simply because the web page contains half-open intervals (i.e. [0, b) as shown below), and ')' is detected when there is no '(' in paren_stack.

image

It can be ignored by checking if paren_stack is empty first, but the other type of half-open interval - (b, 0] (which is in the same sentence) - would cause another trouble: all the text after (b, 0] would be considered as inside parentheses. Maybe just start with another page instead of Python, for demonstration purpose?

I would love to see if you have any solution to this issue. Thanks.

Typo on Testing Order of Growth Page

Thanks for all your work, enjoying the material.

I think there is a typo on Testing Order of Growth Page
'''
We’ll handle it by running over a wide range of problem sizes, hoping to sizes that run long enough to measure, but not more than a few seconds.
'''
Is hoping supposed to be hopping?

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.