Saravanan666/pypi-org huggingface dataset:
Package: datastore.pylru
# datastore-pylru## datastore implementation for pylruSee [datastore](https://github.com/datastore/datastore).### InstallFrom pypi (using pip):sudo pip install datastore.pylruFrom pypi (using setuptools):sudo easy_install datastore.pylruFrom source:git clonehttps://github.com/datastore/datastore.pylru/cd datastore.pylru
sudo python setup.py install### Licensedatastore.pylru is under the MIT License.### Contactdatastore.pylru is written by [Juan Batiz-Benet](https://github.com/jbenet).
It was extracted from [datastore](https://github.com/datastore/datastore)
in Feb 2013.Project Homepage:
[https://github.com/datastore/datastore.pylru](https://github.com/datastore/datastore.pylru)Feel free to contact me. But please file issues in github first. Cheers!### Hello World>>> import pylru
>>> import datastore.pylru
>>>
>>> r = pylru.pylru()
>>> ds = datastore.pylru.pylruDatastore(r)
>>>
>>> hello = datastore.Key('hello')
>>> ds.put(hello, 'world')
>>> ds.contains(hello)
True
>>> ds.get(hello)
'world'
>>> ds.delete(hello)
>>> ds.get(hello)
None
Package: datastore-reader
Datastore is a simple tool written to parse sugar metadata files from
backuped XO archives in a given folder.InstallTo install the datastore_reader lib, you need python and easy_install tool.
Just in case, you can download the easy_install init script here:http://peak.telecommunity.com/dist/ez_setup.py… and install it:$ python ez_setup.pyYou should now be able to easy_install the datastore_reader as follow:$ easy_install datastore_readerRunThe first datastore_reader entry point is calledmoulinette. It extract and
parse metadata from backups to csv files.By default, archives should be in a sub-folder nameddatain the current
folder, ex:./data
./data/archive-1.tar.bz2
./data/archive-2.tar.bz2
./data/archive-3.tar.bz2
...All archives should have the .tar.bz2 extension. Here is the command to trigger
the first reader application:$ moulinetteAt the end, you should find 2 new folders in the data floder:./data/tmp
./data/outIntmpsub-folder we have the extracted files from the parsing process.
All files are re-extracted each time and the tmp folder can be removed after.In theoutfolder we find the .csv results of the moulinette script.
Package: datastore.redis
# datastore-redis## datastore implementation for redisSee [datastore](https://github.com/datastore/datastore).### InstallFrom pypi (using pip):sudo pip install datastore.redisFrom pypi (using setuptools):sudo easy_install datastore.redisFrom source:git clonehttps://github.com/datastore/datastore.redis/cd datastore.redis
sudo python setup.py install### Licensedatastore.redis is under the MIT License.### Contactdatastore.redis is written by [Juan Batiz-Benet](https://github.com/jbenet).
It was extracted from [datastore](https://github.com/datastore/datastore)
in Feb 2013.Project Homepage:
[https://github.com/datastore/datastore.redis](https://github.com/datastore/datastore.redis)Feel free to contact me. But please file issues in github first. Cheers!### Hello World>>> import redis
>>> import datastore.redis
>>>
>>> r = redis.Redis()
>>> ds = datastore.redis.RedisDatastore(r)
>>>
>>> hello = datastore.Key('hello')
>>> ds.put(hello, 'world')
>>> ds.contains(hello)
True
>>> ds.get(hello)
'world'
>>> ds.delete(hello)
>>> ds.get(hello)
None
Package: datastore-to-gcs
Transfers data from Google Cloud Datastore to Google Cloud Storage.
Intended to be used from Google App Engine.Usage>>> import datastore_to_gcs
>>> from google.appengine.ext import ndb
>>>
>>> class Foo(datastore_to_gcs.BaseModel):
...     email = ndb.StringProperty()
...
>>> f = Foo(email='a@b.com')
>>> f.put()
Key('Foo', 1)
>>> datastore_to_gcs.update(Foo, 'bucket-name', 'foo.json')
>>> f2 = Foo(email='b@b.com')
>>> f2.put()
Key('Foo', 2)
>>> import datastore_to_gcs.cloud_storage as gcs
>>> gcs.download_object('bucket-name', 'foo.json')
[{u'last_modified': u'2017-06-19T18:02:01.332908', u'email': u'a@b.com', u'id': 1}]
>>> datastore_to_gcs.update(Foo, 'bucket-name', 'foo.json')
>>> gcs.download_object('bucket-name', 'foo.json')
[{u'last_modified': u'2017-06-19T18:02:01.332908', u'email': u'a@b.com', u'id': 1}, {u'last_modified': u'2017-06-19T18:03:09.342067', u'email': u'b@b.com', u'id': 2}]
>>>
>>>
>>> class Message(datastore_to_gcs.BaseModel):
...     text = ndb.StringProperty()
...
>>> m1 = Message(text='hello 1')
>>> m1.put()
Key('Message', 3)
>>> datastore_to_gcs.dump_log(Message, 'bucket-name', 'messages/')
'2017-06-19T18:05:07.json'
>>> m2 = Message(text='hello 2')
>>> m2.put()
Key('Message', 4)
>>> m3 = Message(text='hello 3')
>>> m3.put()
Key('Message', 5)
>>> datastore_to_gcs.dump_log(Message, 'bucket-name', 'messages/')
'2017-06-19T18:06:02.json'
>>> gcs.download_object('bucket-name', 'messages/2017-06-19T18:05:07.json')
[{u'text': u'hello 1', u'last_modified': u'2017-06-19T18:04:33.558426', u'id': 3}]
>>> gcs.download_object('bucket-name', 'messages/2017-06-19T18:06:02.json')
[{u'text': u'hello 2', u'last_modified': u'2017-06-19T18:05:35.084417', u'id': 4}, {u'text': u'hello 3', u'last_modified': u'2017-06-19T18:05:50.859952', u'id': 5}]ContributingPull requests welcome!https://github.com/SocosLLC/datastore-to-gcsAbout SocosSocos LLC is the company behindMuse.Muse brings your child’s everyday experiences to life and supports
their development through research-based activities. Muse gives you
insights into your child’s development and shows you what you can do
each day to support their growth.
Package: datastore-viewer
datastore-viewerdatastore-viewer is a simple viewer of Google Cloud Datastore Emulator.Quickstart using docker-composeA example of docker-compose.yml:version:"3"services:datastore_emulator:image:quay.io/gumo/datastore-emulatorenvironment:DATASTORE_PROJECT_ID:test-projectDATASTORE_LISTEN_ADDRESS:0.0.0.0:8081ports:-"8081:8081"volumes:-datastore-emulator-storage:/opt/data# command: start-datastore --no-store-on-disk --consistency=1.0datastore_viewer:image:quay.io/gumo/datastore-viewerenvironment:DATASTORE_VIEWER_HOST:0.0.0.0DATASTORE_VIEWER_PORT:18081GOOGLE_CLOUD_PROJECT:test-projectDATASTORE_EMULATOR_HOST:datastore_emulator:8081depends_on:-datastore_emulatorports:-"18081:18081"volumes:datastore-emulator-storage:driver:localExecute docker containers:docker-composeupPlease access to:http://127.0.0.1:18081for DevelopersSetupCreate new venv:$python-mvenvvenv
$sourcevenv/bin/activateUpgrade pip and install building tools:$pipinstall--upgradepip
$pipinstalltwinewheelpytestpip-toolsInstall dependency packages:$pipinstall-rrequirements.txtRun$exportDATASTORE_EMULATOR_HOST=127.0.0.1:8081
$makerunPackage Build$makebuild
Package: datastream
Datastream API is one of the projects ofwlan slovenijaopen wireless network.
It is a Python API for time-series data which abstracts the database which is used to store the data,
providing a powerful and unified API.
It provides an easy way to insert time-series datapoints and automatically downsample them into multiple
levels of granularity for efficient querying time-series data at various time scales.Documentation is found at:http://datastream.readthedocs.org/We provide a Django HTTP RESTful interface throughdjango-datastreampackage. You can use it
directly in your Django application, or check its source code to learn more how to integrate
Datastream API into your application.For questions and development discussions usedevelopment mailing list.
Package: datastreamcorelib
Core helpers and Abstract Base Classes for making use of ZMQ nice, easy and DRY.You should probably look athttps://gitlab.com/advian-oss/python-datastreamservicelibandhttps://gitlab.com/advian-oss/python-datastreamserviceapp_templateunless you’re working
on an adapter for yet unsupported eventloop.DockerFor more controlled deployments and to get rid of “works on my computer” -syndrome, we always
make sure our software works under docker.It’s also a quick way to get started with a standard development environment.SSH agent forwardingWe needbuildkit:export DOCKER_BUILDKIT=1And also the exact way for forwarding agent to running instance is different on OSX:export DOCKER_SSHAGENT="-v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock"and Linux:export DOCKER_SSHAGENT="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK"Creating a development containerBuild image, create container and start it:docker build --ssh default --target devel_shell -t datastreamcorelib:devel_shell .
docker create --name datastreamcorelib_devel -v `pwd`":/app" -it -v /tmp:/tmp `echo $DOCKER_SSHAGENT` datastreamcorelib:devel_shell
docker start -i datastreamcorelib_develpre-commit considerationsIf working in Docker instead of native env you need to run the pre-commit checks in docker too:docker exec -i datastreamcorelib_devel /bin/bash -c "pre-commit install"
docker exec -i datastreamcorelib_devel /bin/bash -c "pre-commit run --all-files"You need to have the container running, see above. Or alternatively use the docker run syntax but using
the running container is faster:docker run -it --rm -v `pwd`":/app" datastreamcorelib:devel_shell -c "pre-commit run --all-files"Test suiteYou can use the devel shell to run py.test when doing development, for CI use
the “tox” target in the Dockerfile:docker build --ssh default --target tox -t datastreamcorelib:tox .
docker run -it --rm -v `pwd`":/app" `echo $DOCKER_SSHAGENT` datastreamcorelib:toxProduction dockerThere’s a “production” target since it’s our standard pattern, however this library does not yet
expose any CLI tools so the production target is kinda useless.Local DevelopmentTLDR:Create and activate a Python 3.6 virtualenv (assuming virtualenvwrapper):mkvirtualenv -p `which python3.6` my_virtualenvchange to a branch:git checkout -b my_branchinstall Poetry:https://python-poetry.org/docs/#installationInstall project deps and pre-commit hooks:poetry install
pre-commit install
pre-commit run --all-filesReady to go.Use Python 3.6 for development since it’s the lowest supported version so you don’t accidentally
use features only available in higher versions and then have to re-do everything when CI tests fail
on 3.6.Remember to activate your virtualenv whenever working on the repo, this is needed
because pylint and mypy pre-commit hooks use the “system” python for now (because reasons).Running “pre-commit run –all-files” and “py.test -v” regularly during development and
especially before committing will save you some headache.
Package: data-stream-kit
### data-stream-kit数据流处理工具包主要功能：data_stream_kit.sqla_decorator: sqlalchemy的高度封装，使用线程数据，实现修饰器的方式调用session。data_stream_kit.sqla_asyncio: 简单封装了异步sqlalchemy的session。data_stream_kit.kafka_lib: 封装了kafka的生产者KafkaProducer和消费者KafkaConsumer。data_stream_kit.kafka_asyncio: 异步的kafka生产者AIOProducer和消费者AIOConsumer。打包流程：生成wheel文件和源代码压缩包：python setup.py sdist bdist_wheel。上传生成的文件：twine upload dist/*。之后输入账号密码。
Package: datastretch
DaTaStretchThis project introduces a new framework for pipeline-operations.
It provides an easy way to create arbitrary pipelines and is capable to run them in parallel.
Tasks executed by the pipeline are fully specified by the developer, furthermore the dependencies among the tasks
must be specified. DaTaStretch then finds the best way to parallelize the execution of those tasks with respect to the
defined dependencies. Therefore it builds atask graphand anexecution graphwhich represent the order of
task-executions. Both graphs can be plotted by DaTaStretch for debugging-purposes.How to setupThe setup can be done as follows:Execute 'pip install datastretch'Import 'datastretch'Define your tasks by creating classes inheriting from the Task-classDefine dependencies between your tasks.Create a Pipeline-objectCreate the needed stages and add your tasks thereAdd the stages to the pipeline and run it!Libraries usednetworkxmultiprocessingmatplotlib
Package: datastruct
datastructA small but useful package to load, validate and use typed data structures, including configuration files.You get:An easy way to define a typed hierarchical data structure.Hassle free definition nested structures.Loading from a variety of formats (json, yaml and everything supported bySerialize),Error checking including: missing values, unexpected value, wrong type, wrong value.Easy to integrate in another app error reporting.Installationpip install datastructUsage>>>fromtypingimportList>>>fromdatastructimportDataStruct>>>classEmailServer(DataStruct):......host:str...port:int...username:str...password:str>>>>>>classConfig(DataStruct):......download_path:str...email_servers:List[EmailServer]...wait_time:float>>>>>>cfg=Config.from_filename('settings.yaml')When an invalid value is found, an exception will be raised.If you want to accumulate all errors for inspection:>>>cfg=Config.from_filename('settings.yaml',raise_on_error=False)>>>print(cfg.get_errors())You can then use theDataStructobject in your code:>>>print(cfg.email_servers[0].host)Other featuresYou can easily specify default values that>>>classEmailServer(DataStruct):......host:str...port:int=25...username:str...password:strSeeAUTHORSfor a list of the maintainers.To review an ordered list of notable changes for each version of a project,
seeCHANGES
Package: datastructs
datastructsModule created to facilitate the creation and use of data structuresInstallationpipinstalldatastructsHow to UseBinary Tree>>>fromdatastructsimportBinaryTree>>>binary_tree=BinaryTree([1,2,3,4])>>>binary_tree.print()1234>>>binary_tree.add([5,6,7,8])>>>binary_tree.print()12345678>>>binary_tree.print(node=binary_tree.root,order='lvl')12345678>>>binary_tree.print('pre')12485367>>>binary_tree.print('in')84251637>>>binary_tree.print('pos')84526731>>>BinaryTree().print(node=binary_tree.root.left)2458>>>BinaryTree().print(node=binary_tree.root.left,order='in')8425Linked List>>>fromdatastructsimportLinkedList>>>linked_list=LinkedList([1,2,3,4])>>>linked_list.print()1->2->3->4>>>linked_list.add([5,6,7,8])>>>linked_list.print()1->2->3->4->5->6->7->8>>>LinkedList().print(linked_list.head.next)2->3->4->5->6->7->8How to contributeAll code followsPEP8, except for the line length, which accepts 120 characters.Make the project fork and clone the project:git clone git@github.com:<your_user>/datastructs.gitInstall pipenv:pip install pipenvInstall the dependencies for dev:pipenv install -dDevelop the feature with testsRun the tests locally:pipenv run pytestSend the pull request with tests in a single commitSubmit the PR for reviewAfter reviewed and corrected, the PR will be accepted and the lib post in PyPi
Package: datastructspawner
datastructspawnerEsse pacote contém o uso de algumas estruturas de dados: Lista Encadeada, Árvore Bínaria de Busca e Árvore AVL.Instalação:pip install datastructspawnerUso:linked-list = LinkedList()
datas = {"name" = "Name-User"}
key = 1
node = NodeLinkedList(key,datas)
linkes-list.add_node(node)
Package: datastructs-sparkles58
DatastructsDatastructs is a small module containing trees and queues.NOTE:all objects are under datastructs.datastructsQueuesQueues are very simple. To create one, you can just use queue() with an iterable inside, or nothing to create an empty queue. They have two
functions: enqueue(value), which inserts a given value to the beginning of the queue, and dequeue(), which removes the last element and
returns it.Trees and nodesTrees and nodes are a bit more complicated. To create a tree, you can use tree(), with a value for the base node, or nothing to have the
value be None. Nodes have a few functions. First there is set(value) which sets the value of the node, set_parent(node) which changes
its parent node, add_child(value) which adds a child with that values to that nodes "children" list, and remove_child(node), which removes
a child. The tree has an update() function, where you can optionally give it a new base node, and you never truly need to call it, as all
of the node functions call it themselves. Nodes are indexed in a specific way in a tree's "nodes" list. It is a nested list, where each
index of the list contains the nodes in that layer. Layer 0 is the base node, layer 1 is its children, and so on.
Package: datastructures
Binary TreeAbinary treeimplementation is available:fromdatastructuresimportTree,Nodetree=Tree()tree.size()//0tree.max_depth()//0tree.root//Noneroot=tree.add()//Noderoot.left=Node()tree.size()//2tree.max_depth()//2To check if the tree is abinary search tree:tree.is_bst()
Package: data-structures3x
Python basic data structures implementationsThedata_structures3xis a python package with 3 of the most basic data structures. The package would keep updating as python itself updates to higher versions.It contains the following data structures:Binary TreeLinked ListHashmapInstallationIf not already,install pipInstall the package withpiporpip3:pipinstalldata-structures3xUsageSee more examples atMy DocsExample of a linked list:fromdt_structures3x.linkedlistimportItem# linked listroot=Item(10)root.appendChild(Item(17),Item(19))root.display()Output:10->17->19
Package: datasus-db
datasus-dbA python package todownload and importpublic available data fromDATASUS'sftp servers into aDuckDBdatabase.Why DuckDB?DuckDBis a local database similar tosqlite, but it is tailor made with analytical processing in mind, which makes it a great tool for analysing DATASUS's data. To see all the features DuckDB provides, check out theirdocumentation.Installationpip install datasus-dbUsageimportdatasus_dbimportloggingdefmain():# If you want to enable logginglogging.getLogger().setLevel(logging.INFO)# Import SIM DO (Sistema de Informações de Mortalidade - Declarações de Óbito) data# By default the data is imported to the file `datasus.db`datasus_db.import_sim_do()# Import SIH RD (Sistema de Informações Hospitalares do SUS - AIH Reduzida) data# If you want, you can import to another duckdb file changing the `db_file` argumentdatasus_db.import_sih_rd(db_file="other-name.db")# Import PO (Painel de Oncologia) datadatasus_db.import_po()# Import IBGE POP (População IBGE - Agregada por município, sexo e faixa etaria) datadatasus_db.import_ibge_pop()# Import IBGE POP TCU (População IBGE - Tribunal de Contas da União) datadatasus_db.import_ibge_pop_tcu()# Import auxiliar tables (Municipios, UFs e doenças)datasus_db.import_auxiliar_tables()if__name__=="__main__":main()DocumentationCheck out the project's documentation:Found a bug or want a new feature?Feel free to create anissuehere if you found a bug or if you want a new feature!
Package: datasus-dbc
datasus-dbc-pyDecompress*.dbcfiles usually found in Brazil's DATASUS ftp server into*.dbffiles in python.This are python bindings of the sibling librarydatasus-dbcwhich is written in rust. This library should becompatible with most platforms.ExamplesTo decompress a*.dbcfile into a*.dbfusedecompressfunction:importdatasus_dbcdatasus_dbc.decompress("input.dbc","output.dbc")If you have a*.dbcfile's raw bytes, you can usedecompress_bytesto get the decompressed*.dbfraw bytes in memory:importdatasus_dbcwithopen("input.dbc","rb")asfile:dbf_bytes=datasus_dbc.decompress_bytes(file.read())print(dbf_bytes)Found a bug?Feel free to create anissuehere if you found a bug or if you want a new feature!
Package: datasync
Management command to sync environment data.Syncs database and media, for example when deploying an acceptance environment.Quick Startpip install django-datasyncadd ‘datasync’ to INSTALLED APPSconfigure settingsDATASYNC = {
    'HOST': '{{ remote_host_address }}',
    'PORT': {{ remote_ssh_port }}
    'USER': '{{ remote_username }}',
    'PASSWORD': '{{ remote_user_password }}',
    'MEDIA_REMOTE': '{{ remote_media_directory }}',
    'MEDIA_TARGET': '{{ local_media_directory }}',
    'DATABASE': {
        'HOST': '{{ db_host_address }}',
        'USER': '{{ db_username }}',
        'PASSWORD': '{{ db_password }}',
        'NAME': '{{ db_name }}',
        'PORT': {{ db_port }}
    },
}You will now have access to the management command ‘sync_environment’. Run that command from the target machine, perhaps as a cron job. Or add to ansible-playbooks setup.Supported Databases: Postgres.You will also have to edit the following postgres conf file in order to allow access from your target machine(s)/etc/postgresql/9.3/main/pg_hba.conf
Package: datatable
This is a Python package for manipulating 2-dimensional tabular data
structures (aka data frames). It is close in spirit to pandas or SFrame;
however we put specific emphasis on speed and big data support. As the
name suggests, the package is closely related to R’s data.table and
attempts to mimic its core algorithms and API.Seehttps://github.com/h2oai/datatablefor more details.
Package: datatable-faker
datatable-fakerLibrary to generate fake datatable for unittestInstallationfor stable version
   - pip install datatable-faker

for developement
   - git clone https://github.com/Agent-Hellboy/datatable-faker
   - cd datatable-faker
   - python -m venv .venv
   - source .venv/bin/activateExamplefromdataclassesimportdataclass@dataclass()classHeartbeat:serialNumber:strcbsdId:strgrantId:strgrantState:strcarrier:intmaxEirp:intfromdatatable_fakerimportgenerate_fake_datafake_data=generate_fake_data(Heartbeat)print(fake_data)Heartbeat(serialNumber='economic',cbsdId='pull',grantId='save',grantState='same',carrier=729,maxEirp=1792)ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Package: 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>