GithubHelp home page GithubHelp logo

microsoft / c9-python-getting-started Goto Github PK

View Code? Open in Web Editor NEW
7.8K 554.0 2.2K 11.67 MB

Sample code for Channel 9 Python for Beginners course

License: MIT License

Python 23.30% Jupyter Notebook 76.70%

c9-python-getting-started's Issues

Pad File numbers with leading zeros

There is no leading zero in the files located in python-for-beginners/Slides now.

  • 10 - file_name
  • 11 - file_name
  • 1 - file _name
  • 2 - file_name

Add leading zeros to sort like:

  • 01 - file_name
  • 02 - file_name
  • 10 - file_name
  • 11 - file_name

No module named"requests" on chapter 37

After I copied the code to my VS and added subscription key, I execute the code, however, it showed the mistake.
Traceback (most recent call last):
File "c:/Autumn_Courses_2019/Python/API/API_json.py", line 6, in
import requests
ModuleNotFoundError: No module named 'requests'

Why it triggered and how to solve it ? Thanks

String formatting code is missing

The code in code_challenge_solution.py and format_strings.py in 4 - String variables in same.
The python code for string formats is missing.
As per the videos the topic was explained and practically executed.

Using URL in Calling APIs

I tried using
image_path = input('URL: ') and

headers = {'Content-Type': 'application/json', 'Ocp-Apim-Subscription-Key': SUBSCRIPTION_KEY}

My intent was to pass on any url of any image from the internet as an input and to display the description of the image. It wouldn't work. OBVIOUSLY. Is it possible to make it work?

Incorrect Comment About `range` Function in python-for-beginners/12 - Loops/number.py

Issue:

The comments in the python-for-beginners/12 - Loops/number.py file contain inaccuracies about the range function in Python.

Details:

In the file number.py, the comment states:

# range creates an array
# First parameter is the starter
# Second indicates the number of numbers to create
# range(0, 2) creates [0, 1]

This is incorrect because:

  1. range does not create an array; it creates a range object.
  2. The second parameter of range specifies the end value (exclusive), not the number of values to create.
  3. range(0, 2) does indeed create [0, 1], but the comment should clarify that the second parameter is the end value, not the count of numbers.

Suggested Correction:

Update the comments in number.py to accurately describe the range function. For example:

# range creates a range object, not an array
# The first parameter is the starting value
# The second parameter is the ending value (not included in the sequence)
# range(0, 2) creates a sequence [0, 1]

File Path:

python-for-beginners/12 - Loops/number.py

Thank you for addressing this issue.

Subscribe key without ****

The subscribe key of susan is listed in 'call api' part without encrypted or replaced by *****. if you leave that on purpose, it's very nice. otherwise, plz deal with it.

SUBSCRIPTION_KEY in 16 - Calling APIs/call_api.py should be in separate config (like .ini) file

i was looking into 16 - Calling APIs/call_api.py. i think SUBSCRIPTION_KEY in 16 - Calling APIs/call_api.py should be in separate config (like .ini) file:

config.ini:

[KEYS]
SUBSCRIPTION_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"

then in call_api.py, we can get the SUBSCRIPTION_KEY from .ini file

import configparser
config = configparser.ConfigParser()
config.read('config.ini')
SUBSCRIPTION_KEY = config['KEYS']['SUBSCRIPTION_KEY']

Wrong file name

The file name is 'get_initails_function.py' which has error in 'initails' and has no consistency in 'function'. Change it to 'get_initials_solution.py'.

error code 401

I have just signed up with azure and created the computer vision service with west europe as end point and used the subscription key provided but i received the folowing error:

{"error": {"code": "401", "message": "Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}

Python OOPs concepts

The videos are awesome. Thank you so much.

Could you please add videos for OOPs concepts in Python as well.

Thank you.

Pad Folder numbers with leading zeros

On github, the folder labels currently sort like:

  • 10 - topic blah
  • 11 - topic blahh
  • 1 - topic beginner
  • 2 - topic other
  • ...

Add zeros to sort like:

  • 01 - topic beginner
  • 02 - topic other
  • ...
  • 10 - topic blah
  • 11 - topic blahh

Add leading zero to single digit folder names

I attempted to create a pull request since this is such a small change, but I was denied access. This is from a cloned repository.

My attempt to push: git push --set-upstream origin rename-folders
My push error is repeated here:

remote: Permission to microsoft/c9-python-getting-started.git denied to sweenish.
fatal: unable to access 'https://github.com/microsoft/c9-python-getting-started.git/': The requested URL returned error: 403

I am able to clone and push to my own GitHub repositories without issues.

Code doesn't work in more-python-for-beginners/01-Formatting and Linting

I've tried good.py both by python2 and python3, but it didn't work. Also, I've failed to understand why these codes are examples for formatting.... I've searched on google about formatting but it was about formatting strings in operators, braces or f-strings, which are not quite related to these codes.

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.