Saravanan666/pypi-org huggingface dataset:
Package: nkit4py
Introduction============nkit4py - is a nkit C++ library port to Python (see https://github.com/eye3/nkit.git).With nkit4py module you can convert XML string to Python data and vise versa.With XML-to-Python-data possibilities you can:----------------------------------------------- Simply convert XML to Python data with the same structure.Usual Python Dict objects as well as collections.OrderedDict objects can be created.- Convert XML to Python data with the structure, which is different from the structureof XML source (using mapping).- Create multiple Python structures from one XML source.- Explicitly identify those elements and attributes in XML source that youwant to use for building Python data structures.Thus, it's possible to filter out unnecessary XML-data.- Explicitly define Python type of scalar (primitive) data,fetched from XML source.Integers, numbers, strings, datetimes and booleans are supported.- Control progress of chunked download and parsing of big XML string- With extra options you can tune some aspects of conversion:- trim text data- explicitly define white space characters for trim option- choose unicode or string type for text data- define special key to collect all element attributesConversion is carried out using SAX parser Expat, so it's fast and uses lessmemory when parsing huge XML files.Module supports not only native Expat XML encodings, but also many others(see /deps/nkit/src/encoding/langs.inc)With Python-data-to-XML possibilities you can:----------------------------------------------- Create xml string with the same structure as Python data- Define root element name of result xml string- Define default element name for list items- Define encoding of result xml string- Pretty print with custom indentation and newline characters- Define special object key name for attributes- Define special object key name for text- Define which elements of result xml string must contain CDATA section- Define precision for float numbers- Define format for Date objects- Define representation for *True* and *False* values- Explicitly define order in which DICT keys will be printed to XML textInstallation============On Linux and Mac OS-----------------pip install nkit4pyOn Windows----------Library compiles on MSVS Express version >= 2012.For MSVS 2012:SET VS90COMNTOOLS=%VS110COMNTOOLS%pip install nkit4pyFor MSVS 2013:SET VS90COMNTOOLS=%VS120COMNTOOLS%pip install nkit4pyUsage=====See https://github.com/eye3/nkit4pyPython version support========================2.6==2.7>=3.3Author======Boris T. Darchiev (boris.darchiev@gmail.com)On github: https://github.com/eye3Any feedback or pull request are welcome!
Package: nk-logger
# nk-loggerA python logger that plays nice with Datadog. It outputs logs using a json formatter, sending `WARNING`, `ERROR`, and `CRITICAL` logs to `stderr` and `DEBUG` and `INFO` logs to `stdout`.# Basic Usagepip install `git+https://github.com/NewKnowledge/nk-logger.git@<branch-name or commit-hash>#egg=nk_logger`. Typically, this is done by adding it to `requirements.txt` (pip) or `environment.yml` (conda). Make sure git is installed on the system or container.At the top of each file that uses a logger, put:```from nk_logger import get_loggerlogger = get_logger(__name__)```Then use like:```logger.debug("this is content that usually won't be relevant")logger.info("this is important information")logger.info(f"here is information about this variable: {var}")logger.warning("something might be wrong here")logger.error("oh no, an error!")logger.exception("oh no, an error! let's log the stack trace.")```Note that `logger.exception(message)` is equivalent to `logger.error(message, exc_info=True)` and will automatically attach the exception information to the log.The `nk_logger` module reads the `LOG_LEVEL` and `SERVICE_NAME` environment variables and does basic configuration on module import.# ConfigureThe `nk_logger` module has two config parameters: `level` and `prefix`. By default they are set by the environment variables `LOG_LEVEL` and `SERVICE_NAME` upon import if they are provided, otherwise they are set to 'INFO' and '' respectively. By default the root logger's log level is also set to the same `level`. The `config_logger` function allows you to optionally override those defaults and explicitly set the default `level`, `prefix`, or `root_log_level`. Specifying the `root_log_level` allows the root logger to have a different level than the loggers generated by `get_logger`; this is useful for exposing (or muting) third-party logs (e.g. from `kafka` or `requests`).An example setup that would allow us to keep our own 'INFO' logs, but silence third-party logs below 'WARNING':```from nk_logger import config_loggerconfig_logger(level="INFO", root_log_level="WARNING")```If instead we are using a `config.py` file and want to keep third-party logs, the usage might look like:```from config import LOG_LEVEL, SERVICE_NAMEfrom nk_logger import config_logger, get_loggerconfig_logger(level=LOG_LEVEL, prefix=SERVICE_NAME)logger = get_logger(__name__)```# DetailsUpon configuration, `nk_logger` creates two log handlers: `out_handler` and `err_handler`. `out_handler` writes logs to stdout and filters out logs above 'INFO'. `err_handler` writes logs to stderr and ignores logs below 'WARNING'. Both handlers are attached to the root logger and set to the given log `level`. Any new logger created is not given any handlers, so will pass its logs up to the root logger's handlers to be processed. Third-party logs are also sent to the root logger and processed by the same handlers as internal logs, so they are also json-formatted.
Package: nkn-sdk
nkn-sdk-py3Installpipinstallnkn-sdkUsageImport libraryfromnknsdk.walletimportWalletCreate a new walletwallet=Wallet.new_wallet('pswd')Get wallet's json stringprint(wallet.to_json())Get wallet's addressprint(wallet.address)Transfer token to some addressprint(wallet.transfer_to(wallet.address,1,fee=0.00000001))Load wallet from a wallet json stringwallet_from_json=Wallet.load_json_wallet(wallet.to_json(),'pswd')Get wallet's json to dictprint(wallet_from_json.to_dict())Restore wallet from Ed25519 seedwallet_from_seed=Wallet.restore_wallet_by_seed(wallet.seed,'aaa')Verify whether an address is validprint(Wallet.verify_address(wallet.address))Verify password of the walletprint(wallet.verify_wallet_password('pswd'))Get balance of this walletprint(wallet.get_balance())Get balance of addressprint(Wallet.get_balance_by_addr(wallet.address))Get nonce for next transaction of this walletprint(wallet.get_nonce())Get nonce for next transaction of addressprint(Wallet.get_nonce_by_addr(wallet.address))Get wallet address of a nameprint(Wallet.get_address_by_name('somename'))
Package: nkpack
NKPackageThis is a library for agent-based modeling usingNK-framework(Kauffman, 1989). It is designed to ease binary vector manipulations and create performance landscapes.DependenciesThe package is mainly written innumpy.For faster performance, ajitcompiler bynumbais usedOther dependencies:scipyanditertoolsCodebase and contributionsThe package is based on the research needs at theDECIDE labin 2019-2020, and is by no means exhaustive. We will gladly accept pull requests and suggestions to improve the codebase, performance, usability, applicability. Forks are also welcome, but make sure to respect the MIT license.CreditsThe package is written by Ravshan S.K. Follow me on Twitter@ravshansk.
Package: nkparser
nkparsernkparseris a python library for parsingnetkeiba.comdata. nkparser only support to parse race (entry), odds, horse and results now.
Please note that this is a heavy load on thenetkeiba.comdepending on your usage.Installing nkparser and Supported Versionsnkparser is available on pip installation.$ python -m pip install nkparsernkparser officially supports Python 3.8+.Dependenciesrequestsbs4jqUsageTo loadnetkeiba.comdata and parse to dictionay file.Entry (出走データ)>>>importnkparser>>>nkdata=nkparser.load("entry","201206050810")>>>nkdata.info[{'race_id':'201206050810','race_number':10,'race_name':'有馬記念',...}]>>>nkdata.table[{'bracket':7,'horse_number':13,'horse_name':'ゴールドシップ',...},{...},...]Result (結果データ)>>>importnkparser>>>nkdata=nkparser.load("result","201206050810")>>>nkdata.info[{'race_id':'201206050810','race_number':10,'race_name':'有馬記念',...}]>>>nkdata.table[{'rank':1,'horse_name':'ゴールドシップ','rap_time':151.9,...},{...},...]Odds (オッズデータ)>>>importnkparser>>>nkdata=nkparser.load("odds","201206050810")>>>nkdata.table[{'horse_number':13,'win':2.7,'show_min':1.3,'show_max':1.5,...},{...},...]Horse (血統データ/出走履歴データ)>>>importnkparser>>>nkdata=nkparser.load("horse","2009102739")>>>nkdata.info[{'horse_id':'2009102739','father_name':'ステイゴールド',...}]>>>nkdata.table[{'race_date':'20151227','race_name':'有馬記念','rank':8,...},{...},...]If you execute bulk data load, you can userace_listfunction.# import modulesimportnkparser# bulk loadforrace_idinnkparser.race_list(2022,7):nkdata=nkparser.load("entry",race_id)This library generateCREATE TABLEsql for SQLite3.# import modulesimportnkparser# generate SQLsql=nkparser.create_table_sql("entry")print(sql)# CREATE TABLE IF NOT EXISTS entry (bracket text, ... weight_diff integer);
Package: nk-sent2vec
Sentence EmbeddingA python wrapper for embedding short texts or sentences usingsent2vec, which draws on FastText.To embed a list of stringsdocuments, use:from nk_sent2vec import Sent2Vec 

vectorizer = Sent2Vec(path = '/root/models/torontobooks_unigrams.bin')

print(vectorizer.embed_sentences(sentences=documents))TestingTests can be run usingpytest -s testsAlso seemakefilefor default commands
Package: nktail
—- nktail —-Usage:
$ nktail [options] <filename>Options:
By default, nktail will output the last 10 lines of the passed file. You can set any count of output lines using ‘-n’ option.$ nktail -n 100 <filename>```If you run nktail with ‘-f’ option, it displays the lines and then monitors the file. As new lines are added to the file by another process, tail updates the display.$ nktail -f <filename>As a module:from nktail import tail
tail(file_handler: BinaryIO, is_following: bool, number_of_lines: int, output_writer: Callable[[str], None])Enjoy!!!
Package: nkt-basik
NKT-basikInterface forNKT Photonics Basik fiber seed laser, only tested with a Y10 model.Consists of a class Basik which has the methods to modify wavelength, frequency, modulation, etc.InstallTo use the package install withpip install nkt_basikor install from source.Code Examplefromnkt_basikimportBasikdevice=Basik('COM4',1)# get the wavelength in nmprint(f'Device wavelength:{device.wavelength}nm')# get the frequency in GHzprint(f'Device frequency:{device.frequency:.4f}GHz')# get the temperature in Cprint(f'Device temperature:{device.temperature:.1f}C')# set the wavelength setpoint in nmprint('Setting the wavelength to 1086.77 nm')device.wavelength=1086.77# get the wavelength in nmprint(f'Device wavelength:{device.wavelength}nm')# enable emissionprint('Enable emission')device.emission=True# enable wavelength modulationdevice.modulation=True# get device errorsprint('Errors:',device.error)# get device statusprint('Status:',device.status)# disable emissionprint('Disable emission')device.emission=False# get device statusprint('Status:',device.status)TODOmore testingadd tests
Package: nkt-tools
This repository contains tools for accessing NKT photonics devices via python through the NKT SDKnkt_tools turns this:importNKTP_DLLasnktnkt.registerWriteU8('COM27',15,0x30,0x03,-1)into this:fromnkt_tools.extremeimportExtremelaser=Extreme()laser.set_emission(True)nkt_tools is a wrapper around NKT’s DLL to provide object oriented interaction with NKT products. NKT Extreme/Fianium lasers and the Varia system are currently supported. Additional systems can be accessed through the DLL by using the registerRead/Write functions within nkt_tools.NKTP_DLL or interested developers can write new modules by following the development notes provided.ReadtheDocs Page:https://nkt-tools.readthedocs.io/en/latest/PyPI Page:https://pypi.org/project/nkt-tools/Please also check out my related package, CataLight, which automates data collection and processing for photocatalysis research!ReadtheDocs Page:https://catalight.readthedocs.io/en/latest/PyPI Page:https://pypi.org/project/catalight/
Package: nkueamis
## Introduction
A simple tool to help get information in NKU-EAMIS(NKU Education Affairs Management Information System).## Install & Use
Use commandsudo pip3 install nkueamisto install, then just executenkueamiswith some options in your terminal;Or you can just clone this project and executepython3 nkueamis.pywith options.(If you use this method, make sure the dependencies are satisfied!)To upgrade this program, just executesudo pip3 install nkueamis –upgrade.## To be addedElect courses## Usagenkueamis -g <course_category> [-u <username> -p <password>]
nkueamis -c [-s <semester>]
nkueamis -c [-u <username> -p <password>]
nkueamis -c -s <semester> -u <username> -p <password>
nkueamis -e [-s <semester>]
nkueamis -e [-u <username> -p <password>]
nkueamis -e -s <semester> -u <username> -p <password>
nkueamis –elect-course## Argumentscourse_category      the category of courses which you want to query(only can be combination of A,B,C,D,E)
semester             the semester you want to query, must be in ‘[Year]-[Year]:[Semester]’ type
username             your username in NKU-EAMIS system
password             your password in NKU-EAMIS system## Options-ggrade query-ccourse query-eexam query-ssemester-uusername-ppassword--elect-courseelect-course-h,--helpguidance## Examplesnkueamis -g BCD
nkueamis -g ABCDE -u your_username -p your_password
nkueamis -c
nkueamis -c -s 2016-2017:2
nkueamis -e -u your_username -p your_password## Author
Blog:[Wanpeng Zhang](http://www.oncemath.com)E-mail:zawnpn@gmail.com## Others
See more information in [http://www.oncemath.com/nku-eamis.html](http://www.oncemath.com/nku-eamis.html).
Package: nl2query
nl2queryConvert natural language text inputs to Pandas, MongoDB, Kusto, and Cypher(Neo4j) queries. The models used are fine-tuned versions of CodeT5+ 220m models.Getting startedYou cangetnl2queryfrom PyPI, usingpython-mpipinstallnl2queryExample usage1. Pandas QuerySuppose you want to convert the textual question to pandas query, follow the code belowfromnl2queryimportPandasQuerytitanic=pd.read_csv('/path/titanic.csv')queryfier=PandasQuery(titanic,'titanic')queryfier.generate_query('''list all people who paid more fare than the fare paid by 'Braund, Mr. Owen Harris' ''')queryfier.generate_query('''find the names of passengers with age greater than 35 and containing Heath in their name''')queryfier.generate_query('''which cabinet has average age less than 21?''')#Groupby Query2. MongoDB QuerySuppose you want to convert the textual question to Mongo query, follow the code belowfromnl2queryimportMongoQueryimportpymongo# import if performing analysis using python clientkeys=['_id','index','passengerid','survived','Pclass','name','sex','age','sibsp','parch','ticket','fare','cabin','embarked']#keys present in the collection to be queried.queryfier=MongoQuery(keys,'titanic')queryfier.generate_query('''which pclass has the minimum average fare?''')keys=['_id','index','total_bill','tip','sex','smoker','day','time','size']queryfier=MongoQuery(keys,'tips')queryfier.generate_query('''find the day on which combined sales was highest''')In the above code the keys can be found by running the following piecedb.tips.find_one({}).keys()3. Kusto QuerySuppose you want to convert the textual question to Kusto query, follow the code belowfromnl2queryimportKustoQuerycols=['conference','sessionid','session_title','session_type','owner','participants','URL','level','session_location','starttime','duration','time_and_duration','kusto_affinity']queryfier=KustoQuery(cols,'ConferenceSessions')queryfier.generate_query('''find the session ids which have duration greater than 10 and having Manoj Raheja as the owner''')4. Cypher(Neo4j) QuerySuppose you want to convert the textual question to Cypher query, follow the code belowfromnl2queryimportCypherQuerynode_labels={'User':['display_name','uuid'],'Comment':['score','link','uuid']}relationships=['COMMENTED']queryfier=CypherQuery(node_labels,relationships)queryfier.generate_query('list the links of all the comments done by "jose_bacoy"')node_labels={'Case':['gender','reportdate','ageunit','reporteroccupation','primaryid','age','eventDate'],'Outcome':['code','outcome']}relationships=['RESULTED_IN']queryfier=CypherQuery(node_labels,relationships)queryfier.generate_query('find the outcomes of people who are female and below the age of 32')node_labels={'Person':['id','name','dob']}relationships=[]queryfier=CypherQuery(node_labels,relationships)res=queryfier.generate_query('find the dob of people who have "Andreia" in their name')ChangelogRefer to theCHANGELOG.mdfile.
Package: nl4dv
NL4DV:NaturalLanguage toolkitforDataVisualizationNL4DVtakes anatural language queryabout a givendatasetas input and outputs astructured JSON objectcontaining:Data attributes,Analytic tasks, andVisualizations (Vega-Lite specifications)With this output, developers canCreate visualizations in Python using natural language, and/orAdd a natural language interface to their existing visualization systems.Setup Instructions, API Documentation, and ExamplesThese can all be found onNL4DV's project website.CreditsNL4DV was created byArpit Narechania,Arjun Srinivasan,Rishab Mitra,Alex Endert, andJohn Staskoof theGeorgia Tech Visualization Lab.We thank the members of theGeorgia Tech Visualization Labfor their support and constructive feedback.Citations2020 IEEE TVCG Journal Full Paper (Proceedings of the 2020 IEEE VIS Conference)@article{narechania2020nl4dv,title={{NL4DV}: A {Toolkit} for Generating {Analytic Specifications} for {Data Visualization} from {Natural Language} Queries},shorttitle={{NL4DV}},author={{Narechania}, Arpit and {Srinivasan}, Arjun and {Stasko}, John},journal={IEEE Transactions on Visualization and Computer Graphics (TVCG)},doi={10.1109/TVCG.2020.3030378},year={2020},publisher={IEEE}}2022 IEEE VIS Conference Short Paper Track@inproceedings{mitra2022conversationalinteraction,title={{Facilitating Conversational Interaction in Natural Language Interfaces for Visualization}},author={{Mitra}, Rishab and {Narechania}, Arpit and {Endert}, Alex and {Stasko}, John},booktitle={2022 IEEE Visualization Conference (VIS)},url={https://doi.org/10.48550/arXiv.2207.00189},doi={10.48550/arXiv.2207.00189},year={2022},publisher={IEEE}}LicenseThe software is available under theMIT License.ContactIf you have any questions, feel free toopen an issueor contactArpit Narechania.
Package: nlatest-files
Easy symlinks to the n latest files in a directory.This is an tool that maintains symlinks to the n most recently modified
files in a given directory.Installationpip install nlatest-filesUsageusage: nlf [-h] [-c FILE] [--save] -d DIR [-n COUNT] [-u] [-s DIR] [-f FORMAT]
           [-q]

Args that start with '--' (eg. --save) can also be set in a config file
(/home/user/.config/nlatest-files.conf or specified via -c). Config file syntax
allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at
https://goo.gl/R74nmi). If an arg is specified in more than one place, then
commandline values override config file values which override defaults.

optional arguments:
  -h, --help            show this help message and exit
  -c FILE, --config FILE
                        config file location, defaults to
                        $XDG_CONFIG_HOME/nlatest-files.conf
  --save                if specified, saves the current configuration to the
                        config file
  -d DIR, --dir DIR     the source directory
  -n COUNT, --count COUNT
                        the latest n files to list, defaults to 1
  -u, --update-symlinks
                        create symlinks to the latest n files
  -s DIR, --symlink-dir DIR
                        the directory to create symlinks in, defaults to the
                        source directory
  -f FORMAT, --symlink-format FORMAT
                        the format string for symlinks, where {n} is the order
                        index, defaults to 'latest-{n}'. {n} must be included,
                        unless n = 1
  -q, --quiet           if specified, no status messages will be printed to
                        stderrExamplesnlf -d ~/invoices -n 5
    Prints the latest 5 files in ~/invoices

nlf -d ~/invoices -n 5 --save
    Saves the given parameters to the default config file

nlf -d ~/invoices -n 5 -c ~/dotfiles/myconfig.conf --save
    Saves the given parameters to the specified config file

nlf
    Prints the latest 5 again, using from the config file

nlf -u -s $HOME/screenshots -f "screeny-{n}" -n 3
    Creates symlinks to the top 3 latest screenshots in ~/screenshots

scrot -e 'mv -u $f ~/screenshots/ && nlf -u -d ~/screenshots -n 1 -f "latest"'
    Takes a screenshot with scrot, moves it to ~/screenshots, then
    adds a `symlink ~/screenshots/latest` pointing to itFuture Plans[ ] file extension specifier[ ] multiple source directories[ ] recursive search
Package: nlbq
nlbqNatural language interface to BigQueryGoogle credentialsThe Python BigQuery library expects the environment variableGOOGLE_APPLICATION_CREDENTIALS, which should point to a JSON file containing the credentials of a Google service account. You can create a service account and download its credentials from theGoogle Cloud Console. Then set the environment variable:exportGOOGLE_APPLICATION_CREDENTIALS=/path/to/your/google-service-account.jsonCreating a demo environmentmkdirdemo# Git will ignore this directorycddemo
python3-mvenvvenvsourcevenv/bin/activate
pipinstall-e../# Install the local package in editable modenlbqinit# generates prompt.txt, Dockerfile and index.html# make changes thenpipuninstallnlbq--yes;pipinstall-e../You can initialise with prepopulated BigQuery dataset table schema information withnlbqinit--tabledataset.table_idUsagenlbq--help