Comments (3)
Almost correct, in fact demo2.py
shouldn't print sys.argv
but b
. Please submit a pull-request.
from scientific-python-lectures.
I see that you're pulling in demo2.py
with .. literalinclude:: demo2.py
, and demo2.py
correctly defines print_b()
:
# print_b() runs on import
print_b()
The demo2.py
in the rendered guide does not match the demo2.py
of the repo:
import sys
def print_a():
"Prints a."
print 'a'
print sys.argv
if __name__ == '__main__':
print_a()
vs.
def print_b():
"Prints b."
print 'b'
def print_a():
"Prints a."
print 'a'
# print_b() runs on import
print_b()
if __name__ == '__main__':
# print_a() is only executed when the module is run directly.
print_a()
There's nothing to correct in the fork. Maybe GitHub just needs to rerender the guide?
from scientific-python-lectures.
Thanks for investigating, looks like it is time for a new release afterall.
from scientific-python-lectures.
Related Issues (20)
- Section labels mismatch HOT 1
- Replace Boston housing example with California housing example or Ames housing example HOT 9
- fatal: Ambiguous object name: 'HEAD' HOT 2
- CSS and matplotlib issues HOT 10
- Duplicate header The eigenfaces example: chaining PCA and SVMs HOT 2
- Replace Measuring Decision Tree performance example
- Revisit scikit-image io section
- Hosting HOT 4
- Revisit javascript
- Update cover image HOT 1
- Tips styling
- Figure placement HOT 1
- Review test target
- Argsort -> argmin HOT 2
- np.core.umath_tests HOT 1
- Exact p-value calculation does not work if there are zeros. HOT 3
- How should we handle this syntax warning?
- Remaining Python 2 cruft
- Building source in Windows HOT 2
- Fix redirects HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scientific-python-lectures.