Saravanan666/pypi-org huggingface dataset:
Package: ndb_prop_gen
Google Appengine ndb Property Generator written in python. You can convert json data into your custom ndb property by this library.What is this?Simple generator ofndb Property Subclass. Using json to define the property of the class.Source json sample{"name":"book","class":"Book","props":[{"name":"title","type":"String","default":""},{"name":"author","type":"String","default":""},{"name":"published","type":"DateTime","default":null},{"name":"price","type":"Float","default":10.0},{"name":"read","type":"Bool","default":false}]}Generated python sample# -*- coding: utf-8 -*-fromgoogle.appengine.extimportndb__all__=["Book","BookModel","BookProperty","LocalBookProperty"]classBook(object):def__init__(self,title="",author="",published=None,price=10.0,read=False):self._title=titleself._author=authorself._published=publishedself._price=priceself._read=read@propertydeftitle(self):returnself._title@propertydefauthor(self):returnself._author@propertydefpublished(self):returnself._published@propertydefprice(self):returnself._price@propertydefread(self):returnself._readdef_prepare_for_put(self):passdef_has_repeated(self):passdef_to_dict(self):passclassBookModel(ndb.Model):title=ndb.StringProperty(default="")author=ndb.StringProperty(default="")published=ndb.DateTimeProperty()price=ndb.FloatProperty(default=10.0)read=ndb.BooleanProperty(default=False)classBookProperty(ndb.StructuredProperty):def__init__(self,**kwds):super(BookProperty,self).__init__(BookModel,**kwds)def_validate(self,value):assertisinstance(value,Book)def_to_base_type(self,value):returnBookModel(title=value.title,author=value.author,published=value.published,price=value.price,read=value.read,)def_from_base_type(self,value):returnBook(title=value.title,author=value.author,published=value.published,price=value.price,read=value.read,)classLocalBookProperty(ndb.StructuredProperty):def__init__(self,**kwds):super(LocalBookProperty,self).__init__(BookModel,**kwds)def_validate(self,value):assertisinstance(value,Book)def_to_base_type(self,value):returnBookModel(title=value.title,author=value.author,published=value.published,price=value.price,read=value.read,)def_from_base_type(self,value):returnBook(title=value.title,author=value.author,published=value.published,price=value.price,read=value.read,)Please see theexampledirectory for more examples.UsageInstall ndb_prop_gen via pippipinstallndb_prop_genCall generate methodvia command linendb_prop_gentest.jsonvia python codeimportndb_prop_genasnpg# noqa# filename is the json's filenamenpg.generate(filename)LICENSEMIT
Package: ndb-py
ndb-py is a light node database for Python.Flexible Data ModelExpressive Query LanguageEasy to use in PythonInstallationThe lastest stable is ndb-py-1.1.tar.gzpythonsetup.pyinstallGetting Startdemo for ndb-py:importndbself.node=ndb.read('example.ndb')reslt=ndb.execute(self.node,'select:root->parent->child->name:/.*m/')print(result[0].get('name'))print(result[1].get('name'))DocumentationBasic documentation is hosted on README.mdLicensendb-py is licensed under the Apache License, Version 2.0. See LICENSE for full license text
Package: ndbunq
Unique constraints for Google Appengine NDBNDBUnq emulates unique constraints on Google Appengine Datastore using
NDB hooks.ExampleThere is full working example for Flask:https://github.com/vmihailenco/ndbunq-example/:import ndbunq
from google.appengine.ext import ndb


class User(ndbunq.Model):
    username = ndb.StringProperty(required=True)

    class Meta:
        # username is guaranteed to be unique
        unique = (('username',),)
Package: ndbviewer
Step 1: To your existing code add:import mock
from flask import Flask
from google.cloud import ndb
import google.auth.credentials
import osos.environ["DATASTORE_DATASET"] = "test"
    os.environ["DATASTORE_EMULATOR_HOST"] = "127.0.0.1:8001"
    os.environ["DATASTORE_EMULATOR_HOST_PATH"] = "127.0.0.1:8001/datastore"
    os.environ["DATASTORE_HOST"] = "http://127.0.0.1:8001"
    os.environ["DATASTORE_PROJECT_ID"] = "test"
    
    credentials = mock.Mock(spec=google.auth.credentials.Credentials)step 1.5 Anywhere you want to test the database add:
client = ndb.Client(project="test", credentials=credentials)
with client.context():Alternatively you can use the example project athttps://github.com/ReddingSoftware/Google_NDB_EmulatorStep 2: Install google cloud SDK if you haven't already done sohttps://cloud.google.com/sdk/docs/installStep3: After navigating to your project folder in your terminal run:gcloud components install cloud-datastore-emulator(if you want more on datastore-emulator go tohttps://cloud.google.com/datastore/docs/tools/datastore-emulator)Step 4: in your terminal run:
pip install ndbviewerStep 5: add the requirements.txt info to your current requirements.txt and in your terminal run:
pip install -r requirements.txtStep 6: in your terminal run:
gcloud beta emulators datastore start --data-dir=. --project test --host-port "127.0.0.1:8001"Step 7: Open a new terminal but leave the emulator terminal running. This can be done in visual studio code by clicking the plus sign on choosing Terminal and New Terminal.Step8: Make sure you are still navigated to the NDBEmulator folder in your terminal.Step 9: in your new terminal run:
For mac:
export FLASK_APP=main
(press return)
export FLASK_ENV=development
(press return)
flask run
For PC:
set FLASK_APP=main
(press return)
set FLASK_ENV=development
(press return)
flask runAlternatively, you can run:
    python3 main.py

 or just

    python main.py

For info on how to run Flask from the command line on Visual Studio Code go here https://docs.google.com/document/d/1bbWogGdQ48rMJFB9Wxvtt7XWw5SUfP07BVl6cHk69hk/edit?usp=sharingStep 10: in your browser go tohttp://127.0.0.1:5000(you'll see the main page)Step 11: add data to your test database. If you don't know how to add data you can use the example project athttps://github.com/ReddingSoftware/Google_NDB_Emulatorstep12: in your browser go tohttp://127.0.0.1:5000/ndbviewerstep13: Choose the ndb Kind that you want to view
Package: ndb-x
Inspired by pythons newasyncio, this package implements the most basic synchronization primitives to work with ndb’s tasklets for the Google AppEngine (GAE)Installpip installndb-xUsageWe have the three primitivesLock,SemaphoreandBoundedSemaphore. Usage is, what you expect, straightforward:from google.appengine.ext import ndb
from ndbx.locks import Lock


lock = Lock()


@ndb.tasklet
def work_async():
    # using a context-manager will release the lock automatically
    with (yield lock.acquire()):
        rv = yield do_something_async()


@ndb.tasklet
def traditional_flow():
    yield lock.acquire()
    try:
        # do something
    finally:
        lock.release()
Package: ndc
Numerical Differentiation Leveraging Convolution (ndc)What for?Differentiate signals stored as PyTorch tensors, e.g. measurements obtained from a device or simulation, where automatic differentiation can not be applied.FeaturesTheoreticallyany order, any stencils, and any step size(seethis Wiki pagefor information). Be aware that there are numerical limits when computing the filter kernel's coefficients, e.g. small step sized and high orders lead to numerical issues.Works formultidimensional signals, assuming that all dimensions share the same step size.Computations can be executed onCUDA. However, this has not been tested extensively.Straightforward implementation which you can easily adapt to your needs.How?The idea of this small repository is to use the duality between convolution, i.e., filtering, andnumerical differentiationto leverage the existing functions for 1-dimensional convolution in order to compute the (time) derivatives.Why PyTorch?More often then not I received (recorded) simulation data as PyTorch tensors rather than numpy arrays.
Thus, I think it is nice to have a function to differentiate measurement signals without switching the data type or computation device.
Moreover, thetorch.conv1dfunction fits perfectly for this purpose.CitingIf you use code or ideas from this repository for your projects or research, please cite it.@misc{Muratore_ncd,
  author = {Fabio Muratore},
  title = {ndc - Numerical differentiation leveraging convolutions},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/famura/ndc}}
}InstallationTo install the core part of the package runpip install ndcFor (local) development install the dependencies withpip install -e .[dev]UsageConsider a signalx, e.g. a measurement you obtained form a device. This package assumes that the signal to differentiate is of shape(num_steps, dim_data)importtorchimportndc# Assuming you got x(t) from somewhere.assertisinstance(x,torch.Tensor)num_steps,dim_data=x.shape# Specify the derivative. Here, the first order central derivative.stencils=[-1,0,1]order=1step_size=dt# should be known from your signal x(t), else use 1padding=True# if true, the initial and final values are repeated as often as necessary to match the  length of xdx_dt_num=ndc.differentiate_numerically(x,stencils,order,step_size,padding)assertdx_dt_num.device==x.deviceifpadding:assertdx_dt_num.shape==(num_steps,dim_data)else:assertdx_dt_num.shape==(num_steps-sum(s!=0forsinstencils),dim_data)ContributionsMaybe you want another padding mode, or you found a way to improve the CUDA support. Please feel free to leave a pull request or issue.
Package: ndcc
ndcc - NFL Draft Capital ComparatorA simple CLI App
to compare the value
of up to 32 NFL draft pick collections
with one another.
This can be useful when trying to determine
which team in the draft has the most draft capital,
or by how much a team increased
or decreased their capital
with their draft day (pick) trades.
The most obvious use case however is to determine
who won a pick trade according to different value charts.For now,
these are the charts one can choose between to determine value:Jimmy JohnsonRich HillFitzgerald/SpielbergerKevin Meers (Harvard Sports Analysis)PFF WARMichael Lopez (blended curve)Chase StuartTo account for drafts with a lot of compensatory picks,
each chart is "prolonged" to 270 picks,
using estimates on what the remaining values would be.installationpipinstallndccusagepython-mndccadding chartsTo add another chart,
simply add a column in charts.csv,
fill in the values
and add the column name
and chart name
you want to be presented with
to the values
(and default_values,
if you want the chart to be selected by default)
of the checkboxlist_dialog
in input.get_selected_charts().
Package: ndcube
ndcubeis an open-source SunPy affiliated package for manipulating, inspecting and visualizing multi-dimensional contiguous and non-contiguous coordinate-aware data arrays.It combines data, uncertainties, units, metadata, masking, and coordinate transformations into classes with unified slicing and generic coordinate transformations and plotting/animation capabilities.
It is designed to handle data of any number of dimensions and axis types (e.g. spatial, temporal, spectral, etc.) whose relationship between the array elements and the real world can be described by World Coordinate System (WCS) translations.Acknowledging ndcubeIf you usendcubeis your work, we kindly ask you toacknowledge ndcubein your
publications and presentations.InstallationFor detailed installation instructions, see theinstallation guidein the ndcube docs.Getting HelpFor more information or to ask questions about ndcube, check out:ndcube Documentationndcube Element ChannelContributingIf you would like to get involved, check out theNewcomers Guidesection of the sunpy docs.
This shows how to get setup with a “sunpy” workflow but the same applies for ndcube, you will just need to replace sunpy with ndcube.Help is always welcome so let us know what you like to work on, or check out theissues pagefor the list of known outstanding items.Code of ConductWhen you are interacting with the SunPy community you are asked to follow ourCode of Conduct.
Package: ndd-forked-keycloak
This repo contains a python client forKeycloak.
Documentation is available inhttps://keycloak-client.readthedocs.ioInstallationpip install keycloak                       # install only client   
pip install "keycloak[docs]"               # install client + sphinx   
pip install "keycloak[extensions]"         # install client + django/flask/starlette   
pip install "keycloak[docs,extensions]"    # install client + sphinx + django/flask/starletteWeb Framework SupportWe provide prebuilt middlewares for the following frameworksFlaskStarletteDjango
Package: ndd-rest-tools
Usagejson_config_file_path = "/path/to/file/json"client = ApiClient(json_config_file_path)data = client.make_request('example1')JSON Format{"name":"apiendpoints","description":"hello","config":{"example1":{"method":"GET","url":"https://gorest.co.in/public/v1/users","header":{"Content-Type":"application/json"},"parameters":{"hello":"world"},"save_response":false}}}
Package: ndd-tools
LoggerMixinusagefrom ndd_tools import LoggerConfig, LoggerMixin
class A(LoggerMixin):
    def __init__(self, logger_config: LoggerConfig, *args, **kwargs):
        self.set_logger_up(logger_config)

        # to enable debug mode: log message send to console
        self.set_logger_debug_mode(True)

        # to disable debug mode:
        self.set_logger_debug_mode(False)

        # to change log level, change in config or method
        self.set_logger_level(loggingLevel)

        # to add file handler
        self.add_logger_file_handler(file_path: str, file_name: str, [formatter])

        # get current logger config
        self.get_logger_config()

        # incase you want create new logger
        # recreate new logger_config then use
        self.set_logger_up(new_logger_config)



    def run(self):
        self.debug('this is debug log message')
        self.info('this is info log message')
        self.warn('this is warn log message')
        self.error('this is error log message')
        self.critical('this is critical log message')exampleApiClientusagejson_config_file_path = "/path/to/file/json"  
client = ApiClient(json_config_file_path)  
data = client.make_request('example1', header_dict, body_dict)json format example{"name":"apiendpoints","description":"hello","config":{"example1":{"method":"GET","url":"https://gorest.co.in/public/v1/users","header":{"Content-Type":"application/json"},"parameters":{"hello":"world"},"save_response":false}}}
Package: ndef
Release v0.2 – January 7th, 2020Thendefmodules provides methods for encoding and decoding messages and records in the NDEF format according to NFC
Forum technical specification. Its main purpose is to provide comprehensive verification of raw NDEF messages. It can be
used to verify messages before writing them to an actual tag.Available onPyPI.UsageValid Message>>> import ndef
>>> message_data = 'D1010F5402656E48656C6C6F20776F726C6421'.decode('hex')
>>> message = ndef.NdefMessage(message_data)
>>> record = message.records[0]
>>> record.tnf
1
>>> record.type
'T'
>>> record.id
>>> record.payload
'\x02enHello world!'
>>>Invalid Message>>> import ndef
>>> message_data = '9901050155610123456761'.decode('hex')
>>> message = ndef.NdefMessage(message_data)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ndef\ndef.py", line 274, in __init__
    self.verify()
  File "ndef\ndef.py", line 278, in verify
    self._verify_begin_end()
  File "ndef\ndef.py", line 296, in _verify_begin_end
    raise InvalidNdefMessage("last record's ME flag is off")
ndef.ndef.InvalidNdefMessage: last record's ME flag is off
>>>Create Message>>> import ndef
>>> text_record = (ndef.TNF_WELL_KNOWN, ndef.RTD_TEXT, 'id', 'hello world')
>>> text_message = ndef.new_message(text_record)
>>> text_raw_ndef = text_message.to_buffer()
>>> text_raw_ndef.encode('hex')
'd9010b0254696468656c6c6f20776f726c64'
>>>Alternativesnfcpy: full implementation of spec including actual communication codePython NDEF library and tools: aimed at security researchpynfc: pythonic interface for the libnfc libraryLicenseCopyright (c) 2014 Amir Szekely

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

   1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.

   2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

   3. This notice may not be removed or altered from any source
   distribution.
Package: ndeflib
Thendeflibis anISC-licensed Python package for parsing and generating NFC Data Exchange Format (NDEF) messages:>>>importndef>>>hexstr='9101085402656e48656c6c6f5101085402656e576f726c64'>>>octets=bytearray.fromhex(hexstr)>>>forrecordinndef.message_decoder(octets):print(record)NDEF Text Record ID '' Text 'Hello' Language 'en' Encoding 'UTF-8'
NDEF Text Record ID '' Text 'World' Language 'en' Encoding 'UTF-8'>>>message=[ndef.TextRecord("Hello"),ndef.TextRecord("World")]>>>b''.join(ndef.message_encoder(message))==octetsTrueThendeflibdocumentation can be found onRead the Docs, the code onGitHub. It iscontinously testedfor Python 2.7 and 3.5 with pretty completetest coverage.
Package: ndeftool
Thendeftoolis a command line utility to create or inspect NFC
Data Exchange Format (NDEF) records and messages, released under theISClicense.$ndeftooltext"Hello World"id"r1"uri"http://nfcpy.org"save-k"message.ndef"printSaving2recordstomessage.ndef.NDEFTextRecordID'r1'Text'Hello World'Language'en'Encoding'UTF-8'NDEFUriRecordID''Resource'http://nfcpy.org'Thendeftooldocumentation can be found onRead the Docsand the code onGitHub.
Package: ndexgenehancerloader
NDEx GeneHancer Content LoaderLoads GeneHancer database to NDExFree software: MIT licenseDocumentation:https://ndexgenehancerloader.readthedocs.io.Dependenciesndex2ndexutilCompatibilityPython 3.3+Installationgit clone https://github.com/ceofy/ndexgenehancerloader
cd ndexgenehancerloader
make dist
pip install dist/ndexloadgenehancer*whlRunmakecommand with no arguments to see other build/deploy options including creation of Docker imagemakeOutput:clean                remove all build, test, coverage and Python artifacts
clean-build          remove build artifacts
clean-pyc            remove Python file artifacts
clean-test           remove test and coverage artifacts
lint                 check style with flake8
test                 run tests quickly with the default Python
test-all             run tests on every Python version with tox
coverage             check code coverage quickly with the default Python
docs                 generate Sphinx HTML documentation, including API docs
servedocs            compile the docs watching for changes
testrelease          package and upload a TEST release
release              package and upload a release
dist                 builds source and wheel package
install              install the package to the active Python's site-packages
dockerbuild          build docker image and store in local repository
dockerpush           push image to dockerhubConfigurationThendexloadgenehancer.pyrequires a configuration file in the following format be created.
The default path for this configuration is~/.ndexutils.confbut can be overridden with--confflag.Format of configuration file[<value in --profile (default ndexgenehancerloader)>]

user = <NDEx username>
password = <NDEx password>
server = <NDEx server(omit http) ie public.ndexbio.org>Example configuration file[ndexgenehancerloader_dev]

user = joe123
password = somepassword123
server = dev.ndexbio.orgNeeded filesTODO:Add description of needed filesUsageFor information invokendexloadgenehancer.py -hExample usageTODO:Add information about example usagendexloadgenehancer.py # TODO Add other needed arguments hereVia DockerExample usageTODO:Add information about example usagedocker run -v `pwd`:`pwd` -w `pwd` ceofy/ndexgenehancerloader:0.1.0 ndexloadgenehancer.py --conf conf # TODO Add other needed arguments hereCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-10-23)First release on PyPI.
Package: ndexr-reddit
Installationsudo python setup.py installpython3 -m pip install --upgrade setuptools wheelsudo python3 setup.py sdist bdist_wheelpython3 -m pip install --upgrade twinetwine upload --repository-url https://test.pypi.org/legacy/ dist/*pip install ndexr_numdatapython3 -m twine upload dist/*UsageInitialization is not required for using methods in ndexr_numdatafrom ndexr_numdata import calculate
calculate.calculate_cube(3)
Package: ndexr-redditor
Installationpython setup.py installpython3 -m pip install --upgrade setuptools wheelpython3 setup.py sdist bdist_wheelpython3 -m pip install --upgrade twinetwine upload --repository-url https://test.pypi.org/legacy/ dist/*pip install ndexr_redditorpython3 -m twine upload dist/*UsageInitialization is not required for using methods in ndexr_numdatafrom ndexr_numdata import calculate
calculate.calculate_cube(3)
Package: ndex-utils
# ndex-python-utilitiesIn addition to python, these utilities require some additional modules.To install these modules, type the following commands:`shell pip install requests pip installrequests-toolbeltpip install ndex `Utility Scripts:In all scripts that have arguments username and password, these will be the username and password for the NDEx account that you are using.upload-to-ndex.py`shell pythonupload-to-ndex.py<username> <password> <directory> `Where <i>directory</i> contains all of the network files you want to upload.create_network_from_tsv.py`shell python create_network_from_tsv.py <username> <password> <ndex server> <tsv file> <import plan file> <network name> <network description> `change_network_descriptions.pychange_network_versions.pymake_networks_public.pymake_networks_private.pydelete_all_networks.pyget_user_account_statistics.pydownload_pc_pathways.py`shell download_pc_pathways.py <datasource> <format> `
Package: ndex-utils-dev
# ndex-python-utilitiesIn addition to python, these utilities require some additional modules.To install these modules, type the following commands:`shell pip install requests pip installrequests-toolbeltpip install ndex `Utility Scripts:In all scripts that have arguments username and password, these will be the username and password for the NDEx account that you are using.upload-to-ndex.py`shell pythonupload-to-ndex.py<username> <password> <directory> `Where <i>directory</i> contains all of the network files you want to upload.create_network_from_tsv.py`shell python create_network_from_tsv.py <username> <password> <ndex server> <tsv file> <import plan file> <network name> <network description> `change_network_descriptions.pychange_network_versions.pymake_networks_public.pymake_networks_private.pydelete_all_networks.pyget_user_account_statistics.pydownload_pc_pathways.py`shell download_pc_pathways.py <datasource> <format> `