Saravanan666/pypi-org huggingface dataset:
Package: nanorpc
NanoRPCNanoRPC is a Python library for interacting with Nano cryptocurrency nodes via their JSON-RPC API. It provides an easy-to-use interface to execute RPC (Remote Procedure Call) commands supported by different versions of Nano nodes.FeaturesCompatible with Python 3.7 and higher.Supports asynchronous operations usingasyncioandaiohttp.Automatically adjusts available RPC methods based on the version of the connected Nano node.Provides a simple and intuitive API for executing RPC commands.RequirementsPython 3.7 and higheraiohttp libraryInstallationYou can install NanoRPC usingpip:pipinstallnanorpcUsageHere's a basic example of how to use NanoRPC to interact with a Nano node:importasynciofromnanorpc.clientimportNanoRpc,NodeVersionasyncdefmain():# Connect to a Nano noderpc=NanoRpc(url='http://localhost:7076',node_version=NodeVersion.V25_0)# Execute an RPC commandblock_count=awaitrpc.block_count()print(f"Current block count:{block_count}")# Execute another RPC commandversion_info=awaitrpc.version()print(f"Node version:{version_info}")#pass mandatory input as args* and optional as kwargs*account="nano_3msc38fyn67pgio16dj586pdrceahtn75qgnx7fy19wscixrc8dbb3abhbw6"account_info=awaitrpc.account_info(account,include_confirmed="true",representative="true",receivable="true",weight="true")print(f"Account info:{account_info}")# Run the main function within an asyncio event loopasyncio.run(main())Error HandlingNanoRPC includes several error handling mechanisms. If an RPC command fails or if a network issue is encountered, the library will retry the request for a specified number of times. If all retries are exhausted, the library will raise aMaxRetriesExceededError.Available RPC CommandsNanoRPC provides access to various RPC commands based on the connected Nano node version. For a complete list of available commands and their parameters, please refer to theversions folderin this repository.Official RPC DocumentationFor detailed documentation on the Nano RPC protocol and available commands, please visit theNano RPC Documentationpage.ContributingContributions to NanoRPC are welcome! If you find any issues, have suggestions, or would like to contribute enhancements or new features, please open an issue or submit a pull request.LicenseNanoRPC is licensed under the MIT License. See theLICENSEfile for more information.
Package: nanoservice
nanoservice is a small Python library for writing lightweight networked
services usingnanomsgWith nanoservice you can break up monolithic applications into small,
specialized services which communicate with each other.InstallMake sure you have the nanomsg library installed:$gitclonegit@github.com:nanomsg/nanomsg.git$./configure$make$makecheck$sudomakeinstallFor more details visit the officialnanomsg
repoOn OS X you can also do:$brewinstallnanomsgInstall nanoservice:From project directory$makeinstallOr via pip$pipinstallnanoservice(it'sbroken)Example UsageThe service:fromnanoserviceimportResponderdefecho(msg):returnmsgs=Responder('ipc:///tmp/service.sock')s.register('echo',echo)s.start()$pythonecho_service.pyThe client:fromnanoserviceimportRequesterc=Requester('ipc:///tmp/service.sock')res,err=c.call('echo','hello world’)print('Result is{}'.format(res))$pythonmy_client.py$Resultis:helloworldOtherTo run tests:$maketestTo run benchmarks$makebenchCheck out examples directory for more examples.MIT Licensed
Package: nanosip
nanosipSimply ring a phoneReport Bug·Request FeatureTable of ContentsAbout The ProjectInstallationUsageLicenseAbout The Projectnanosip is a minimal implementation of the theSIPINVITEtransaction, which is used to ring another phone.It isnota complete or compliant implementation of SIP.notestablishing a VoIP / audio link with the callee.Simply rings and hangs up.This package was created to be used by my home assistant integration "sipcall", however it can be used in any other project.(back to top)InstallationInstall the package from PyPIpipinstallnanosipThis package does not have any dependencies(back to top)UsageTo make a call, you will needeither a cloud-based SIP registrar (e.g.sipgate,easybellor others)or a local PBX that runs on your router or local server (e.g. aFRITZ!Boxorasterisk)From your registrar you will obtain the following required information:usernamepasswordSIP serverDomain (usually the same as the server)You can then make a call like this:fromnanosipimportcall_and_cancelauth_creds=SIPAuthCreds(username="USERNAME",password="PASSWORD")inv=Invite(uri_from="sip:USERNAME@DOMAIN",uri_to="sip:CALLEE@DOMAIN",uri_via="SIP_SERVER",auth_creds=auth_creds,)call_and_cancel(inv,15,"SIP_SERVER")This package also supports use withasyncio. For more examples, check out theexamples/subfolder.Thecall_and_cancelmethod may throw anOSErrorif something with the connection of the SIP call went wrong.
For example, if the credentials are wrong, it will throw anOSError('nanosip error: 407 Unauthorized').(back to top)LicenseDistributed under the GPLv3 License. SeeLICENSEfor more information.(back to top)
Package: nanoSQLite
nanoSQLitenanoSQLiteis a minimalistic SQLite wrapper tailored for those who feel JSON isn't quite right for data storage but
can't be bothered to dive deep into setting up a full-fledged ORM.Sometimes, you just want a tiny step up without all the fuss.
With less than 300 lines of Python code, it provides an uncomplicated interface for managing SQLite databases.Despite its simplicity, nanoSQLite offers a robust set of functionalities that enable you to interact with
SQLite databases seamlessly, without having to worry about managing cursors and connections manually.It's designed to make working with SQLite in Python as straightforward and Pythonic as possible.Ideal for small projects, prototypes, or when you just want a break from JSON but aren't ready for heavy ORM lifting.FeaturesEasy Setup: Create connections to SQLite databases with a single function call.Intuitive Interface: Insert, update, and delete data using a simple syntax.Quick Prototyping: Manage data efficiently with a few lines of code, perfect for rapid prototyping and basic projects.Flexible: Execute custom SQL statements using the underlyingsqlite3.Cursorandsqlite3.Connectionobjects.Robust: Thesqlite3module is part of the Python standard library and has been extensively tested.Pythonic: The nanoSQLite API is designed to be as Pythonic as possible, which makes it intuitive and easy to use.Pure Python: nanoSQLite is written with no dependencies.Lightweight: nanoSQLite is a single-file module with less than 300 lines of code.Open Source: nanoSQLite is distributed under the MIT license.ExamplesMost of database operations can be covered with the following examples:Create a new SQLite database with a table:fromnanoSQLiteimportNanoSQLitedb=NanoSQLite("people")db.create_table("friends",{"id":"INTEGER PRIMARY KEY AUTOINCREMENT","name":"TEXT","age":"INTEGER","height":"REAL","is_cool":"BOOLEAN",},)Insert data:db.insert("friends",{"name":"John","age":20,"height":1.8,"is_cool":True})db.insert("friends",{"name":"Jane","height":1.7,"is_cool":False})db.insert("friends",{"name":"Bob"})Update data:db.update("friends",{"age":21,"height":1.9},{"name":"John"})db.update("friends",{"age":5},{"name":"Bob"})Delete data:db.delete("friends",{"name":"Jane"})Select data:db.select("friends",["name","age","height","is_cool"],{"name":"Bob"})db.select_first("friends",["name","age","height","is_cool"],{"name":"Bob"})db.select_all("friends")When more advanced functionality is required, you can still execute custom SQL statements,
using the underlyingsqlite3.Cursorandsqlite3.Connectionobjects:data=[("Monty Python Live at the Hollywood Bowl",1982,7.9),("Monty Python's The Meaning of Life",1983,7.5),("Monty Python's Life of Brian",1979,8.0),]db.cursor.executemany("INSERT INTO movie VALUES(?, ?, ?)",data)db.connection.commit()InstallationYou can install nanoSQLite from PyPI:pipinstallnanoSQLite
Package: nanotext
nanotextName inspired byfastText.Run tests:cd.../nanotext/
pytest# or python setup.py testTODO: turn embedding in gensim fmt into something similar to glove (bin?)
would then be easier to train/ unfreeze and then save again, to be loaded w/ some model eg for PUL prediction

https://github.com/plasticityai/magnitude

nanotext compute

takes annotation (load domains) and our model and computes vector

nanotext train corpus model

nanotext compare ...

nanotext search ...

nanotext taxonomy (calculate a gtdb based taxonomy and get closest functional genome and use that or distance)

like sourmash really



check sourmash publication

nanotext predict model=medium
nanotext predict model=pul
Package: nanotopology
NanotopologyThe Python project to check the similarity of two graphs using nano sets.nanosets.py file is used to find nanosets of graphInput data1.List of all vertices of graph.2.Dictionary that contains vertices of graph as key and adjacent vertices as value.Function explanationParameters of functionvhis the list of all vertices of graph(s).Parameters of functionlower_approximationandupper_approximationare dictionary and the value returned by
function vh.Parameters of functionboundary_regionare the values returned from lower-approximation and upper_approximation.nanosetis obtained by passing the values returned from lower_approximation, upper_approximation and boundary_region.graph_euivalence.py file is used to check whether two graphs are isomorphic or not.Dictionary that contains nodes(key) and adjacent nodes(values) of each graphs are directly passed to the equality function.Final result will be isomorphic vertices of second graph to the first graph if two graphs are similar else false statement(graphs are not similar) will be returned.ExampleInputd1 = { 1: [1,2,4,6], 2: [1,2,3], 3: [2,3,4], 4:[1,2,4,6], 5:[4,5,6], 6:[1,5,6] }d2 = { a: [a,b,c,f], b: [b,e,d,a], c:[a,d,c], d:[b,c,d], e:[b,f,e], f:[e,f,a] }Outputtwo graphs are similarmatching nodes[['a', 'c', 'd', 'b', 'e', 'f'], ['a', 'd', 'c', 'b', 'f', 'e'], ['a', 'e', 'f', 'b', 'c', 'd'], ['a', 'f', 'e', 'b', 'd', 'c'], ['b', 'c', 'd', 'a', 'e', 'f'], ['b', 'd', 'c', 'a', 'f', 'e'], ['b', 'e', 'f', 'a', 'c', 'd'], ['b', 'f', 'e', 'a', 'd', 'c']]Dependencies1.Python >= 2.6
Package: nanotopy
nanoto_py : Python gateway to rpc.nano.toThe goal is to create the easiest way to prototype nano apps.Get your free API_KEY fromhttps://rpc.nano.toand hack around!How to install :pip install nanotopyor from source :git clone https://github.com/gr0vity-dev/nanotopy.git
cd nanotopy
pip install .Example code :importasynciofromnanotopy.clientimportNanoToasyncdefrun():# This can only be done once ! Write down the key!AUTH_KEY=awaitNanoTo.get_auth_key("your@email.address")print(AUTH_KEY)nano_to=NanoTo(AUTH_KEY["key"])# Create a new nano account# Seed generation is done locally! No secrets are ever sharedseed=NanoTo.generate_seed()seed_index=0# Same seed and seed_index will ALWAYS result in the same private_keyprivate_key=NanoTo.get_private_key_from_seed(seed,seed_index)account=NanoTo.get_account_from_key(private_key)print(account)# Get account infoaccount_info=awaitnano_to.account_info(account)print(account_info)# Receive all blocksreceived_hashes=awaitnano_to.receive_blocks_many(private_key)print(received_hashes)if__name__=="__main__":asyncio.run(run())
Package: nanotron
⚡️ NanotronThe objective of this library is to provide easy distributed primitives in order to train a variety of models efficiently using 3D parallelism. For more information about the internal design of the library or 3D parallelism in general, please check out[docs.md]and[3d_parallelism.md].PhilosophyMake it fast. At least as fast as other open source versions.Make it minimal. We don't actually need to support all techniques and all versions of 3D parallelism. What matters is that we can efficiently use the "best" ones.Make everything explicit instead of transparent. As we move forward, making things transparent works well when it works well but is a horrible debugging experience if one doesn't understand the implications of techniques used. In order to mitigate this, we choose to be explicit in the way it does thingsCore FeaturesWe support the following:3D parallelism, including one-forward-one-backward pipeline engineZeRO-1 optimizerFP32 gradient accumulationParameter tying/shardingInstallationRequirements:Python >= 3.10PyTorch >= 2.0.0Flash-Attention >= 2.5.0To install (in a new env):pipinstalltorch
pipinstallpackaging;pipinstall"flash-attn>=2.5.0"--no-build-isolation
gitclonegit@github.com:huggingface/nanotron.gitcdnanotron
pipinstall-e.Also nice to havetransformersdatasetspython-etcdtensorboardX:pip install transformers datasets python-etcd tensorboardXWe also support a set of flavors that you can install usingpip install -e [$FLAVOR]:dev: Used is you are developping innanotron. It installs in particular our linter mechanism. On top of that you have to runpre-commit installafterwards.test: We usepytestin order to run out testing suite. In order to run tests in parallel, it will installpytest-xdist, which you can leverage by runningpytest -n 12 tests(12 is the number of parallel test)Quick examplesIn the/examplesdirectory, you can find a few example configuration file, and a script to run it.You can run a sample training using:torchrun--nproc_per_node=8run_train.py--config-fileexamples/debug_run_train.yamlAnd run a sample generation using:torchrun--nproc_per_node=8run_generation.py--ckpt-pathcheckpoints/text/4Development guidelinesIf you plan on developing onnanotron, we suggest you install thedevflavor:pip install -e ".[dev]"We use pre-commit to run a bunch of callbacks on each commit, mostly normalization code in order for the codebase to stay consistent. Please do runpre-commit install.For the linting:pre-commitinstall
pre-commitrun--config.pre-commit-config.yaml--all-filesFeatures we would like to add:Supporttorch.compileSupporttorch.distributed.rpcMore optimized kernelsSupport Zero3Other PP schedules (such as Interleaved 1f1b...)Ring attention / Sequence Parallelism3D Parallel MoEsSupporting more architectures (Mamba..)...CreditsWe would like to thank everyone working on LLMs, especially those sharing their work openly from which we took great inspiration: Nvidia forMegatron-LM/apex, Microsoft forDeepSpeed, HazyResearch forflash-attn
Package: nanotts
NanoTTS python wrapperThis package is a python wrapper for the NanoTTS speech synthesizer utility as described here:https://github.com/gmn/nanotts.InstallationYou can install this package withpip install nanotts.
Make sure you have the NanoTTS synthesizer installed and added to your $PATH.UsageThe NanoTTS python wrapper provides two methods to generate speech, one from a string input, the other from a text file.importnanottsntts=nanotts.NanoTTS()# Generate speech from a stringntts.speaks("Hello World!")# Generate speech from a text filentts.speak("input.txt")The attributes that can be set are described below:loglevel: set loglevel for the logging module (i.e.logging.*)outputFile: set name of the output .wav file (at least one ofoutputFileandplayhas to be set)pitch: set pitch in range [0.5, 2.0]play: toggle whether to directly play the created speech (at least one ofoutputFileandplayjas to be set)speed: set speed in range [0.2, 5.0]voice: choose language from "de-DE", "en-GB", "en-US", "es-ES", "fr-FR", "it-IT"volume: set volume in range [0.0, 5.0]
Package: nanourl
My projectrun time dependencies instal Flask - framework - my computer communicates with the clients's onepipinstalFlaskfor development:pipinstallpytestpylintpytest.pylint*q.pypythonmain.pyinstall dependenciespipinstall-rrequirements.txt--tag - name the imagedockerbuild--tagnanourl.-p -- portdockerrun-p5000:5000nanourlcurlhttp://localhost:5000
Package: nanoyc-logging
from nanoyc.logging import CloudLoggerlogger=CloudLogger(iam_token='t1.9...', # your tokenlog_group_id='e230...' # your cloud logger group id)logger.trace(message='iam here')logger.debug(message='iam here')logger.info(message='iam here')logger.warn(message='iam here')logger.error(message='iam here')logger.fatal(message='iam here')#OR# if u are using insede cloud function or imside vm# apply service account with rights logging.writerCloudLogger(log_group_id='e230...' # your cloud logger group id).warn(message='iam here')# OR if you have a service account keysa_key = {"id": "...","service_account_id": "...","private_key": "..."}CloudLogger(service_account_key=sa_key,log_group_id='e230...' # your cloud logger group id).warn(message='iam here')logger.trace(message='iam here')logger.debug(message='iam here')logger.info(message='iam here')logger.warn(message='iam here')logger.error(message='iam here')logger.fatal(message='iam here')#OR# if you have a service account key file# Obtain it with yandex cloud cli#account shoud have rights 'logging.writer'# >yc iam key create --service-account-name [service_account_name] --output sa_key.jsonCloudLogger(service_account_file='sa_key.json',log_group_id='e230...' # your cloud logger group id).warn(message='iam here')logger.trace(message='iam here')logger.debug(message='iam here')logger.info(message='iam here')logger.warn(message='iam here')logger.error(message='iam here')logger.fatal(message='iam here')
Package: nanpa-lookup
nanpa_lookupLook up callers in the North America Number Plan Adminstrator (NANPA) database. Useful for identifying source of robocalls.Quickstart$ pip install nanpa_lookupQuery the database for a number:$ nanpa_lookup -n 9072001234 --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATIONOr provide a file containing phone numbers:$ nanpa_lookup -f numbers.txt --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION
CELLCO PARTNERSHIP DBA VERIZON WIRELESS - NC
ONVOY, LLC - TN
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATIONPull Logs from AndroidGrab call log for last 30 days from a rooted Android phone via adb:$nanpa_lookup-a30--fieldcompany|sort|uniq-c|sort-n3ONVOY,LLC-TN3PEERLESSNETWORKOFTENNESSEE,4BELLSOUTHTELECOMMINCDBASOU4TELEPORTCOMMUNICATIONSAMERIC5NEWCINGULARWIRELESSPCS,LLC5ONVOY,LLC6LEVEL3COMMUNICATIONS,LLC-9Nomatchesfound11ILLINOISBELLTELCO27BRIGHTLINKCOMMUNICATIONS,LLCUsageusage: nanpa_lookup [-h] [-n N] [-f F] [-a A] [--field FIELD] [--query QUERY]
                    [--database DATABASE]

Look up number in NANPA database

options:
  -h, --help           show this help message and exit
  -n N                 number
  -f F                 file containing list of numbers
  -a A                 pull numbers from ADB device
  --field FIELD        print out specific field (company, npanxxy, type, ocn, email)
  --query QUERY        make arbitrary SQL query
  --database DATABASE  numbers databaseCaveatsThis does not work for robocalls which spoof the origin number, only for spammers making use of legitimate numbers from VOIP companies.  This may eventually be addressed bySTIR/SHAKEN.
Package: nanpy
Use your Arduino board with Python.http://pypi.python.org/pypi/nanpyOverviewNanpy is a library that use your Arduino as a slave, controlled by a master device where you run your scripts, such as a PC, a Raspberry Pi etc.The main purpose of Nanpy is making programmers’ life easier, providing them a powerful library to create prototypes faster and make Arduino programming a game for kids.from nanpy import ArduinoApi

a = ArduinoApi()
a.pinMode(13, a.OUTPUT)
a.digitalWrite(13, a.HIGH)I know, there are a lot of projects able to do that, but hey, Nanpy can do more!Nanpy is easily extensible and can theoretically use every library,
allowing you to create how many objects you want. We support OneWire, Lcd, Stepper, Servo, DallasTemperature and many
more…Let’s try to connect our 16x2 lcd screen on pins 7, 8, 9, 10, 11, 12 and show your first “Hello world”!from nanpy import Lcd

lcd = Lcd([7, 8, 9, 10, 11, 12], [16, 2])
lcd.printString('Hello World!')really straightforward now, isn’t it? :)Serial communicationNanpy autodetects the serial port for you, anyway you can manually
specify another serial port:from nanpy import SerialManager
connection = SerialManager(device='/dev/ttyACM1')and use it with your objectsfrom nanpy import ArduinoApi
a = ArduinoApi(connection=connection)
a.pinMode(13, a.OUTPUT)
a.digitalWrite(13, a.HIGH)You can specify how many SerialManager objects you want and control more
than one Arduino board within the same script.How to build and installFirst of all, you need to build the firmware and upload it on your
Arduino, to do that clone thenanpy-firmware repository on
Githubordownload it from
PyPi.git clone https://github.com/nanpy/nanpy-firmware.git
cd nanpy-firmware
./configure.shYou can now edit Nanpy/cfg.h generated file to configure your Nanpy
firmware, selecting the features you want to include and the baud
rate.To build and install Nanpy firmware, copy Nanpy directory under your
“sketchbook” directory, start your Arduino IDE, open Sketchbook ->
Nanpy and click on “Upload”.To install Nanpy Python library on your master device just type:pip install nanpyHow to contributeNanpy still needs a lot of work. You can contribute with patches
(bugfixing, improvements, adding support for a new library not included
in Nanpy yet, writing examples and so on), writing documentation,
reporting bugs, creating packages or simply spreading Nanpy through the
web if you like it :) If you have any doubt or problem, please contact
me atstagi.andrea@gmail.comDo you want to support us with a coffee? We need a lot of caffeine to
code all night long! if you like this project and you want to support
us,please donate using
PaypalLicenseThis software is released under MIT License. Copyright (c) 2012-2016
Andrea Stagistagi.andrea@gmail.com
Package: nansen-celo-etl
Celo ETL CLICelo ETL lets you convert blockchain data into convenient formats like CSVs and relational databases.QuickstartInstall Celo ETL CLI:pip3installcelo-etlExport blocks, actions and logs (Schema,Reference):>celoetlexport_blocks--start-block1--end-block500000\--output-diroutput--provider-urigrpcs://api.mainnet.celo.one:443Stream blocks, actions and logs to console (Reference):>pip3installcelo-etl[streaming]>celoetlstream--start-block500000-eblock,action,log--log-filelog.txt\--provider-urigrpcs://api.mainnet.celo.one:443For the latest version, check out the repo and call>pip3install-e.>python3celoetl.pyRunning Tests>pip3install-e.[dev,streaming]>exportCELOETL_PROVIDER_URI=grpcs://api.mainnet.celo.one:443
>pytest-vvRunning Tox Tests>pip3installtox
>toxRunning in DockerInstall Dockerhttps://docs.docker.com/install/Build a docker image> docker build -t celo-etl:latest .
 > docker image lsRun a container out of the image> docker run -v $HOME/output:/celo-etl/output celo-etl:latest export_blocks -s 1 -e 5499999 -b 1000 -o outRun streaming to console or Pub/Sub> docker build -t celo-etl:latest -f Dockerfile .
 > echo "Stream to console"
 > docker run celo-etl:latest stream --start-block 500000 --log-file log.txt
 > echo "Stream to Pub/Sub"
 > docker run -v /path_to_credentials_file/:/celo-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/celo-etl/credentials_file.json celo-etl:latest stream --start-block 500000 --output projects/<your-project>/topics/mainnet