Saravanan666/pypi-org huggingface dataset:
Package: ipython_doctester
Lets you run the doctests of a single class or function at a time.  Useful for
tutorials based on the IPython Notebook, using doctests for student feeback.Install withpip install ipython_doctester, or
navigate to this directory and run:python setup.py installUseRunipython notebook, then start your notebook with this import:In [1]: from ipython_doctester import testIn each subsequent cell, set up objects with their doctests, and with absent
(or flawed) function bodies, and decorate them with @test:In [2]: @test
        def square(x):
            '''
            >>> f(2)
            4
            '''Tests will run on each cell as it is executed.If you want to track students’ progress through a notebook in a
classroom setting, you can; seehttp://ipython-docent.appspot.com/for instructions.If no doctests are found in the function’s docstring, the program will look
for a file./docstrings/<functionname>.txt, append that to the function’s
docstring, and check for doctests again.  This can be used to keep the presence
of the docstrings from confusing students.Developmenthttps://github.com/catherinedevlin/ipython_doctesterThanks toBrian Granger for technical advice
Package: ipython-extensions
IPython extensions of varying usability and maturityYou may install this package to add interesting and/or useful features to
enhance your IPython experience. Contributions to this package are encouraged,
with the ‘release early, release often’ maxim - it is expected that the original
contributor (as opposed to the core IPython team) will take care of most of the
maintenance of his/her own extension.Installation: run ‘setup.py install’ or ‘easy_install ipython-extensions’Currently provided:ipy_gmail: A gmail interfaceipy_miscapps:Tab completers for various command line apps.
Also remembers previous options passed to prorams
Package: ipython-futhark
EmbedFutharkcode into your favourite
IPython shells and Notebooks.InstallYou should have a working version of Futhark in your$PATH. To do
so, read the installation instructions onreadthedocs.io.Then install ipython-futhark using pip:ipython futhark only:$ pip installipython-futharkInstalling pyopencl along the way:$ pip installipython-futhark[opencl]ExampleSeethe Notebook
demoIPython 5.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: %load_ext futhark

In [2]: %%futhark gpu
   ...: let main(): i32 = 42
   ...:
Warning: Device limits tile size to 22 (setting was 32)

In [3]: main()
Out[3]: 42

In [4]: %%futhark inspect gpu
   ...: let main(): f32 = 42
   ...:
In: main(): f32 = 42
Declaration of function main at tmpDWm0Zs.fut:1:5-1:5 declares return type f32, but body has type i32
If you find this error message confusing, uninformative, or wrong, please open an issue at https://github.com/HIPERFIT/futhark/issues.
Package: ipython-gpt
IPython ChatGPT extensionThis (standalone, no external dependencies required) extension allows you to use ChatGPT directly from your Jupyter Notebook or IPython Shell (Demo).Important!This is a very early and raw version, I have a lot of things to improve regarding code quality and missing functionality. Checkthis issuefor a rough "roadmap".Installation!pipinstallipython-gptThen in your notebook or ipython shell:%load_ext ipython_gptSetupYou must first generate an API key at OpenAI (https://platform.openai.com/account/api-keys) and set is an environment variableOPENAI_API_KEY. You can do it by modifying your.bashrc/.zshrcor starting jupyter with it:$OPENAI_API_KEY=[YOUR-KEY]jupyterlab# ...$OPENAI_API_KEY=[YOUR-KEY]ipythonThere are a few other ways to set the API KEY, but the envvar is the recommended one.ChatGPT APIThe command%%chatinterfaces with ChatGPT. It accepts multiple parameters (see Usage). Here's an example:%%chat--max-tokens=25What's the purpose of life?...>>>CHATRESPONSEImportantby default, the%%chatcommand preserves the conversation to give the Agent some context, in the same way that ChatGPT works. You can "reset" its status passing the flag--reset-conversation.%%chat--reset-conversationHowcanIavoidpandasusingscientificnotationinoutputs,anddoitglobally?......>>>CHATRESPONSEAgent's role (system message) and other chat parametersBy default, the Chat is started with the role:"You're a python data science coding assistant". You can change that by passing something different in your first%%chat:%%chat --system-message="You're a R Data Science assistant"

Your message...Once the conversation has started, you can't change the original message, as the context is preserved. To do so, you must reset the conversation:%%chat --system-message="You're a R Data Science assistant" --reset-conversation

Your message...Setting global configYou can change the defaults using the%chat_configline magic:%chat_config --system-message="You're an R data scientist coding assistant specialized in visualizations" --model "other model" --reset-conversationInvoke it without parameters to see the defaults set:%chat_config...>>>##### Conf set:***Defaultmodel**:gpt-3.5-turbo***Defaultsystemmessage**:You're a python data science coding assistant***Chathistorylength**:0Other methodsDisplay available modelsUsage:%chat_models[--all-models]%chat_modelsAvailable models:- gpt-3.5-turbo-0301
- gpt-3.5-turboDisplay usage and accepted parameters%reload_extipython_gpt%chat_help...usage:ipykernel_launcher.py[-h][--openai-api-keyOPENAI_API_KEY][--reset-conversation][--system-messageSYSTEM_MESSAGE][--no-system-message][--modelMODEL][--temperatureTEMPERATURE][--max-tokensMAX_TOKENS][--all-models]Alternative authenticationAside from setting the environment variable, you can also setOPENAI_API_KEYas a global variable in your notebook, or pass it directly as a parameter in any method--openai-api-key=YOUR-KEY.These alternative methods are NOT recommended, as you might leak your API Key in the notebooks' history, stored in.ipynb_checkpoints.
Package: ipython-irc
ipython-irc: An IRC iframe usingwebchat.freenode.netConnect tofreenodefrom IPython!InstallationPackagesGentooI’ve packaged ipython-irc for Gentoo.  You needlaymanand mywtk
overlay.  Install with:# emerge -av app-portage/layman
# layman --add wtk
# emerge -av dev-python/ipython-ircDependenciesIf you’re installing by hand or packaging calibcant for another
distribution, you’ll need the following dependencies:PackageDebianGentooIPythonipythondev-python/ipythonInstalling by handipython-irc is available as aGitrepository:$ git clone git://github.com/wking/ipython-irc.gitSee thehomepagefor details.  To install the checkout, run the
standard:$ python setup.py installUsageSee the module docstrings for simple examples.  For example:from ipythonirc import IRC
IRC(nick='you', channels=('#ipython', '#other')).show()LicenceThis project is distributed under theGNU General Public License
Version 3or greater.AuthorW. Trevor Kingwking@tremily.usCopyright 2013
Package: ipython-iris-magic
ipython-iris-magic%%iris magic for IPython, can run ObjectScript command in Notebooks.It can be run in any Notebook and does not require any special setup on IRIS or the Notebook.DemoAs you can see, the first line load the magic, the second line connect to the server, the third line run the ObjectScript command.All of this demo is in the example/Notebooks/Demo-Iris-Magic.ipynbTo run the demo run the following command in the root of the project:docker-composeupThen go to this url:http://127.0.0.1:8888/notebooks/Demo-Iris-Magic.ipynbLoad the magic%load_extiris_magicConnect to the server%%irisiris://superuser:SYS@localhost:1972/USERRun the ObjectScript command%%irisSetx=1WritexInstallationIn order to use this magic, you need to install theipython-iris-magicpackage.pipinstallipython-iris-magicAll the dependencies will be installed automatically.Usage%load_extiris_magic%%irisiris://superuser:SYS@localhost:1972/USERsettest="toto"zwtestOutput:test="toto"You can also use the magic to run SQL query.Load the magic%load_extsql/!\ You need to install the sql extension first.The sql extension is not part of the standard IPython installation. You can install it with the following command:pipinstallipython-sqlConnect to the server%sqliris://superuser:SYS@localhost:1972/USERRun the SQL query%sqlSELECT1
Package: ipython-kusto
# ipython-kusto - Run Microsoft Kusto queries in IPython notebooksThis extension borrows extensively from Catherine Devlin’s ipython-sql extension.https://github.com/catherinedevlin/ipython-sqlIt provides two magics:%kqlset - a line magic to set the default cluster and database%kql/%%kql - a line or cell magic to execute Kusto Query Language queries and return the results as a Pandas dataframe. The dataframe will be assigned to a variable ‘kqlresult’ (can be overridden with –set argument)If you run either of these followed by a ‘?’ you will get additional help.When running a query, you may be redirected to a browser page to sign in if a token is needed.See the example notebook in the examples/ directory for more details, or view it here with Binder:[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/gramster/ipython-kusto/master?filepath=examples%2FStorms.ipynb)0.0.9Added missing dependencies to setup.py0.0.8Fix issue with parsing queries containing {}0.0.7Fix sample notebook issue.
Remove redundant dependencies.0.0.6Removed the NEWS.md file; it wasn’t being bundled and caused install to not work. This is
a quick fix.0.0.5Added a flag to inhibit variable substitution in case that is problematic
in some query.0.0.4Better error reporting. Use –error to get the old raw error.0.0.3Updated URL to point to Github repo.0.0.2A typo crept in to 0.0.1 release; that has been fixed.
Added a –quiet option to not display the dataframe.0.01.
Initial release
Package: ipython-markdown-inspector
ipython-markdown-inspectorIPython extension providing inspection results as Markdown, enabling better integration with Jupyter Notebook and JupyterLab.
Depends ondocstring-to-markdown.InstallationRequiresIPython8.22 or newer (which requires Python 3.10 or newer).pipinstallipython-markdown-inspectorUsageTo load an extension while IPython is running, use the%load_extmagic:%load_ext ipython_markdown_inspectorTo load it each time IPython starts, list it in yourconfiguration file:c.InteractiveShellApp.extensions=['ipython_markdown_inspector']After enabling the extension, both the contents of "Contextual Help" panel,
and results of info requests such as%run?ordf?will provide the output in Markdown format.
Package: ipython-memory-magics
IPython memory magic commandsSimple tool to trace memory usage of a Python statement or expression execution.Memory equivalent of IPython built-intime magics.Existing tools likememory-profileroripython-memory-usagemainly use psutil package to measure memory usage, which may give inaccurate results. This package usestracemallocmodule to trace Python memory allocations. Memory-profiler provides tracemalloc backend, but it does not allow to use it for magic commands. This packages offers line%memoryand cell%%memorymagic commands, which were intended to complement the%timeand%%timemagic commands.InstallationInstall from pip:pip install ipython-memory-magicsOr install directly from github:pip install git+https://github.com/rusmux/ipython-memory-magics.gitAfter the installation load the extension via:%load_ext memory_magicsTo activate it whenever you start IPython, edit the configuration file for your IPython profile~/.ipython/profile_default/ipython_config.py. Register the extension like this:c.InteractiveShellApp.extensions = [
    'memory_magics',
]If the file does not already exist, runipython profile createin a terminal.UsageUse%memory [options] statementto measurestatement's memory consumption:%memory-qlist(range(10**6))The output in the formatcurrent / peakwill follow:RAM usage: line: 34.33 MiB / 34.33 MiBHere-qis thequietflag set to suppress the output. You can use other options to get data on the notebook and jupyter memory usage, or to print the statistics in a table. For example, you can use-nor--notebookflag to get the information about the notebook current memory consumption:%memory-nRAM usage: notebook: 101.41 MiBIn the same way,-jor--jupyterflag will give you the information about the total Jupyter memory usage.Put%%memory [options]on top of a cell to measure its memory consumption:In[1]:%%memory-n-j-tsum(list(range(10**6)))This will print:RAM usage |   current   |     peak     |
----------------------------------------
 cell     | 2.62 KiB    | 34.33 MiB    |
 notebook | 123.08 MiB  | 155.53 MiB   |
 jupyter  | 170.19 MiB  | 202.55 MiB   |

Out [1]: 499999500000OptionsFive options are available in full and short versions:-n <notebook>: If present, show current notebook memory usage-j <jupyter>: If present, show current jupyter memory usage-i <interval>: Interval in milliseconds for updating memory usage information-t <table>: If present, print statistics in a table-q <quiet>: If present, do not return the output
Package: ipython-mongo
<img src="https://travis-ci.org/Bloodevil/ipython_mongo.svg?branch=master"/>ipython mongo magic=============:Info: ipython mongo shell extension:Author: Yeaji Shin ( yeahjishin@gmail.com )Install=======use github:In [1]: %install_ext https://github.com/Bloodevil/ipython_mongo/edit/master/imongo.pyIn [2]: %load_ext imongo.pygit clone https://github.com/Bloodevil/ipython_mongo.gitcd ipython_mongopython setup.py installuse pip:pip install ipython_mongoIn [1]: %load_ext imongoimport error when load_ext=============1. check sys.path2. check imongo under '/usr/lib/python2.7/dist-packages/IPython/extensions'Usage=============%mongo_connect [mongodb://localhost:27017]```sqlIn [1]: con = %mongo_connectIn [2]: conOut[2]: MongoClient('localhost', 27017)In [3]: %mongo_connect mongodb://127.0.0.1:27017Out[3]: MongoClient(u'127.0.0.1', 27017)```%show_dbs```sqlIn [10]: %show_dbsOut[10]:[u'local',u'tumblr',u'admin',u'movie',u'theater',u'a',u'daa',u'dbs',u'test']```%show_collections [dbname]```sqlIn [11]: %show_collections movieOut[11]: [u'system.indexes', u'kobis']```%insert db.collection {data}```sqlIn [29]: %insert test.test {"test": "test1"}{u'test': u'test1'}In [31]: conn.test.test.find_one()Out[31]: {u'_id': ObjectId('544a20e5eb5e7b1ccdb7ca54'), u'test': u'test'}```%drop db.collection%drop db%find imongo.find1 {data}```sqlIn [9]: %find imongo.find1 {}Out[9]: [{u'_id': ObjectId('546d7192eb5e7b1cfbdf12cb'), u'test': u'abcdef'}]In [10]: %find imongo.find1 {'test': /c/}Out[10]: [{u'_id': ObjectId('546d7192eb5e7b1cfbdf12cb'), u'test': u'abcdef'}]In [11]: %find imongo.find1 {'test': /^a/}Out[11]: [{u'_id': ObjectId('546d7192eb5e7b1cfbdf12cb'), u'test': u'abcdef'}]In [17]: %find imongo.find1 {'test': /f$/}Out[17]: [{u'_id': ObjectId('546d7192eb5e7b1cfbdf12cb'), u'test': u'abcdef'}]In [21]: %find imongo.find1 {'test': > 120}Out[21]:[{u'_id': ObjectId('546d71f4eb5e7b1cfbdf12cc'), u'test': 123},{u'_id': ObjectId('546d71fbeb5e7b1cfbdf12ce'), u'test': 1920}]In [22]: %find imongo.find1 {'test': < 120}Out[22]: [{u'_id': ObjectId('546d71f7eb5e7b1cfbdf12cd'), u'test': 100}]In [7]: %find imongo.find1 {'test': <= 100}Out[7]: [{u'_id': ObjectId('546d71f7eb5e7b1cfbdf12cd'), u'test': 100}]In [3]: %find imongo.find1 {'test': > 120, 'test': < 1000 }Out[3]: [{u'_id': ObjectId('546d71f4eb5e7b1cfbdf12cc'), u'test': 123}]```News====0.1---*Release date: 26-Aug-2014** Initial release* Release to PyPI0.2---*Release date: 22-Oct-2014** #7 new way to make autocomplete.* #9 insert data0.3---*Release date: 20-Nov-2014** #17 make drop function for drop db or collection* #19 make find query* #20 find query support slash like query just like mongodb server shell.* #21, #23 find query support comparison query more easy way.
Package: ipython-namespaces
IPython NamespacesExtension for IPython/Jupyter Notebooks that adds namespaces that you can enter and re-enter.(Because: “Namespaces are one honking great idea – let’s do more of those!”)Usage (in a Jupyter Notebook)Install and load the extension:!pip install -U ipython-namespaces
%load_ext ipython_namespacesUse thespacecell magic:foo = 23%%space dustin

bar = 42
foo, barOutput:(23, 42)foo, barOutput:NameError: name 'bar' is not defined%%space dustin

foo, barOutput:(23, 42)from ipython_namespaces import Namespaces

Namespaces.dustin['bar']Output:42FeaturesSeparate namespaces within one Jupyter NotebookAccess to other namespaces via theNamespacesclassUnchanged behavior ofdisplay– the value of the last line in a cell is displayedUnchanged behavior of tracebacks – the problematic line in one’s own code is highlightedAcknowledgementsThanks to Davide Sarra and the Jupyter Spaces extension for the inspiration!
Package: ipython-nord-theme
ipython-nord-themeAn arctic, north-bluish theme for the IPython interactive prompt.QuickstartTo easily get the theme installed and loading at startup:pipinstallipython_nord_theme[hook]InstallationInstall usingpip:pipinstallipython-nord-themeor withconda:condainstall-clewisacidicipython-nord-themeUsageLoad the theme with IPython magic:%load_extipython_nord_themeTo set the theme back to what you had previously:%unload_extipython_nord_themeRunning this at startupYou can either put the following snippet in your IPython startup directory (usually$HOME/.ipython/profile_default/startup):try:fromipython_nord_theme.startupimportloadload()delload# don't pollute global namespace!!exceptModuleNotFoundError:passOr useipython-startup-hook(recommended if you use IPython within virtual environments).This may be done at install with the command given in theQuickstart.DevelopmentCreate the conda environment:condaenvcreate-fenvs/dev.yml
condaactivateipython-nord-theme-devFormat code by running the pre-commit tasks:pre-commitrun--allRun the tests with pytest (note we need to useipythonrather thanpythonfor these tests):ipython-mpytest
Package: ipython-pip-magics
This project provides IPython “magics” for working with pip.To load the IPython magics, do (in IPython):%load_ext ipython_pipThe primary magic is %pip. This works (almost) exactly
like pip from the operating system command line.Do:%pip –helpto get an overview.Note: when doing ‘%pip uninstall …’, use the -y option
to avoid being prompted (which does not work using %pip).Other magics:%pip_upgrade_allAttempt to upgrade all packages%pip_upgrade_all_user
Package: ipython-reload
ipython-reloadIPython magic command to reload modules on demandInstallpipinstallipython-reloadUseIn [1]: %load_ext ipython_reload

In [2]: from foo import some_function

In [3]: some_function()
Out[3]: 42

In [4]: # open foo.py in an editor and change some_function to return 43

In [5]: %reload some_function

In [6]: some_function()
Out[6]: 43The%reloadmagic can reload modules not directly imported, imported modules
in the local namespace, and imported variables.Reloading imported variables may produce unexpected results if the name is
generic, such as in the case of__version__. Python does not track the source
of where a variable was defined, so this code loops all imported modules, and
looks for a matching name, that is the same type as the variable you want to
reload. If you have imported avariableusingfrom foo import bar as bazthis functionality will not work.
Package: ipython-rtlogging
ipython-rtloggingIpython Real Time Loggingipython-rtloggingis a tool that relies only on the Python standard library (except for IPython, Rich) and is used to capture and log the output streams of cells in real-time within IPython or IPython Notebook. It provides an optional solution to tackle the problem of losing cell outputs or not being able to monitor the progress of a running code after reconnecting to the Notebook.https://github.com/wilmerwang/ipython-rtlogging/assets/35020700/be3fa6e5-0d77-415b-a888-a3f70d1a7c12DependenciesipythonrichInstallInstall the latest release with:pipinstallipython-rtloggingor download fromhttps://github.com/wilmerwang/ipython-rtloggingand:cdipython-rtlogging
python3setup.pyinstallExamplesPlease cheackthis notebookUsageLoad rt_logging in IPython or IPython Notebook:In[1]:%load_extrt_loggingThen can use CLI to monitor the progress of a running code:# Simaple usagert_logging# OR Just list the running cellrt_logging-lsThere are some extesion magic method:In[2]:%%rt_logging?

Docstring:
::%rt_logging[--no-stderr][--no-stdout][name][buffering]runthecell,printandredirectstdout,stderrcalls.

positionalarguments:nameFileNamebufferingbufferingsize,1toselectlinebuffering.Sameasopen(buffering)optionalarguments:--no-stderrDontcapturestderr.--no-stdoutDontcapturestdout.In[3]:%ls_logging?
Docstring:
::%ls_logging[--ll]listtheallloggingnames

optionalarguments:--llFileNametoLoadIn[4]:%load_logging?
Docstring:
::%load_logging[--nameNAME][--topTOP]loadandprintloggingdata

optionalarguments:--nameNAMEFileNamestoLoad--topTOPtoplinestoLoadIn[5]:%rm_logging?
Docstring:
::%rm_logging[--nameNAME]deletelogging

optionalarguments:--nameNAMEFileNametoLoadLicenseMIT
Package: ipython-secrets
IPython Secretsmakes it easier to use secrets in a Jupyter notebook.The first timeget_secretis called, it prompts the user for the password or
other secret. After this value is read, it is saved in the system keyring, and
the Jupyter output cell is then cleared.Subsequent calls toget_secretuse the saved value. This is true even
if they are called in a different process running in the same account – for
example, if the machine has been rebooted, or the local Jupyter server has
otherwise been shut down and restarted.NoteInstall thegsheet-keyring packageto use ipython-secrets onGoogle Colaboratory:pip3 installgsheet-keyring. The gsheet-keyring
package provides a Keyring backend that is backed by Google Sheets. This is
necessary since the Colaboratory environment doesn’t provide a persistent
file system, or the OS services that the Keyring’s standard and alternative
backends rely on.WarningThis package stores the secret on the Jupyter server. Don’t trust
it with secrets you don’t trust the Jupyter server with. (This is true for
all means of using a secret in a notebook.)WarningThe package is intended to reduce the likelihood of accidental
disclosure of secrets in notebook source. It won’t secure a secret from code
that is runninginthe notebook; and it won’t keep you from writing code
that displays the secret in a notebook output cell – in which case it has
been disclosed to whoever can see the notebook.Installpip3installipython-secretsUsagefromipython_secretsimport*TWILIO_API_KEY=get_secret('TWILIO_API_KEY')AlternativesSecrets can also be stored in an environment variable, and read from the
notebook. This is a best practice for applications (and especially web and otherserver-side services), but I’ve found it inconvenient for notebooks – the
notebook server must be re-started to pick up a new environment variable; and,
it complicates the setup instructions for notebook users.DevelopmentInstall Pipenv, and required packages:$pip3installpipenv$pipenvinstall$pipenvshell$pipinstallflitInstall locally:flitinstall--symlinkAcknowledgementsThis package is a thin wrapper aroundKeyring.LicenseMIT
Package: ipython-sparql-pandas
IPython Sparql Pandas ExtensionJupyter/IPython Extension for Sparql Pandas dataframe queries.InstallVia pip:pipinstallipython-sparql-pandasUsageLoad the extension:%load_ext ipython_sparql_pandasQuery:%%sparqlhttp://dbpedia.org/sparql/-qsfooPREFIXdct:<http://purl.org/dc/terms/>PREFIXdcb:<http://dbpedia.org/resource/Category:>PREFIXdbp:<http://dbpedia.org/property/>SELECTDISTINCT?name?capital?populationTotalWHERE{?capitaldct:subjectdcb:Capitals_in_Europe;dbp:populationTotal?populationTotal;foaf:name?name.}ORDER BYDESC(?populationTotal)LIMIT5The variablefoois now a Pandas dataframe of SPARQL results:foo.plot.barh('name','populationTotal').invert_yaxis()AcknowledgementsThis package is inspired byipython_sparql.