Code Snippets enable you to securely upload reusable blocks of code to Anaconda.com. You can then share your snippets with other users, access your snippets in Excel, and insert your snippets across notebooks.Anaconda maintains a Jupyter notebook that includes example code snippets you can modify and add to your own projects:
Click Create a New Code Snippet in the cell toolbar.
Enter a name for your code snippet.
Select a project to house your snippet.
If you don’t have any projects, a new project with the code snippet name as the title will be created.
Click Create Code Snippet.
A new .py file with the code snippet’s name appears in the project and is ready to be used across your notebooks. Save the project by pushing your project to Anaconda.com to share your snippets across devices and software.
To edit a snippet, you must make changes to the snippet directly in the Anaconda Toolbox extension.
Open Anaconda Toolbox.
Under Code Snippets, select Manage Code Snippets. Alternatively, under Projects, select Manage Projects.
Double-click the snippet’s .py file to open the file.
Adjust your snippet.
To save your file changes, go to File, then select Save Python File.
You can now use your updated snippet across your notebooks. However, you’ll need to push the associated project to make the changes available in Anaconda.com.