Royce  Reinger

Royce Reinger

1675657760

Jupyter-text2code: Text2Code for Jupyter Notebook

Text2Code for Jupyter notebook

A proof-of-concept jupyter extension which converts english queries into relevant python code.

jupyter-text2code-demo.gif

Supported Operating Systems:

  • Ubuntu
  • macOS

Installation

NOTE: We have renamed the plugin from mopp to jupyter-text2code. Uninstall mopp before installing new jupyter-text2code version.

pip uninstall mopp

CPU-only install:

For Mac and other Ubuntu installations not having a nvidia GPU, we need to explicitly set an environment variable at time of install.

export JUPYTER_TEXT2CODE_MODE="cpu"

GPU install dependencies:

sudo apt-get install libopenblas-dev libomp-dev

Installation commands:

git clone https://github.com/deepklarity/jupyter-text2code.git
cd jupyter-text2code
pip install .
jupyter nbextension enable jupyter-text2code/main

Uninstallation:

pip uninstall jupyter-text2code

Usage Instructions:

  • Start Jupyter notebook server by running the following command: jupyter notebook
  • If you don't see Nbextensions tab in Jupyter notebook run the following command:jupyter contrib nbextension install --user
  • You can open the sample notebooks/ctds.ipynb notebook for testing
  • If installation happened successfully, then for the first time, Universal Sentence Encoder model will be downloaded from tensorflow_hub
  • Click on the Terminal Icon which appears on the menu (to activate the extension)
  • Type "help" to see a list of currently supported commands in the repo
  • Watch Demo video for some examples

Docker containers for jupyter-text2code (old version)

We have published CPU and GPU images to docker hub with all dependencies pre-installed.

Visit https://hub.docker.com/r/deepklarity/jupyter-text2code/ to download the images and usage instructions.

CPU image size: 1.51 GB

GPU image size: 2.56 GB

Model training:

The plugin now supports pandas commands + quick snippet insertion of available snippets from awesome-notebooks. With this change, we can now get snippets for most popular integrations from within the jupyter tab. eg:

  • Get followers count from twitter
  • Get stats about a story from instagram The detailed training steps are available in scripts README where we also evaluated performance of different models and ended up selecting SentenceTransformers paraphrase-MiniLM-L6-v2

Steps to add more intents:

  • Add more templates in ner_templates with a new intent_id
  • Generate training data. Modify generate_training_data.py if different generation techniques are needed or if introducing a new entity.
  • Train intent index
  • Train NER model
  • modify jupyter_text2code/jupyter_text2code_serverextension/__init__.py with new intent's condition and add actual code for the intent
  • Reinstall plugin by running: pip install .

TODO:

  •  Publish Docker image
  •  Refactor code and make it mode modular, remove duplicate code, etc
  •  Add support for more commands
  •  Improve intent detection and NER
  •  Add support for Windows
  •  Explore sentence Paraphrasing to generate higher-quality training data
  •  Gather real-world variable names, library names as opposed to randomly generating them
  •  Try NER with a transformer-based model
  •  With enough data, train a language model to directly do English->code like GPT-3 does, instead of having separate stages in the pipeline
  •  Create a survey to collect linguistic data
  •  Add Speech2Code support

Blog post with more details:

Data analysis made easy: Text2Code for Jupyter notebook

Demo Video:

Text2Code for Jupyter notebook


Download Details:

Author: Deepklarity
Source Code: https://github.com/deepklarity/jupyter-text2code 
License: MIT license

#machinelearning #python #jupyter #notebook 

What is GEEK

Buddha Community

 Jupyter-text2code: Text2Code for Jupyter Notebook

Rodrigo Senra - Jupyter Notebooks

Nosso convidado de hoje é diretor técnico na Work & Co, PhD em Ciências da Computação, já contribuiu com inúmeros projetos open source em Python, ajudou a fundar a Associação Python Brasil e já foi premiado com o Prêmio Dorneles Tremea por contribuições para a comunidade Python Brasil.

#alexandre oliva #anaconda #apache zeppelin #associação python brasil #azure notebooks #beakerx #binder #c++ #closure #colaboratory #donald knuth #fernando pérez #fortran #graphql #guido van rossum #ipython #java #javascript #json #jupyter kenels #jupyter notebooks #jupyterhub #jupyterlab #latex #lisp #literate programming #lua #matlab #perl #cinerdia #prêmio dorneles tremea #python #r #rodrigo senra #scala #spark notebook #tcl #typescript #zope

Royce  Reinger

Royce Reinger

1675657760

Jupyter-text2code: Text2Code for Jupyter Notebook

Text2Code for Jupyter notebook

A proof-of-concept jupyter extension which converts english queries into relevant python code.

jupyter-text2code-demo.gif

Supported Operating Systems:

  • Ubuntu
  • macOS

Installation

NOTE: We have renamed the plugin from mopp to jupyter-text2code. Uninstall mopp before installing new jupyter-text2code version.

pip uninstall mopp

CPU-only install:

For Mac and other Ubuntu installations not having a nvidia GPU, we need to explicitly set an environment variable at time of install.

export JUPYTER_TEXT2CODE_MODE="cpu"

GPU install dependencies:

sudo apt-get install libopenblas-dev libomp-dev

Installation commands:

git clone https://github.com/deepklarity/jupyter-text2code.git
cd jupyter-text2code
pip install .
jupyter nbextension enable jupyter-text2code/main

Uninstallation:

pip uninstall jupyter-text2code

Usage Instructions:

  • Start Jupyter notebook server by running the following command: jupyter notebook
  • If you don't see Nbextensions tab in Jupyter notebook run the following command:jupyter contrib nbextension install --user
  • You can open the sample notebooks/ctds.ipynb notebook for testing
  • If installation happened successfully, then for the first time, Universal Sentence Encoder model will be downloaded from tensorflow_hub
  • Click on the Terminal Icon which appears on the menu (to activate the extension)
  • Type "help" to see a list of currently supported commands in the repo
  • Watch Demo video for some examples

Docker containers for jupyter-text2code (old version)

We have published CPU and GPU images to docker hub with all dependencies pre-installed.

Visit https://hub.docker.com/r/deepklarity/jupyter-text2code/ to download the images and usage instructions.

CPU image size: 1.51 GB

GPU image size: 2.56 GB

Model training:

The plugin now supports pandas commands + quick snippet insertion of available snippets from awesome-notebooks. With this change, we can now get snippets for most popular integrations from within the jupyter tab. eg:

  • Get followers count from twitter
  • Get stats about a story from instagram The detailed training steps are available in scripts README where we also evaluated performance of different models and ended up selecting SentenceTransformers paraphrase-MiniLM-L6-v2

Steps to add more intents:

  • Add more templates in ner_templates with a new intent_id
  • Generate training data. Modify generate_training_data.py if different generation techniques are needed or if introducing a new entity.
  • Train intent index
  • Train NER model
  • modify jupyter_text2code/jupyter_text2code_serverextension/__init__.py with new intent's condition and add actual code for the intent
  • Reinstall plugin by running: pip install .

TODO:

  •  Publish Docker image
  •  Refactor code and make it mode modular, remove duplicate code, etc
  •  Add support for more commands
  •  Improve intent detection and NER
  •  Add support for Windows
  •  Explore sentence Paraphrasing to generate higher-quality training data
  •  Gather real-world variable names, library names as opposed to randomly generating them
  •  Try NER with a transformer-based model
  •  With enough data, train a language model to directly do English->code like GPT-3 does, instead of having separate stages in the pipeline
  •  Create a survey to collect linguistic data
  •  Add Speech2Code support

Blog post with more details:

Data analysis made easy: Text2Code for Jupyter notebook

Demo Video:

Text2Code for Jupyter notebook


Download Details:

Author: Deepklarity
Source Code: https://github.com/deepklarity/jupyter-text2code 
License: MIT license

#machinelearning #python #jupyter #notebook 

Notebook: Jupyter interactive Notebook

Jupyter Notebook

The Jupyter notebook is a web-based notebook environment for interactive computing.

Jupyter notebook example

Maintained versions

We maintain the two most recently released major versions of Jupyter Notebook, Notebook v5 and Classic Notebook v6. After Notebook v7.0 is released, we will no longer maintain Notebook v5. All Notebook v5 users are strongly advised to upgrade to Classic Notebook v6 as soon as possible.

The Jupyter Notebook project is currently undertaking a transition to a more modern code base built from the ground-up using JupyterLab components and extensions.

There is new stream of work which was submitted and then accepted as a Jupyter Enhancement Proposal (JEP) as part of the next version (v7): https://jupyter.org/enhancement-proposals/79-notebook-v7/notebook-v7.html

There is also a plan to continue maintaining Notebook v6 with bug and security fixes only, to ease the transition to Notebook v7: https://github.com/jupyter/notebook-team-compass/issues/5#issuecomment-1085254000

Notebook v7

The next major version of Notebook will be based on:

  • JupyterLab components for the frontend
  • Jupyter Server for the Python server

This represents a significant change to the jupyter/notebook code base.

To learn more about Notebook v7: https://jupyter.org/enhancement-proposals/79-notebook-v7/notebook-v7.html

Classic Notebook v6

Maintainance and security-related issues are now being addressed in the 6.4.x branch.

A 6.5.x branch will be soon created and will depend on nbclassic for the HTML/JavaScript/CSS assets.

New features and continuous improvement is now focused on Notebook v7 (see section above).

If you have an open pull request with a new feature or if you were planning to open one, we encourage switching over to the Jupyter Server and JupyterLab architecture, and distribute it as a server extension and / or JupyterLab prebuilt extension. That way your new feature will also be compatible with the new Notebook v7.

Jupyter notebook, the language-agnostic evolution of IPython notebook

Jupyter notebook is a language-agnostic HTML notebook application for Project Jupyter. In 2015, Jupyter notebook was released as a part of The Big Split™ of the IPython codebase. IPython 3 was the last major monolithic release containing both language-agnostic code, such as the IPython notebook, and language specific code, such as the IPython kernel for Python. As computing spans across many languages, Project Jupyter will continue to develop the language-agnostic Jupyter notebook in this repo and with the help of the community develop language specific kernels which are found in their own discrete repos.

Installation

You can find the installation documentation for the Jupyter platform, on ReadTheDocs. The documentation for advanced usage of Jupyter notebook can be found here.

For a local installation, make sure you have pip installed and run:

pip install notebook

Usage - Running Jupyter notebook

Running in a local installation

Launch with:

jupyter notebook

Running in a remote installation

You need some configuration before starting Jupyter notebook remotely. See Running a notebook server.

Development Installation

See CONTRIBUTING.md for how to set up a local development installation.

Contributing

If you are interested in contributing to the project, see CONTRIBUTING.md.

Community Guidelines and Code of Conduct

This repository is a Jupyter project and follows the Jupyter Community Guides and Code of Conduct.

Resources

Download Details:

Author: Jupyter
Source Code: https://github.com/jupyter/notebook 
License: View license

#jupyter #notebook 

Sarai  Thompson

Sarai Thompson

1625284380

Get started with Jupyter Notebook

Jupyter Notebook is an online computational notebook that allows you to combine code, comments, media, and visualizations in interactive documents. It has quickly become one of the most popular online computational notebooks, used by top companies such as Google, Microsoft, and NASA. Today, we’re going to explore Jupyter Notebooks and discuss their benefits and how to get started.

We’ll cover:

#jupyter #python #jupyter-notebook

How to Convert Jupyter Notebooks into PDF

If you’re one of many data scientists looking for a job, you might find yourself working on a data science take-home assignment. Instead of sharing your Jupyter Notebooks, it would be neater if you could convert the notebooks and submit the pdf version. In this blog, I want to share how you can turn Jupyter Notebooks into pdf format in a few lines!

Install nbconvert and LaTeX

nbconvert allows users to convert Notebooks to other formats. You would think after installing nbconvert, and you are good to go…right? If it’s that simple, why would I be writing this post?

After I installed nbconvert, I received an error saying “500: Internal Server Error.” The reason why you see this error is that you will need to install LaTeX or Pandoc as well. I decided to download LaTeX. The good thing about downloading LaTeX is that it makes your analysis look like a research paper, which is very legit.

#template #convert #jupyter-notebook #jupyter #python