Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...databases that are too large to fit into memory. Objects should be loaded only when necessary and should be removed from memory when they are no longer needed. Most of these efforts are focused on providing persistence using relational database data. The efforts are, for the most part, proceeding independently. Each will attempt to address the above requirements independently, with much duplication of effort. The Zope Object Database (ZODB) has satisfied the abo...
...database of molecules and fragments. Biomolecules (proteins, DNA, and RNA) are handled by subclasses of the generic Molecule class. Another important subset of MMTK implements schemas for calculating interaction energies (called somewhat incorrectly "force fields" in the simulation community). I/O-related code is the third pillar of MMTK. It reads and writes a few popular file formats plus its own trajectory format that is based on the netCDF format. Contrary to other trajectory file f...
...database and formats it as JSON to send to an HTTP client: class SiteView(FlaskView): @route('/site/<id_>', methods=['GET']) def get_site(self, id_): site = db.query('site_table').find(id_) return jsonify( first_seen=site.first_seen.isoformat() if site.first_seen is not None else None, id=site.id, is_active=site.is_active, last_seen=site.last_seen.isoformat() if site.last_seen is not None else None, url=s...
...Database maintenance Git object database and other files/directories under .git require periodic maintenance and cleanup. For example, commit editing left unreferenced objects (dangling objects, in git terminology) and these objects should be pruned to avoid collecting cruft in the DB. The command git gc is used for maintenance. Git automatically runs git gc --auto as a part of some commands to do quick maintenance. Users are recommended to run git gc --aggressive from time to time; git help gc ...
...database transaction managers for coroutines: async def commit(session, data): ... async with session.transaction(): ... await session.update(data) ... Code that needs locking also looks lighter: async with lock: ... instead of: with (yield from lock): ... Asynchronous Iterators and "async for" An asynchronous iterable is able to call asynchronous code in its iter implementation, and asynchronous iterator can call asynchronous code in its next me...
...database be closed properly, else the on-disk data and directory files can be left in mutually inconsistent states. dumbdbm.py's _Database.__del__() method attempted to close the database properly, but a shutdown race in _Database._commit() could prevent this from working, so that a program trusting __del__() to get the on-disk files in synch could be badly surprised. The race has been repaired. A sync() method was also added so that shelve can guarantee data is written to disk. The close() me...