-
Install the ipykernel in your virtual environment:
pipenv install ipykernel
-
Start shell with:
pipenv shell
-
Set name so Atom Hydrogen can recognize:
pipenv run python -m ipykernel install --user --name=name-of-kernel
-
Start Atom (from within pipenv shell) and when you run code (control-enter), Atom should list python kernels to use (including
name-of-kernel
)
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install scipy
the last word is the name of the module to install
You can use %%capture
Jupyter notebook's magic command to catch output of cell and then paste it to your text file with
with open('output.txt', 'w') as out:
out.write(cap.stdout)
if you want to cell code to specific file for example.txt you can use magic function %%writefile
%%writefile example.txt
ab = 'This is code'
a = 5
print(a+ 2)
Also if you want to append to file you must use -a
parameter
-
How_to_get_started_coding_in_Python?, this notebook explains how to become a good python programmer, by Tanu Nanda Prabhu, author and editor at Towards data science
-
Python Strings from Scratch !!!, this notebook explains Python Strings from basic to advance level, by Tanu Nanda Prabhu
-
Python Tuples from Scratch !!!, this notebook explains Python Tuples from basic to advance level, by Tanu Nanda Prabhu
-
Python Dictionary from Scratch !!!, this notebook explains Python Dictionary from basic to advance level, by Tanu Nanda Prabhu
-
Python Lists from Scratch !!!, this notebook explains Python Lists from basic to advance level with the help of an example, by Tanu Nanda Prabhu.
-
Learning to code with Python, part of an introduction to Python from the Waterloo Python users group.
-
Introduction to Python for Data Scientists by Steve Phelps (part of a larger collection on Data Science and Big Data).
-
Python Descriptors Demystified, an in-depth discussion of the descriptor protocol in Python, by Chris Beaumont.
-
A collection of not so obvious Python stuff you should know!, by Sebastian Raschka.
-
Key differences between Python 2.7.x and Python 3.x, by Sebastian Raschka.
-
A beginner's guide to Python's namespaces, scope resolution, and the LEGB rule, by Sebastian Raschka.
-
Sorting CSV files using the Python csv module, by Sebastian Raschka.
-
Python 3 OOP series by Leonardo Giordani: Part 1: Objects and types, Part 2: Classes and members, Part 3: Delegation - composition and inheritance, Part 4: Polymorphism, Part 5: Metaclasses, Part 6: Abstract Base Classes
-
How to Aggregate Subscriber's Interest using the 3 methods: (1) Python Dictionary, (2) Apache PySpark - GroupBy Transformation, and (3) Apache PySpark - ReduceBy Transformation by Abbas Taher.