Saravanan666/pypi-org huggingface dataset:
Package: nimsp
A Python library for interacting with theNational Institute on Money in State Politics API.Released under a BSD-style license (see the LICENSE files for details).python-nimsp is a project of Sunlight Labs (c) 2011.
Written by Michael Stephens <mstephens@sunlightfoundation.com>.Source:http://github.com/sunlightlabs/python-nimspInstallationTo install from PyPI runpip install nimsporeasy_install nimspTo install from a source package runpython setup.py installExample Usage>>> from nimsp import nimsp
>>> nimsp.apikey = 'YOUR_API_KEY'
>>> corte = nimsp.candidates.list(state='tx', year=2008, candidate_name='Corte Jr, Frank')[0]
>>> print "$%d" % corte.total_dollars
$287372
>>> print corte.candidate_status
Won
Package: nina
nina:house:HomepageGenerate README.md and setup.py quickly!
Nina is a cli program that will helps you on generating readmes, licenses and setup.py answering some questions.And... the first version of this readme was maded withnina:)Version Notesnina v0.0.4 has multiplatform support.Installationpip install ninaTest CommandTo test the application, run the following command:python -m pytest testsRunTo run just tap in terminal:create-readmeAnd go ahead answering the questions ;)LicenseMITMIT LicenseCopyright (c) 2019 RRonald RodriguesPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.RestrictionsCoverage badge still works only withpytestAuthorLearn more about: Ronald RodriguesEmail:ronald-farias@outlook.comGithub :octocat:Twitter
Package: ninagram
NinagramNinagram is a Django app that let you build Telegram bots with the performant python-telegram-bot.Do you have a Django website and you plan to back a telegram bot to it ? Then This library is for you.
Even if you want to start a telegram bot from scratch you are good to go with NinagramInstallationpip install ninagramUsageFresh startcreate a new Django projectdjango-admin startproject myproject
cd myprojectcreate a new app for your projectpython manage.py startapp baseThen you can continue like with like an existing projectcreate the states.py file that will contain the bot codetouch base/states.pyadd 'ninagram' to your INSTALLED_APPS in settings.pythen add this configuration to your settings.pyNINAGRAM = {
"TOKENS": ['token_here'],
"STATES_MODULES": ['base.states'],
"WORKING_MODE": "polling",
}Then start the bot
python manage.py startbotPlease note that you should be connected to internet for the bot to work correctly
Package: ninchanese-datatables
InstallationThe package is available onPyPIand is tested on Python 2.7 to 3.4pipinstalldatatablesUsageUsing Datatables is simple. Construct a DataTable instance by passing it your request parameters (or another dict-like
object), your model class, a base query and a set of columns. The columns list can contain simple strings which are
column names, or tuples containing (datatable_name, model_name), (datatable_name, model_name, filter_function) or
(datatable_name, filter_function).Additional data such as hyperlinks can be added via DataTable.add_data, which accepts a callable that is called for
each instance. Check out the usage example below for more info.Examplemodels.pyclassUser(Base):__tablename__='users'id=Column(Integer,primary_key=True)full_name=Column(Text)created_at=Column(DateTime,default=datetime.datetime.utcnow)# Use lazy=joined to prevent O(N) queriesaddress=relationship("Address",uselist=False,backref="user",lazy="joined")classAddress(Base):__tablename__='addresses'id=Column(Integer,primary_key=True)description=Column(Text,unique=True)user_id=Column(Integer,ForeignKey('users.id'))views.py@view_config(route_name="data",request_method="GET",renderer="json")defusers_data(request):# User.query = session.query(User)table=DataTable(request.GET,User,User.query,["id",("name","full_name",lambdai:"User:{}".format(i.full_name)),("address","address.description"),])table.add_data(link=lambdao:request.route_url("view_user",id=o.id))table.searchable(lambdaqueryset,user_input:perform_some_search(queryset,user_input))returntable.json()template.jinja2<tableclass="table"id="clients_list"><thead><tr><th>Id</th><th>User name</th><th>Address</th></tr></thead><tbody></tbody></table><script>$("#clients_list").dataTable({serverSide:true,processing:true,ajax:"{{ request.route_url("data") }}",columns:[{data:"id","render":function(data,type,row){return$("<div>").append($("<a/>").attr("href",row.DT_RowData.link).text(data)).html();}},{data:"name"},{data:"address"}]</script>
Package: nindex
nindexClasses to provide efficient indexing and slicing operations into a list of objects by certain attribute key.InstallationpipinstallninstallUsageCreate your list of objects:classItem():def__init__(self,value,name):self.value=valueself.name=nameitems=[Item(1,"alpha"),Item(3,"beta"),Item(8,"gamma"),Item(22,"delta")]Wrap the list in a new Index, and specify which attribute will be the key:fromnindeximportIndexitemindex=Index(items,"value")Quickly look up objects by attribute key:# Look for the object with this exact valueitem=itemindex[3]print(item.name)# 'beta'# Look for the closest object with less than or equal to this valueitem=itemindex.le(20)print(item.name)# 'gamma'# Look for all objects with values in the given rangeitems=itemindex[2:22]#foriteminitems:print(item.name)# 'beta'# 'gamma'LimitationsThis withonlywork if:The list is sortedThe list doesn't changeThe keyed attributes don't changeThe keyed attributes contain no duplicate values
Package: nindo
NindoThis is an unofficial API for thenindo.dewebsite.Getting StartedTo get started you will have to import the Api and initialise it.fromnindoimportNindoApiApi=NindoApi()When thats done you can use the Api as follows:fromnindoimportNindoApiApi=NindoApi()Api.getVirals()Functions.getVirals()Returns a list of the currently Viral Posts..getCharts(platform)Returns a list of the current Charts for the given platform..getCoupons()Returns a list of Coupons..getUpcomingMilestones()Returns a list of Milestones that haven't been surpassed yet..getPastMilestones()Returns a list of Milestones that have already been surpassed.ClassesArtistArtist.name(String)Artist.id(String)ChannelChannel.id(String)Channel.avatar(String)Channel.last_post_id(String)PostPost.id(String)Post.platform(String)Post.timestamp(String)Post.title(String or None)Post.age_restricted(Boolean)Post.clickbait_score(String)Post.shitstorm_score(String)Post.shitstorm_score(String)Post.artist(Artist)Post.channel(Channel)ChartChart.id(String)Chart.rank(Integer)Chart.artists(Artist)Chart.rank(Integer)Chart.type(String)ViralViral.id(String)Viral.platform(String)Viral.timestamp(String)Viral.type(String)Viral.value(Integer)MilestoneMilestone.current_subs(Integer)Milestone.expected_time(String)Milestone.surpassed(Boolean)Milestone.channel(Channel)Milestone.artist(Artist)BrandBrand.id(Integer)Brand.name(String)Brand.url(String)Brand.branch(String)Brand.color(String)CouponCoupon.id(Integer)Coupon.timestamp(String)Coupon.discount(String)Coupon.code(String)Coupon.valid(Boolean)Coupon.validUntil(String)Coupon.url(String)Coupon.terms(String)Coupon.artist(Artist)Coupon.brand(Brand)TYPESThe TYPES class is not like the other classes, it is used to work with the functions that the API provides. e. g.fromnindoimportTYPES,NindoApiApi=NindoApi()Api.getCharts(TYPES.Charts.YOUTUBE)TYPES.Chart.YOUTUBE(String)TYPES.Chart.INSTAGRAM(String)TYPES.Chart.TWITTER(String)TYPES.Chart.TWITCH(String)TYPES.Chart.TIKTOK(String)TYPES.Chart.DISPLAY(Dictionary)
Package: ninebot-ble
Ninebot Scooter BLE Python clientPython client for interfacing with a Ninebot scooter using bluetooth low energy (BLE).It is primarely using the BLE UART characteristic for communication with the scooter. It is also
using the new encrypted protocol usingmiauthlibrary. Old
scooter firmwares might therefore not work.The projects primary objective is to support Home Assistant integration but will work for more
use-cases as well.UsageInstallation:pip install ninebot-bleA command-line client for testing purposes are shipped:ninebot-ble --helpTroubleshootI only have access to a Ninebot F-series scooter, if you have problems with other models, I will
need help with debugging.
Package: nineml
NineML (9ML) is a language for describing the dynamics and connectivity of
neuronal network simulations (http://nineml.net), which is defined by theNineML specification.The NineML Python Library is a software package written in Python, which maps
the NineML object model onto Python classes for convenient creation,
manipulation and validation of NineML models, as well as handling their
serialisation to and fromXML,JSON,YAML, andHDF5.LinksDocumentation:http://nineml-python.readthedocs.orgMailing list:NeuralEnsemble Google GroupIssue tracker:https://github.com/INCF/nineml-python/issuesRelation to the NineML SpecificationThe layout of the Python modules and classes in the NineML Python Library
relates closely to the structure of theNineML specification(v1.0). However,
there are notable exceptions where the NineML Python Library uses names and
relationships that are planned to be changed in v2.0 of the specification
(the NineML Python Library will be backwards compatible), such as the
renaming ofComponentClasselements to separateDynamics,ConnectionRuleandRandomDistributionelements
(seehttps://github.com/INCF/nineml/issues/94).
A full list of changes planned for NineML v2.0 can be found athttps://github.com/INCF/nineml/milestone/3. When serializing 9ML models
the version 1.0 syntax is used unless theversion=2keyword argument is
provided.In addition to classes that directly correspond to the 9ML object model, a
range of shorthand notations (“syntactic sugar”) exist to make writing 9ML
models by hand more convenient (see thenineml.sugarmodule). These
notations are frequently demonstrated in theexamplesdirectory of the
repository.The NineML CatalogTheNineML Catalogcontains a collection of validated NineML models, which
can be loaded and maninpulated with the NineML Python Library. If you create a
model that you believe will be of wider use to the computational neuroscience
community please consider contributing to the catalog via a pull request.InstallationHDF5 (dev)To add support to read or writeHDF5serialisations you must first install
aHDF5dev library (i.e. with the C headers).On macOSHDF5can be installed usingHomebrew:$ brew install hdf5On Ubuntu/DebianHDF5can be installed by one of the following packages:libhdf5-serial-dev (serial)libhdf5-openmpi-dev (parallel with Open MPI)libhdf5-mpich-dev (parallel with MPICH)If you don’t installHDF5the other serialisation formats can still be used
but you will need to install the package manually (i.e. not usepip).PipThe NineML Python Library can be installed usingpip:$ pip install ninemlcopyright:Copyright 20011-2017 by the NineML Python Library team, see AUTHORS.license:BSD 3, see LICENSE for details.
Package: ninemlcatalog
The NineML Catalog is a collection ofNineMLmodels written in XML. Seehttp://nineml.net/software/for a list of software that supportNineML.Also included is a simple Python module ‘ninemlcatalog’
for convenient access to the models stored in the catalog using theNineML Python library.EditorsThe NineML Catalog is maintained by the NineML committee
(http://nineml.net/committee).InstallationTo “install” the XML models in the NineML Catalog simply clone the repository
to somewhere sensible on your local computer (e.g. $HOME/git/nineml-catalog),
and then you can reference the models from other NineML documents using either
relative or absolute URLs. Before cloning, it is best to create a fork of the
central repo (https://github.com/INCF/nineml-catalog) so you can backup any
modifications to your own GitHub repo, and then open merge requests with the
central repo (seeContributing).To install the python module you will need to install theNineML Python library.
Then simply add the ‘python’ directory in the catalog repository to your
PYTHONPATH. OnceNineML Python libraryis installed you will then be able
to run the unit-tests by the command$ python -m unittest testfrom the git repository directory and it will attempt to load and validate
every model in the catalog.ContributingContributions to the catalog are most welcome. To add a model or amend an
existing one simply make the changes to your local model, push them to your
GitHub fork and open a pull request to the master branch of the INCF fork with
a brief explanation of what your model models or amendment fixes
(seehttps://help.github.com/articles/using-pull-requests/).To make merging with the central repository feasible it is strongly recommeded
that you make any distinct sets of changes in separate feature branches from
the central repo’s master branch and then merge them together to create your
“develop” branch of the catalog with all your customisations.Before opening a pull request, please add the author information and relevant
scientific citations to comments within the annotations block of the document.
It is also encouraged to create or link your model with an entry on
Open Source Brain
(seehttp://www.opensourcebrain.org/docs#Creating_Your_Own_Project).
Package: ninepatch
Slice Android style 9-patch images, resize and preview them interactively.Seehttps://developer.android.com/tools/help/draw9patch.htmlfor a
9-patch description.InstallationIf you want to use the interactive viewer read the additional
installation notes under "Interactive viewer".$ pip install ninepatchPython usagefrom ninepatch import Ninepatch
ninepatch = Ninepatch('ninepatch_bubble.9.png')
print(ninepatch.content_area)  # content_area(left=23, top=20, right=27, bottom=59)

# render the image to a specific size
scaled_image = ninepatch.render(500, 400) # creates a new PIL image

# render the image so it's content area fits (width, height)
image_fit = ninepatch.render_fit(300, 200)

# render the image so it wraps another PIL image
image_to_wrap = Image.open('image_to_wrap.png')
wrapped_image = ninepatch.render_wrap(image_to_wrap)Command line usageYour image must be a PNG image with a transparent background. The scale
and fill guide color must be 100% opaque black.Scale and open image in a viewer (PIL image.show()):$ ninepatch render ninepatch_bubble.9.png 300 300Save the scaled image to a new file:$ ninepatch render ninepatch_bubble.9.png 300 300 scaled.pngRender an image so it's content area fits a given width and height$ ninepatch fit ninepatch_bubble.9.png 150 150 fit.pngRender an image to include another image$ ninepatch wrap ninepatch_bubble.9.png image_to_wrap.png wrapped.pngSlice the 9patch into tiles:$ ninepatch slice ninepatch_bubble.9.png ./outputdirSlice the 9patch and return a JSON reprensentation of the slicing data:$ ninepatch info ninepatch_bubble.9.png{"marks":{"fill":{"x":[23,231],"y":[20,82]},"scale":{"x":[[49,49],[89,196]],"y":[[42,63]]}},"size":[258,141]}Interactive viewerInteractively resize and preview an image in a Tkinter viewer:$ ninepatch_viewer ninepatch_bubble.9.png

or just:

$ ninepatch_viewer

without arguments to see the demo imageIf you want to use the viewer then python-pil.imagetk has to be
installed.On Ubuntu do:$ sudo apt-get install python-pil.imagetkIf you want to install into a virtualenv, pip needs the following
packages to compile PIL with Tkinter support:$  sudo apt-get install python-tk tk8.6-dev(You can trigger a recompile of PIL with: "pip install -I ninepatch")Changelog0.2.0:   -   allow 0-size tiles, now works with pillow >=10.0.00.1.22:   -   fixed error that prevented the ninepatch_viewer to work0.1.21:   -   fixed bug in wrap()0.1.20:   -   new commands fit and wrap courtesy of Nicolas Laurance0.1.19:   -   fixed error in caching0.1.18:   -   optional caching for slice() and render()0.1.17:   -   new method export_slices()
-   changed command line parameters (render/slice)...
Package: ninetales
ninetales - A Python library to convert between Python data model paradigmsThe fox spirit is an especially prolific shapeshifterThere are a few too many ways of describing a data model in Python--see below code chunk for a non-comprehensive list. All of them represent the same concept, but have different approaches in their philosophies and implementations. This library strives, to a reasonable and useful extent, to provide a seamless translation between them.fromdataclassesimportdataclassfromtypingimportNamedTuple,TypedDictfromcollectionsimportnamedtupleimportattrsimportmsgspecimportpydantic@dataclassclassFooDataclass:bar:strbaz:int=1classFooNamedTuple(NamedTuple):bar:strbaz:int=1# `typing.TypedDict` does not allow right hand side assignmentclassFooNamedTuple(TypedDict):bar:strbaz:int# Attributes can be specified via:# - a sequence of strings (as below)# - a single string with each field name separated by whitespace# and/or commas (e.g., "bar baz", "bar, baz")FooNamedTuple2=namedtuple("FooNamedTuple2",["bar","baz"])@attrs.defineclassFooAttrs:bar:strbaz:int=1FooAttrs2=attrs.make_class("FooAttrs2",{"bar":attrs.field(type=str),"baz":attrs.field(type=int,default=1)})classFooMsgspec(msgspec.Struct):bar:strbaz:int=1classFooPydantic(pydantic.BaseModel):bar:strbaz:int=1FooPydantic2=pydantic.create_model("FooPydantic2",bar=(str,...),baz=(int,1))EtymologyNinetalesis a Pokemon loosely based on thenine-tailed fox, mythical fox entity in Chinese, Korean, Vietnamese, and Japanese folklore. "The fox spirit is an especially prolific shapeshifter", is the approach this library takes to converting between Python data model paragigms.InstallationFor the time being and until we have a stable enough API:gitclonegit@github.com:gorkaerana/ninetales.gitcdninetales
python3-mvenv.venv
..venv/bin/activate
python3-mpipinstall-Upip
python3-mpipinstall.DevelopmentIm usingryewithuvbackend:gitclonegit@github.com:gorkaerana/ninetales.gitcdninetales
ryesync
Package: nineties
NinetiesEase the reading of relics from the Nineties.License: MITDocumentationUser and developerdocumentation of nineties.Bug TrackerFeature requests and bug reports are bested entered in thetodos of nineties.Primary Source repositoryThe primary source repository ofnineties is at sourcehuta collection of tools useful for software development.Random NotesWhat is inA small, maybe growing collection of parsers and filters
to ease dealing with specific information structures that
drop off of REST backends ;-)What is out (for now)Everything else (for now)StatusExperimentalNote: The default branch isdefault.
Package: ningen
This package allows a Python script to use file system operations (such asglob) and/or apply
any other logic (such as reading structured configuration files) to generate abuild.ninjafile.This isn’t intended to replace “high level” build systems such ascmake. Rather, think of it as
replacing the clunky GNUmakelanguage with Python.Yes,ninjadoes provide theninja_syntaxmodule which already does this. The added value ofningenis:Convenience functions for pattern-based build file generation.Allow overriding build statements (which complements the pattern-based approach).InstallationJustpip install ningen(or the equivalent in whatever Python environment you are using).UsageTheWriterclass is similar to the one inninja_syntax. Two additional utility functions are
provided:foreachfor iterating on all combinations of several variables, possibly extracting
them from existing file names; andexpandfor generating formatted strings using all the
variable combinations.For example:importningenasng# Similarly to ninja_syntax writer, but internally buffers everything:writer=ng.Writer()modes=['debug','release']objects=[]writer.rule('compile_debug',...)writer.rule('compile_release',...)# Ningen provides the "foreach" function,# which iterates on existing files and/or variable values:forcinng.foreach('src/{*name}.cc',mode=modes):objects.append(name)writer.build(f'obj/{c.mode}/{c.name}.o',f'compile_{c.mode}',inputs=[c.path,...],...)# Since it buffers the data, ningen allows overriding previous build statements:writer.rule('special_compile_debug',...)writer.build('obj/debug/special.o','special_compile_gcc',inputs=['src/special.cc',...],...,override=True)# Ningen also provides the "expand" function which formats multiple strings:formodeinmodes:writer.build('bin/{mode}/program',f'link_{mode}',inputs=ng.expand('obj/{mode}/{object}.o',mode=mode,object=objects))# Actually write the buffered ninja build file (by default, to "build.ninja"):writer.write()