Saravanan666/pypi-org huggingface dataset:
Package: caryocar
CaryocarCaryocar is a Python package for building Species-Collector Networks (SCNs) and Collector CoWorking Networks(CWNs) models from species occurrence data, as introduced in myMSc thesis.
SCNs and CWNs extend the social network analytics and can be used for understanding the social structure behind biological collections.
This package is built on top ofNetworkX.Supporting documentsNew perspectives on analyzing data from biological collections based on social network analytics [MSc thesis].On the social structure behind biological collections [Preprint].Package documentation coming soon...Example UsageCreate a Species-Collector Network (SCN) from a list of collectors and species:>>> cols=[ ['col1','col2','col3'],
           ['col1','col2'],
           ['col2','col3'],
           ['col4','col5'],
           ['col4'],
           ['col5','col4'] ]

>>> spp=['sp1','sp2','sp3','sp2','sp3','sp2']

>>> scn = SpeciesCollectorsNetwork( species=spp, collectors=cols )

>>> scn.nodes(data=True)
{ 'sp1': {'bipartite': 1, 'count': 1}, 
  'col1': {'bipartite': 0, 'count': 2}, 
  'col2': {'bipartite': 0, 'count': 3}, 
  'col3': {'bipartite': 0, 'count': 2}, 
  'sp2': {'bipartite': 1, 'count': 3}, 
  'sp3': {'bipartite': 1, 'count': 2}, 
  'col4': {'bipartite': 0, 'count': 3}, 
  'col5': {'bipartite': 0, 'count': 2} }

>>> scn.edges(data=True)
[ ('sp1', 'col1', {'count': 1}), 
  ('sp1', 'col2', {'count': 1}), 
  ('sp1', 'col3', {'count': 1}), 
  ('col1', 'sp2', {'count': 1}), 
  ('col2', 'sp2', {'count': 1}), 
  ('col2', 'sp3', {'count': 1}), 
  ('col3', 'sp3', {'count': 1}), 
  ('sp2', 'col4', {'count': 2}), 
  ('sp2', 'col5', {'count': 2}), 
  ('sp3', 'col4', {'count': 1}) ]Create a Collector CoWorking Network (CWN) from a list of collector cliques:>>> collectors = [ ['a','b','c'], ['d','e'], ['a','c'] ]
>>> cwn = CoworkingNetwork(cliques=collectors)

>>> cwn.nodes(data=True)
{ 'a': {'count': 2}, 
  'b': {'count': 1}, 
  'c': {'count': 2}, 
  'd': {'count': 1}, 
  'e': {'count': 1} }    

>>> cwn.edges(data=True)
[ ('a', 'b', {'count': 1, 'taxons': None, 'weight_hyperbolic': 0.5}), 
  ('a', 'c', {'count': 2, 'taxons': None, 'weight_hyperbolic': 1.5}), 
  ('b', 'c', {'count': 1, 'taxons': None, 'weight_hyperbolic': 0.5}), 
  ('d', 'e', {'count': 1, 'taxons': None, 'weight_hyperbolic': 1.0}) ]InstallThis package is still experimental, and should ideally be run from a conda virtual environment, which is specified in theenvironment.ymlfile. In order to create the virtual environment clone this repository, make sure you havecondainstalled and use one of the following commands, from the root of the repository:$ conda env create -f environment.ymlThen you should activate it with the following command:On Linux:$ source activate caryocarOn Windows:$ activate caryocar
Package: cary_travelcommand
A Cary command for querying the US Government per diem tablesand Google QPX to get a full trip quote; query by sending an emailwith the body of several lines describing the trip, such aslhr-dub 20-21 july staying in Kilkennydub-cdg 21-23 julycdg-lhr 23 julthe parser is fairly permissive but gets tripped up periodically.
Package: cas
Chaos Automation SystemChaos Automation System (CAS) is a toolkit for automating complex sequences of tasks; generally, Source engine tasks.UsageCAS, by default, expects a certain folder structure to be present. You should have a root folder for your project, containing acontentfolder and agamefolder. The former contains your source content, while your latter contains your compiled assets and binaries.To configure which assets to build, ancas.jsonfile must be present in yourcontentfolder. An example of this is present in theexamplesfolder of this repository, which you can copy if you want to provide a template for your project.You must run CAS from inside your project's root tree; if you need to run it from somewhere else, use the--pathargument.Example:casbuild --build-category assetsConfigurationCAS executes a series of discrete programs called subsystems.
An example of a subsystem isvpk- this allows packing several files into one or more VPK archives.Build Types and CategoriesThebuild type(--build-type) selects the type of the build you want to perform. This may be one of three values: trunk, staging, or release, and mirrors a multi-branch Git philosophy. The behaviour of this differs depending on the asset or subsystem implementation.Thebuild categories(--build-categories) define whether assets should be built and what subsystems should run, if any. The default is to build all categories if one is not explicitly specified. If a category different fromassetsis specified, assets will not be built. The categories of a subsystem can be defined with thecategorieskey.Expressions and ConditionsCAS has support for conditional statements to include or exclude segments of configuration whenever a condition is met. Specify the conditions inside the block you want to set as a list with the special@conditionskey.CAS also has support for custom expressions with@expressions, to dynamically modify parts of configuration on the fly. Specify this as a set with each key you want to modify. It uses the same syntax as conditions.Example:"module":"cas.subsystems.syncfolder","category":"publish","options":{"from":"$(path.root)/game","to":"$(path.root)/publish.tmp","create":true,"files":["!.git"],"@conditions":["args.build_type != 'trunk'"]}Note that expressions are always evaluated before conditions in the same block.Local scopeInside conditions and macros a specific set of names are available in the local scope:parent, the parent object of this valuecontext, the current resolver scopepath,args,assets, andsubsystemsfrom the configuration fileenv, a dict containingplatform, the system platform, andcpu_count, the number of system CPUsInstallationYou can install CAS withpip. Example:python3 -m pip install casDevelopmentTo install, runpython3 ./setup.py develop --user.To remove the development link, runpython3 ./setup.py develop --user -u.To publish to PyPi, runpublish.sh.
Package: cas2iob
CAS2IOBCAS2IOB is a converter of UIMA CAS XMI files using in the INCEpTION annotation platform into IOB TSV files. In contrast to the internal convertor in INCEpTION, it handles the nested NER tags, NEL tags and components, and saves them into multiple columns of a TSV-file:TOKEN  NE-COARSE   NE-FINE NE-FINE-COMP    NE-NESTED   NEL-WikidataQIDIt reads the UIMA CAS XMI files usingdkpro-cassislibrary.Installationpipinstallcas2iobUsing as a libraryImport cas2iob:importcas2iobConvert./input.xmiwith./TypeSystem.xmlinto./output.tsv:cas2iob.file('./input.xmi','output.tsv')Convert all files in./inputfolder with./TypeSystem.xmlinto./outputfolder:cas2iob.folder('./input','./output')If./TypeSystem.xmlis located in a different folder, add it to the commands above as the third argument.If you don't want to include column names in a TSV-file, add the forth argumentmetadata=False.Using in CLI%cas2iob--helpUsage:cas2iob[OPTIONS]INPUT_PATHOUTPUT_PATH[TYPESYSTEM_XML][METADATA]╭─Arguments──────────────────────────────────────────────────────────────────╮
│*input_pathPATH[default:None][required]│
│*output_pathPATH[default:None][required]│
│typesystem_xml[TYPESYSTEM_XML][default:./TypeSystem.xml]│
│metadata[METADATA][default:True]│
╰──────────────────────────────────────────────────────────────────────────────╯
╭─Options────────────────────────────────────────────────────────────────────╮
│--install-completionInstallcompletionforthecurrentshell.│
│--show-completionShowcompletionforthecurrentshell,tocopy│
│itorcustomizetheinstallation.│
│--helpShowthismessageandexit.│
╰──────────────────────────────────────────────────────────────────────────────╯
Package: casa6-install
casa6-docker/installThis project provides two tools:casa6-dockercreateDockerimages which contain a fully working data analysis and code development environment with modern modularcasa6and other common Python packages (e.g.astropy,Jupyter, etc.), suitable forSingularity-based HPC deployment.casa6-installa Python-based command-line tool to help installcasa6under Py37/38 on macOS or Linux (only for experimental use before the official NRAO support). The building process ofcasa6-dockerrequirescasa6-install.Documentationhttps://r-xue.github.io/casa6-dockerRepohttps://github.com/r-xue/casa6-dockerPyPIhttps://pypi.org/project/casa6-installDocker Hubhttps://hub.docker.com/r/rxastro/casa6Free open-source software: BSD licenseNoteThe Docker Hub image can be directly used withDocker(in macOS/Linux/Windows, commercial cloud services) orSingularity(mainly for HPC).casa6is still in development and considered as experimental. Itscasatoolspackage can be used as an alternative tocasacoreforMeasurementSetmanipulation. I haven’t run into issues withtclean,mstransform, etc. and the lower-levelToolkit.History1.1.2 (2020-07-26)First release on GitHub, PyPI, Docker Hub
Package: casa-formats-io
A small package implementing I/O for CASA data formats - seehttps://casa-formats-io.readthedocs.iofor more details.While developing this package, we made use of thehttps://github.com/casacore/casacorepackage to better understand
the file format and have re-used some of the data class names. Therefore, since some parts of casa-formats-io may
be considered translations of casacore into Python, we license casa-formats-io under the same LGPL license as casacore.casa-formats-io supports python versions >=3.8.
Package: casambi
Python library for controlling Casambi lightsPython library for controlling Casambi via Cloud APIGetting StartedRequest developer api key from Casambi:https://developer.casambi.com/Setup a site in Casambi app:http://support.casambi.com/support/solutions/articles/12000041325-how-to-create-a-siteInstallatingInstall this library through pip:pip install casambiExample Code block 1importcasambiimporttimeapi_key='REPLACEME'email='replaceme@replace.com'network_password='REPLACEME'user_password='REPLACEME'worker=casambi.Casambi(api_key=api_key,email=email,\user_password=user_password,network_password=network_password)worker.create_user_session()worker.create_network_session()worker.ws_open()print("Turn unit on!")worker.turn_unit_on(unit_id=1)time.sleep(60)print("Turn unit off!")worker.turn_unit_off(unit_id=1)time.sleep(60)units=worker.get_unit_list()print("units:{}".format(units))scenes=worker.get_scenes_list()print("Scene on!")worker.turn_scene_on(scene_id=1)time.sleep(60)print("Scene off!")worker.turn_scene_off(scene_id=1)worker.ws_close()Other Casambi projectshttps://github.com/hellqvio86/aiocasambi- Asynchronous I/O version of this libraryhttps://github.com/hellqvio86/home_assistant_casambi- Home Assistant Plugin for Casambihttps://github.com/awahlig/homebridge-casambiHomebridge plugin for CasambiAuthorsOlof Hellqvist-Initial workLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsDisclaimerThis library is neither affiliated with nor endorsed by Casambi.
Package: casambi-bt
A bluetooth based Python library for controlling Casambi networksThis library provides a currentlyalpha qualityinterface to Casambi-based lights over Bluetooth.
The author is not associated with Casambi and the implementation is based on his own analysis of the protocol.
This interface is not feature complete and was only tested with a very small network.If you want to check out my (slow) progress in writing a integration for Home Assistant using this library you can take a look athttps://github.com/lkempf/casambi-bt-hass/.For a more mature solution using a gateway and the official Casambi API have a look athttps://github.com/hellqvio86/aiocasambi.Getting startedThis library is available on PyPi:pip install casambi-btHave a look atdemo.pyfor a small example.Casambi network setupIf you have problems connecting to the network please check that your network is configured appropriately before creating an issue. The network I test this with uses theEvoultion firmwareand is configured as follows (screenshots are for the iOS app but the Android app should look very similar):
Package: casanovo
CasanovoDe NovoMass Spectrometry Peptide Sequencing with a Transformer ModelIf you use Casanovo in your work, please cite the following publications:Yilmaz, M., Fondrie, W. E., Bittremieux, W., Oh, S. & Noble, W. S.De novomass spectrometry peptide sequencing with a transformer model. inProceedings of the 39th International Conference on Machine Learning - ICML '22vol. 162 25514–25522 (PMLR, 2022).https://proceedings.mlr.press/v162/yilmaz22a.htmlYilmaz, M., Fondrie, W. E., Bittremieux, W., Nelson, R., Ananth, V., Oh, S. & Noble, W. S. Sequence-to-sequence translation from mass spectra to peptides with a transformer model. inbioRxiv(2023).doi:10.1101/2023.01.03.522621Documentationhttps://casanovo.readthedocs.io/en/latest/
Package: casavo-log-formatter
casavo-log-formatterAn utility library that exposes a pre-configured log formatter for the Casavo JSON logging format.Installationpip install casavo-log-formatter, orpip install casavo-log-formatter[orjson]if you prefer usingorjsonas a json serializer.UsageReferring tohttps://docs.python.org/3/library/logging.config.html#logging-config-dictschema,
we suggest to configure your loggingdictConfigby adding those 2 keys:formatters={"simple":{"format":"%(levelname)s%(message)s","datefmt":"%H:%M:%S",},"standard":{"class":"casavo_log_formatter.formatters.CasavoJsonFormatter"},}handlers={"stdout":{"level":"DEBUG","class":"logging.StreamHandler","formatter":"standard"ifsettings.ENVIRONMENTin["staging","production"]# or whatever you use to specify the envelse"simple",},}This will configure a simple log format for dev and the fully featured formatter for staging + dev.DevelopmentHave a local python >=3.9python -m venv .venvpip install -r requirements.txtpre-commit installpip install -e .Testmake testornoxto launch the test matrix against Python 3.9, 3.10, 3.11Uploading on PyPImake upload
Package: casbin-async-redis-adapter
Async Redis Adapter for PyCasbinAsync Redis Adapter is the asyncredisadapter forPyCasbin.
With this
library, Casbin can load policy from redis or save policy to it.Installationpip install casbin_async_redis_adapterSimple Exampleimportasynciofromcasbin_async_redis_adapterimportAdapterimportcasbinasyncdefget_enforcer():adapter=Adapter("localhost",6379,encoding="utf-8")e=casbin.AsyncEnforcer("rbac_model.conf",adapter)model=e.get_model()model.clear_policy()model.add_policy("p","p",["alice","data1","read"])awaitadapter.save_policy(model)model.clear_policy()model.add_policy("p","p",["bob","data2","write"])awaitadapter.save_policy(model)model.clear_policy()model.add_policy("p","p",["data2_admin","data2","read"])awaitadapter.save_policy(model)model.clear_policy()model.add_policy("p","p",["data2_admin","data2","write"])awaitadapter.save_policy(model)model.clear_policy()model.add_policy("g","g",["alice","data2_admin"])awaitadapter.save_policy(model)e=casbin.AsyncEnforcer("rbac_model.conf",adapter)awaite.load_policy()returnesub="alice"# the user that wants to access a resource.obj="data1"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.asyncdefmain():e=awaitget_enforcer()ife.enforce("alice","data1","read"):print("alice can read data1")else:print("alice can not read data1")asyncio.run(main())ConfigurationAdapter()enable decode_responses by default and supports any Redis parameter configuration.To use casbin_redis_adapter, you must provide the following parameter configurationhost: address of the redis serviceport: redis service portThe following parameters are provided by defaultdb: redis database, default is0username: redis username, default isNonepassword: redis password, default isNonekey: casbin rule to store key, default iscasbin_rulesFor more parameters, please followredis-pyGetting HelpPyCasbinLicenseThis project is licensed under theApache 2.0 license.
Package: casbin-async-sqlalchemy-adapter
async-sqlalchemy-adapterAsync SQLAlchemy Adapter for PyCasbinAsynchronous SQLAlchemy Adapter is theSQLAlchemyadapter forPyCasbin. With this library, Casbin can load policy from SQLAlchemy supported database or save policy to it.Based onOfficially Supported Databases, The current supported databases are:PostgreSQLMySQLMariaDBSQLiteOracleMicrosoft SQL ServerFirebirdInstallationpip install casbin_async_sqlalchemy_adapterSimple Exampleimportcasbin_async_sqlalchemy_adapterimportcasbinadapter=casbin_async_sqlalchemy_adapter.Adapter('sqlite:///test.db')e=casbin.Enforcer('path/to/model.conf',adapter)sub="alice"# the user that wants to access a resource.obj="data1"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.ife.enforce(sub,obj,act):# permit alice to read data1passelse:# deny the request, show an errorpassGetting HelpPyCasbinLicenseThis project is licensed under theApache 2.0 license.
Package: casbin-couchbase-adapter
Couchbase Adapter for PyCasbinCouchbase storage adapter for PyCasbinInstallationpip install casbin_couchbase_adapter

# Create secondary index in Couchbase to support N1QL queries
CREATE INDEX idx_casbin ON content(meta().id, ptype) WHERE meta().id LIKE "casbin_rule%"Simple Exampleimportcasbin_couchbase_adapterimportcasbinadapter=casbin_couchbase_adapter.Adapter('couchbase://localhost:8091','bucket','user','password')e=casbin.Enforcer('path/to/model.conf',adapter,True)sub="alice"# the user that wants to access a resource.obj="data1"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.ife.enforce(sub,obj,act):# permit alice to read data1passelse:# deny the request, show an errorpassDevelopmentForkInstall Dev ENV# Install Flask-Casbin with Dev packagespipinstall-rdev_requirements.txtpipinstall-rrequirements.txtpipinstall-e.# Install Pre-commitspre-commitinstall# Create feature branchgitcheckout-bfeature-more-cool-stuff# Code stuffThen push your changes and create a PRManually Bump Versionbumpversion major  # major release
or
bumpversion minor  # minor release
or
bumpversion patch  # hotfix release
Package: casbin-django-orm-adapter
Django ORM Adapter for PyCasbinDjango ORM Adapter is theDjango'sORMadapter forPyCasbin. With this library, Casbin can load policy from Django ORM supported database or save policy to it.Based onOfficially Supported Databases, The current supported databases are:PostgreSQLMariaDBMySQLOracleSQLiteIBM DB2Microsoft SQL ServerFirebirdODBCInstallationpip install casbin-django-orm-adapterAddcasbin_adapter.apps.CasbinAdapterConfigto yourINSTALLED_APPS# settings.pyBASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))INSTALLED_APPS=[...'casbin_adapter.apps.CasbinAdapterConfig',...]CASBIN_MODEL=os.path.join(BASE_DIR,'casbin.conf')To run schema migration, executepython manage.py migrate casbin_adapterSimple Example# views.pyfromcasbin_adapter.enforcerimportenforcerdefhello(request):sub="alice"# the user that wants to access a resource.obj="data1"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.ife.enforce(sub,obj,act):# permit alice to read data1casbin_django_orm_adapterpasselse:# deny the request, show an errorpassConfigurationCASBIN_MODELA string containing the file location of your casbin model.CASBIN_ADAPTERA string containing the adapter import path. Default to the django adapter shipped with this package:casbin_adapter.adapter.AdapterCASBIN_ADAPTER_ARGSA tuple of arguments to be passed into the constructor of the adapter specified
inCASBIN_ADAPTER. Refer to adapters to see available arguments.E.g. if you wish to use the file adapter
set the adapter tocasbin.persist.adapters.FileAdapterand useCASBIN_ADAPTER_ARGS = ('path/to/policy_file.csv',)CASBIN_DB_ALIASThe database the adapter uses. Default to "default".CASBIN_WATCHERWatcher instance to be set as the watcher on the enforcer instance.CASBIN_ROLE_MANAGERRole manager instance to be set as the role manager on the enforcer instance.Getting HelpPyCasbinLicenseThis project is licensed under theApache 2.0 license.
Package: casbin-django-orm-adapter-test
Django ORM Adapter for PyCasbinDjango ORM Adapter is theDjango'sORMadapter forPyCasbin. With this library, Casbin can load policy from Django ORM supported database or save policy to it.Based onOfficially Supported Databases, The current supported databases are:PostgreSQLMariaDBMySQLOracleSQLiteIBM DB2Microsoft SQL ServerFirebirdODBCInstallationpip install casbin-django-orm-adapterAddcasbin_adapter.apps.CasbinAdapterConfigto yourINSTALLED_APPS# settings.pyBASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))INSTALLED_APPS=[...'casbin_adapter.apps.CasbinAdapterConfig',...]CASBIN_MODEL=os.path.join(BASE_DIR,'casbin.conf')To run schema migration, executepython manage.py migrate casbin_adapterSimple Example# views.pyfromcasbin_adapter.enforcerimportenforcerdefhello(request):sub="alice"# the user that wants to access a resource.obj="data1"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.ife.enforce(sub,obj,act):# permit alice to read data1casbin_django_orm_adapterpasselse:# deny the request, show an errorpassConfigurationCASBIN_MODELA string containing the file location of your casbin model.CASBIN_LOG_ENABLEDIfTrue, enables logging.Falseby default.CASBIN_ADAPTERA string containing the adapter import path. Defaults to the django adapter shipped with this package:casbin_adapter.adapter.AdapterCASBIN_ADAPTER_ARGSA tuple of arguments to be passed into the constructor of the adapter specified
inCASBIN_ADAPTER. Refer to adapters to see available arguments.E.g. if you wish to use the file adapter
set the adapter tocasbin.persist.adapters.FileAdapterand useCASBIN_ADAPTER_ARGS = ('path/to/policy_file.csv',)CASBIN_WATCHERWatcher instance to be set as the watcher on the enforcer instance.CASBIN_ROLE_MANAGERRole manager instance to be set as the role manager on the enforcer instance.Getting HelpPyCasbinLicenseThis project is licensed under theApache 2.0 license.
Package: casbin-etcd-watcher
etcd-watcherEtcd Watcher is theEtcdwatcher forpycasbin. With this library, Casbin can synchronize the policy with the database in multiple enforcer instances.Installationpip install casbin-etcd-watcherSimple Exampleimportcasbinfrometcd_watcherimportnew_watcherdefupdate_callback_func(event):...watcher=new_watcher(endpoints=["localhost",2379],keyname="/casbin")watcher.set_update_callback(update_callback_func)e=casbin.Enforcer(get_examples("rbac_model.conf"),get_examples("rbac_policy.csv"))e.set_watcher(watcher)# update_callback_func will be callede.save_policy()Getting HelpCasbinLicenseThis project is under Apache 2.0 License. See theLICENSEfile for the full license text.
Package: casbin-graphql-authz
graphql-authzGraphQL-Authz is a Python3.6+ port ofGraphQL-Authz, theCasbinauthorization middleware implementation inNode.js.This package should be used withGraphQL-core 3, providing the
capability to limit access to each GraphQL resource with the authorization middleware.InstallationInstall the package using pip.pipinstallcasbin-graphql-authzGet StartedLimit the access to each GraphQL resource with a policy. For example,
given this policy for anRBACmodel:p, authorized_user, hello, queryAuthorization can be enforced using:importcasbinfromauthz.middlewareimportenforcer_middlewarefromgraphqlimport(graphql_sync,GraphQLSchema,GraphQLObjectType,GraphQLField,GraphQLString,)schema=GraphQLSchema(query=GraphQLObjectType(name="RootQueryType",fields={"hello":GraphQLField(GraphQLString,resolve=lambdaobj,info:"world")}))enforcer=casbin.Enforcer("model_file.conf","policy_file.csv")authorization_middleware=enforcer_middleware(enforcer)query="""{ hello }"""# Authorized user ("authorized_user") has access to dataresponse=graphql_sync(schema,query,middleware=[authorization_middleware],context_value={"role":"authorized_user"})assertresponse.data=={"hello":"world"}# Unauthorized users ("unauthorized_user") are rejectedresponse=graphql_sync(schema,query,middleware=[authorization_middleware],context_value={"role":"unauthorized_user"})assertresponse.errors[0].message=="unauthorized_user can not query hello"For more interesting scenarios seetestsfolder.CreditsImplementation was heavily inspired by theNode.jsmiddlewareGraphQL-Authz.Authorization enforcement is based onCasbinauthorization library.