Saravanan666/pypi-org huggingface dataset:
Package: nanolog
nanologLife is too short. Usenanologto make logging and printing simpler!nanologfeatures a convenient logger API built on top of python’s
builtinlogging.The library also ships with many printing utilities. Python 3 only.InstallationFrom stable package on PyPIpipinstallnanologFrom bleeding edge master branchpipinstallgit+git://github.com/SurrealAI/nanolog.gitnanolog.LoggerLogging levels, from least severe to most:LOG_ALL: log everythingTRACE: fine-grained debugging messagesDEBUG: normal debuggingINFO: messages you usually don’t want to seeNOTICE(i.e.INFO5): non-error messages you usually want to
seeWARNING: exceptional circumstances that might not be errorsERROR: errors that occur, but are anticipated and handledCRITICAL: fatal errors that lead to terminationLOG_OFF: turn off all loggingimportnanologasnllogger=nl.Logger.create_logger('main',stream='out',level='debug',)logger.info('my',3,'world',1/16.)# just like print# >>> my 3 world 0.0625# nanolog use 'warn' instead of 'warning'logger.warnfmt('{}, we are{:.3f}miles from{planet}','Houston',17/7,planet='Mars')# just like str.format# >>> Houston, we are 2.429 miles from MarsUse a trailing number to indicate level, the larger the higher prioritylogger.info7(...)# info level 7logger.errorfmt8(...)# error level 8Display a banner line or blocklogger.infobanner3('my',3,'world',symbol='!',banner_len=16,banner_lines=3)prints:!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! my 3 world !!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!Of course, banner method also comes with astr.formatversionlogger.debugbannerfmt('{3}&{0}&{2}&{1}','a','b','c','d',symbol='<*_*>',banner_len=16,banner_lines=6)displays:<*_*><*_*><*_*><*_*><*_*>
<*_*><*_*><*_*><*_*><*_*>
<*_*><*_ d&a&c&b <*_*><*_
<*_*><*_*><*_*><*_*><*_*>
<*_*><*_*><*_*><*_*><*_*>
<*_*><*_*><*_*><*_*><*_*>Prettyprint support (uses the thirdparty libprettyprinter)logger.infopp7(...)logger.warnppfmt('my warning{:.3f}format{:.2f}string',1/7.,1/9.)Logger configTODOTime formattingTODOPrinting utililitesprettyprintBetter alternatives for thepprintmodule in python standard lib.pprint: takes variable number of objects, just likeprint()pprintstr: return string instead of printing to IO streampprintfmt: just likeprint('...'.format)pprintfmtstr: return string instead of printing to IO streamConvenient aliases (ppstands forprettyprint; a singlepmeans normal print)shortoriginalpfprintfmtpferrprintfmterrpstrprintstrperrprinterrpppprintppstrpprintstrppfpprintfmtppfstrpprintfmtstrTODO: talk about global configsPrint redirection context managersPrintRedirectionPrintFilePrintSuppressPrintString
Package: nanologger
nanologgernanologger is a tiny logger made with Python.It includes basic functionality such asA basic logWarning logsFatal logsSuccess logsThis tiny package also includes time format editing and enabling/disabling colorsWarning: Windows does not support color in console, so it is automatically disabledExample code:importnanologgeraslogprint("The first four logs will be printed, and will not exit on Fatal call")log.Log("Database service is up")log.Warning("File not found, using default directory")log.Fatal("Cannot connect to server",exit=False)log.Success("Operation Complete\n")print("Next three four will be printed without color")log.hasColor=Falselog.Log("Database service is up")log.Warning("File not found, using default directory")log.Fatal("Cannot connect to server",exit=False)log.Success("Operation Complete\n")print("Next three four will be printed without timestamp")log.hasColor=Truelog.hasTimestamp=Falselog.Log("Database service is up")log.Warning("File not found, using default directory")log.Fatal("Cannot connect to server",exit=False)log.Success("Operation Complete\n")print("Next three logs will be printed in a different time format, and exit on Fatal call")log.hasTimestamp=Truelog.hasColor=Truelog.timeFormat="%Y-%m-%d"log.Log("Database service is up")log.Warning("File not found, using default directory")log.Fatal("Cannot connect to server")log.Success("Operation Complete")Methods:Logprints a log with a timestampWarningprints a warning with timestampFatalprints a fatal log (terminates program if appropeiate value set)Successprints a success logVariables:timeFormatis a string, supports regular Python timestampsdefault: "%d-%m-%Y %H:%M:%S"hasColoris a boolean that sets/removes color from the logsdefault: TruehasTimestampis a boolean that sets/removes the timestampdefault: TrueInstallationInstall the package  by runningpipinstallnanologgerImport it withimportnanologger
Package: nanologic
Performing operations over logical expressionsCurrent implementation deals with logical expressions as computation graphs and performs some operations, such as:Computation of truth tableComputation of index form for logical functionComputation of PCNF/PDNFComputation of numerical from for PCNF/PDNFMinimization of PCNF/PDNFCurrent implementation's functionality is extremely limited (it's basically a toy example) and this package is therefore not appropriate for any major use.
All this was created as part of university work.You can find implementation in bothPython(src repo) as well as inIPython.
Package: nanolp
Project HOMEDocumentationDiscussionChangeLogIntroductionIt’s very simple, art-of-concept literate programming (LP) tool. Main idea
is too avoid processing document (LP source) format, so input document
format is supported by it’s traditional external tool. So it’s possible
to have favourite workflow: WYSIWYG editing/text processing/converting
with you favourite tool/suite (OpenOffice/Markdown tool/TeX/etc.).General workflow schemes are:local/WEB:
                         ____________
                       +------------+|
                       |            ||
                       | LP Library ||
                       |            |'
     local/WEB:        +------------+
 ------->>---------         /
|                  |      use
|                  v      /
|          some format with  --> 1. extract sources...
^             LP commands    --> 2. cross-references
^                  |         --> 3. use as library
|                  v
|     EXTERNAL TOOL/OFFICE SUITE
|                  |
 -------<<---------and:local/WEB:
    ____________
  +------------+|
  |            ||
  | LP Library ||
  |            |'
  +------------+
        /
      use
      /            READY TO PUBLISH  --> 1. online documentation
'some-lp.html' -->      ON WEB       --> 2. extract sources...
      \                              --> 3. cross-references
       \                             --> 4. use as library
        -- PARSE AND MODIFYING:
             + embeeded Javascript configuration
             + linked 'nanolp-pub.js'
             + linked 'nanolp-pub.css'So, this kind of LP tool knows about LP input format only how to extract
LP commands and code chunks -tangle, weaving is not needed, input format is
ready forprinting,publishing,reading, etc.At the moment, supported input formats are:Markdown/MultiMarkdownOpenOffice/LibreOfficeCreolereStructuredTextTeX/LaTeXTxt2TagsAsciidocHTML/XML… and any compatibleMain featuresdefinition of command (macros) with placeholders in the body (code chunk)variables dictionaries (for substitution of placeholders)pasting command code chunk with substitution of placeholdersdefinition of multiple parts code-chunks (for wrapping, etc.)joining, ‘ending’, etc. several code chunks‘globbing’ commands when pasteincluding one file to another (library)custom event handlers (filters in chain/pipe manner)supporting URLs in file names (read via HTTP)prepare of HTML files (with LP commands) for Web publishinggenerating cross-references fileauto-detecting of cyclesconfigurable via simple .INI like fileworks with Python 2.7 - Python 3+works with Unicode (UTF8)extendibleInstallationInstall Python (2.7 or 3+) first, then run:$ python setup.py installThen run:$ nlp.py -hor:$ python path-to-scripts/nlp.py -h
Package: nanolsap
nanolsapA Python module to solve the linear sum assignment problem (LSAP) efficiently.
Extracted from SciPy, and modified to minimal memory cost.Descriptionfrom nanolsap import linear_sum_assignmentSolve the linear sum assignment problem.

Parameters
----------
cost_matrix : array
    The cost matrix of the bipartite graph.
    It should be 2-D ArrayLike object, with nr rows and nc cols.

maximize : bool (default: False)
    Calculates a maximum weight matching if true.

subrows : array (default: None)
    Use sub rows from cost matrix if not None.

subcols : array (default: None)
    Use sub cols from cost matrix if not None.

Returns
-------
row_ind, col_ind : array
    An array of row indices and one of corresponding column indices giving
    the optimal assignment. The cost of the assignment can be computed
    as ``cost_matrix[row_ind, col_ind].sum()``. The row indices will be
    sorted if subrows and subcols are both None; in the case of a square cost
    matrix they will be equal to ``numpy.arange(cost_matrix.shape[0])``.This module is useful in cases when you need an efficient LSAP solver on
very large cost_matrix and limited memory.For a cost_matrix with dtype float64 has shape of 30000*30000, it needs  30000*30000*8 / 1024**3 = 6.7GB memory to store it.
In scipy.optimite.linear_sum_assignment, it will first convert it to float64 contiguous numpy 2-D array, then do a copy, and finally starts the solver.
So, the actual memory cost is at least 6.7*2 = 13.4GB.
if the origin cost_matrix does not match, for example a float32 2-D array,
the  first step here will cause one extra copy, increases the actual memory cost to 6.7/2+6.7*2 = 16.75GB.In this module, When input cost_matrix is a contiguous numpy 2-D array, the solver can run on it directly without any copy.
Also, cost_matrix can use small dtype like float32 to half reduce memory, so 3.35GB memory is enough.Notice: when nr > nc, scipy.optimize.linear_sum_assignment will copy then transpose and rearrange cost matrix so keeps memory access locality,
but this module do not do this, so it is about 2x slower in this situation.
For nr <= nc, this module has almost no performance drop,
so you can manually construct a transposed cost matrix for this module,
and manually swap row_ind and col_ind result if nr > nc to get better performance.The subrows and subcols arguments allow solver run on only a subgroup of row and cols on cost_matrix.
The result should be same as scipy.optimize.linear_sum_assignment(cost_matrix[np.ix_(subrows, subcols)]), but it avoids the expensive construct of sub cost_matrix.LicenseThe code in this repository is licensed under the 3-clause BSD license, except
for files including a different license header.The LSAP solver copied fromSciPyis also licensed under the 3-clause BSD
license.Some files copied fromminilsapare  also licensed under the 3-clause BSD license.
Package: nanomath
# nanomathThis module provides a few simple math and statistics functions for other scripts processing Oxford Nanopore sequencing data[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)
[![install with Debian](https://www.debian.org/logos/button-mini.png)](https://tracker.debian.org/pkg/python-nanomath)## FUNCTIONSCalculate read N50 from a set of lengthsget_N50(readlenghts)Remove extreme length outliers from a datasetremove_length_outliers(dataframe, columname)Calculate the average Phred quality of a readave_qual(qualscores)Write out the statistics report after calling readstats functionwrite_stats(dataframe, outputname)Compute a number of statistics, return a dictionarycalc_read_stats(dataframe)As ofv1.3.0, nanomath calculates the average quality differently, by first converting per-read phred scale averages to error rates, take the average, and converting back ([nanostat#40](<https://github.com/wdecoster/nanostat/issues/40>))## INSTALLATION`bash pip install nanomath `or
[![install with conda](https://anaconda.org/bioconda/nanomath/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanomath)` conda install-cbioconda nanomath `## CONTRIBUTORS[@alexomics](https://github.com/alexomics) for fixing the indentation of the printed stats## CITATIONIf you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
Package: nanome
NanomeThis library allows users to create Python plugins for Nanome VR Molecular Design Software (https://nanome.ai/)ExamplesCheck out our other repositories to see plugin examples (docking, for instance)InstallationIn order to use Nanome Plugin API, you need Python 3.5+ or 2.7+
To install the library, run:$pipinstallnanomeAs of version 0.38.0, we provide schemas for serializing nanome API objects in JSON. To use these, install with:$pipinstallnanome[schemas]Some modules in thebetafolder require extra dependencies. To install these, run:$pipinstallnanome[beta]DocumentationAll documentation needed to use this package is available atRead The DocsBuilding Docspipinstallsphinxsphinx_rtd_themecddoc
makehtml# start server to serve html docscdbuild/html
python-mhttp.server8000LicenseMIT
Package: nanomesh
NanomeshNanomesh is a Python workflow tool for generating meshes from 2D and 3D image data. It has an easy-to-use API that can help process and segment image data, generate quality meshes (triangle / tetrahedra), and write the data to many mesh formats. Nanomesh also contains tools to inspect the meshes, visualize them, and generate cell quality metrics.Easy-to-use Python APISegment and mesh 2D or 3D image dataMesh visualizationCalculate and plot cell metricsExport to many mesh formatsDocumentation:https://nanomesh.readthedocs.io/en/latest/Try nanomesh in your browser!Generate a 2D meshCalculate mesh metricsShow me an example!This example shows the workflow for generating a mesh from segmented data, and demonstrates a few of the features of Nanomesh. It uses a synthetic binary image with several rounded blob-like objects generated byskimage.>>>fromskimage.dataimportbinary_blobs>>>fromnanomeshimportImage>>>>>>blobs=binary_blobs(length=100,volume_fraction=0.25,seed=2102)>>>plane=Image(blobs)>>>>>>print(plane)Plane(shape=(100, 100), range=(False,True), dtype=bool)Imageis essentially a container for anumpyarray with some methods for image segmentation and visualization.>>>plane.show()<AxesSubplot:xlabel='x', ylabel='y'>Generating a mesh from image data is simple in Nanomesh usingPlane.generate_mesh(). The optionsoptsare passed to the triangulation function (nanomesh.triangulate). In this example, we useq30to generate a quality mesh with minimum angles of 30°, anda50to limit the triangle size to 50 pixels.The returnedmeshis aMeshContainerthat contains the generated triangles and line segments.>>>mesh=plane.generate_mesh(opts='q30a10')>>>mesh<MeshContainer>Number of points: 932Number of cells:triangle: 1754line: 2685Point data: physicalCell data: physicalField data: feature, backgroundIn the next cell, we plot the triangles.>>>mesh.plot('triangle')<AxesSubplot:title={'center':'triangle mesh'}>With themetrics submodule, Nanomesh can also calculate cell quality metrics and show them as acolored triangleorhistogram plot.>>>fromnanomeshimportmetrics>>>triangle_mesh=mesh.get('triangle')>>>metrics.histogram(triangle_mesh,metric='radius_ratio')<AxesSubplot:title={'center':'Histogram of radius ratio'}, xlabel='Radius ratio', ylabel='frequency'>Nanomesh usesmeshioto write data to most meshing formats.>>>mesh.write('mesh.vtk')Warning: VTK requires 3D points, but 2D points given. Appending 0 third component.That's it! There is a lot more that Nanomesh can do, check outthe examplesfor an overview.InstallationOne of the goals for Nanomesh is that it is easy to install.
This means that all dependencies are available fromPyPi.If you use conda, it is advised to create a new environment:conda create -n nanomesh python=3.9
conda activate nanomeshInstall nanomesh:pip install nanomeshFor the full installation instructions, see theinstallation guidelines.DevelopmentCheck out ourContributing Guidelinesto get started with development.
Package: nanomock
nanomockA one clicknano-currencyblock-lattice environment on your local computer.
This project aims to easily spin up an integration environment with multiple nano nodes.
The local network is highly customizable.
All configuration is done inside the config file :nanonet/nl_config.tomlprerequisitespython3.8+dockerdocker-compose 2Quickstart :Install the library :To install the library you canclone the respository and runpip3 install .or runpip3 install nanomockto download the latest version from PyPiThis gives you access tonanomock {command}command which will useyour_current_diras its entry point.Spin up a network :ActionCodeDescriptioncreate$ nanomock createCreate folders and node configstart$ nanomock startStart nodes (optional--nodes)init$ nanomock initCreate Epochs Canary Burn and Vote weight distributionManage the network network :ActionCodeDescriptionstatus$ nanomock statusGet status and block count for each nodestop$ nanomock stopStop nodes (optional--nodes)restart$ nanomock restartRestart all nodesreset$ nanomock resetDelete data.ldb and wallets.ldbdown$ nanomock downRemove all nodesdestroy$ nanomock destroyRemove all nodes and dataupdate$ nanomock updatePull and build latest containersQuery nodes :Each node can be queried via RPC (see theofficial documentation)ActionCodeDescriptionrpc$ nanomock rpc --payload '{"action" : "any_rpc"}'Use nano_rpc commands (optional--nodes)Configure the network :nl_config.tomldefine all aspects of the network : genesis account, burn_amount, number of nodes, versions,...
Package: nanomongo
nanomongois a minimal MongoDB Object-Document Mapper for Python.
It does not attempt to be a feature-complete ODM but if you like
usingpymongoapi with python dictionaries and often find yourself
writing validators andpymongo.Collectionwrappers, nanomongo
might suit your needs.nanomongo has full test coverage.Quick Links:Source (github)-Documentation (rtd)-Packages (PyPi)Version 0.4: Utility methodsdbref_field_getters,BaseDocument.get_dbrefand BugfixPython23 text type compatibilityVersion 0.3: nanomongo is now python2 compatible (with syntactic difference
when defining your Document, refer to Documentation)Featuressingle formatFielddefinitions with type checking and a few common
options such asrequired,default,auto_updatepymongo-identical index definitionsoptionaldot_notationassignment and deletion (delta) tracking for'$set'and'$unset'and atomic updates; you either insert or update'$addToSet'onDocumentupcoming'$push''$pull'funtionality# rough example
import pymongo
from nanomongo import Field, BaseDocument, Index

client = pymongo.MongoClient()

class MyDoc(BaseDocument, dot_notation=True, client=client, db='dbname'):
    foo = Field(str)
    bar = Field(int, required=False)

    __indexes__ = [
        Index('foo'),
        Index([('bar', 1), ('foo', -1)], unique=True),
    ]

doc = MyDoc(foo='L33t')
doc.bar = 42
doc.insert()

Doc.find_one({'foo': 'L33t'})nanomongo is Python23 compatible and I intend to support both pymongo & motor
transparently under the hood.Contributions and insight are welcome!Author:Eren Güven (GitHub,Twitter)License:Apache Software License
Package: nanonis-load
nanonis_loadA library for loading, plotting, and analyzing data from Nanonis SPM files, with special attention to $dI/dV(V_s, V_g)$ data from gate-tunable samples in the field-effect transistor (FET) geometry.This library is no longer compatible with Python 2.7 as of version 3.0.0.The following file types are supported:*.dat Bias Spectroscopy files*.3ds Grid Spectroscopy files*.sxm Image filesBasic UsageTo load and plot .dat files:spec = didv.spectrum('FILENAME.dat')
specPlot = didv.plot(spec, channel = 'Input 2 (V)')didv.plot takes individual spectrum objects or a list of spectrum objects.You can click on the line symbol on the legend to show or hide an individual spectrum.To plot $dI/dV(V_s, V_g)$ colorplots, where $V_s$ is the sample bias and $V_g$ is gate voltage annotated in the header of each .dat file:cPlot = didv.colorplot(BASENAME)
bar = cPlot.drag_bar(direction = 'horizontal')
cPlot.xlim(XMIN, XMAX)
cPlot.ylim(YMIN, YMAX)
cPlot.clim(CMIN, MAX)Nanonis image files (.sxm) can be loaded and plotted as follows:imageData = sxm.sxm('FILENAME.SXM')
imagePlot = sxm.plot(imageData, channel = 'Z (m)')
imagePlot.fft()And 2D Nanonis binary files (.3ds) can be loaded and plotted using the 'grid' module:gridData = grid.nanonis_3ds('FILENAME.3ds')
gridPlot = grid.plot(gridData, channel = 'Input 2 (V)', fft = True)UP and DOWN arrow keys on the keyboard can be used to iterate over different energies.1D line grids can be loaded and plotted using the grid.linecut class.There are two different ways of creating Landau fans in this library: didv.landau_fan and magnetoconductance.landau_fan.InstallationThis package is available on PyPI:pip install nanonis-load
Package: nanonispy
nanonispyA small library written in python 3 to parse Nanonis binary and ascii
files.Nanonispy was made in needing to do a lot of analysis for scanning tunneling microscopy (STM) data, and thought this would be good practice in creating a proper python library. That being said it is in no way foolproof and if anybody else actually uses this please let me know if you run into issues.Nanonispy can read Nanonis grid, scan, and point spectroscopy files. This means it will read the file header and parse that into a somewhat useful dictionary for later use, as well as read in the binary/ascii data in a relatively general way to accomadate data with multiple channels stored, or custom spectroscopy experiments.RequirementsCurrently written and tested withpython 3.9python 3.8python 3.7python 3.6Depends onnumpyInstallFor the most up-to-date version, install from github as pip and conda packages are not updated as frequently.pippip install nanonispycondaconda install --channel https://conda.anaconda.org/underchemist nanonispygithubSimply clone this repo and runpython setup.py installBasic usageOnce installed, you should be able to import it to any python script or ipython session.importnanonispyasnapThen given a file,grid=nap.read.Grid('/path/to/datafile.3ds')You can look at the attributes and methods to determine the information
available.Running testsSimilar to the install, except runpython setup.py test. If you have the nose module installed, it’s as simple asnosetests.You can also see coverage of the tests as well as ignore the test
discovery of numpy core packages (don’t quite understand why it does
this) withnosetests --with-coverage --cover-branches --cover-package=nanonispy.
Package: nanonis-spm-specs
Python Interface Package for NanonisOfficial python package for the Nanonis SPM Controller software.UsageThis package allows users of the Nanonis SPM Controller software to use and control
said software through python commands.How to useImportingimport nanonis_spm_specs_zurichInitializing ConnectionnanonisInstance = nanonis_spm_specs_zurich.Nanonis(PORT_HERE, IP_ADRESS_HERE)NOTE : THE PORT HAS TO BE AN INTEGER AND THE IP ADRESS A STRINGEnabling Debug Console OutputThe function "returnDebugInfo()" takes an integer as an argument.
This integer should be either 1 = on, or 0 = off. This option is off by default.Enable by running:
nanonisInstance.returnDebugInfo(1)ExamplesnanonisInstance.BiasSpectr_Open() --> Opens Bias Spectroscopy Module.Funtion Documentations can be found by either hovering over the function names
or in the TCP Protocol Document, which is also where all the available functions
are listed.xIMPORTANT:
The TCP Interface requires every argument to be of certain size (see documentation).
This is why the Numpy dependency is required, since it enables the specification
of variable sizes.Example:nanonisInstance.BiasSwp_LimitsSet(np.float32(1), np.float32(2))We hereby ensure that the arguments are of the correct size.
Strings are to be input normally as such:nanonisInstance.HSSwp_SaveBasenameSet("test")