blist 1.1.1 is now available:
http://pypi.python.org/pypi/blist/
What is blist?
--------------
The blist is a drop-in replacement for the Python list the provides
better performance when modifying large lists. Python's built-in list
is a dynamically-sized array; to insert or removal an item from the
beginning or middle of the list, it has to move most of the list in
memory, i.e., O(n) operations. The blist uses a flexible, hybrid
array/tree structure and only needs to move a small portion of items
in memory, specifically using O(log n) operations.
For small lists, the blist and the built-in list have virtually
identical performance.
What's new?
-----------
blist 1.1 introduces other data structures based on the blist:
- sortedlist
- sortedset
- weaksortedlist
- weaksorteset
- sorteddict
- btuple
These additional data structures are only available in Python 2.6 or
higher, as they make use of Abstract Base Classes.
The sortedlist is a list that's always sorted. It's iterable and
indexable like a Python list, but to modify a sortedlist the same
methods you would use on a Python set (add, discard, or remove).
>>> from blist import sortedlist
>>> my_list = sortedlist([3,7,2,1])
>>> my_list
sortedlist([1, 2, 3, 7])
>>> my_list.add(5)
>>> my_list[3]
5
>>>
The sortedlist constructor takes an optional "key" argument, which may
be used to change the sort order just like the sorted() function.
>>> from blist import sortedlist
>>> my_list = sortedlist([3,7,2,1], key=lambda i: -i)
sortedlist([7, 3, 2, 1]
>>>
The sortedset is a set that's always sorted. It's iterable and
indexable like a Python list, but modified like a set. Essentially,
it's just like a sortedlist except that duplicates are ignored.
>>> from blist import sortedset
>>> my_set = sortedset([3,7,2,2])
sortedset([2, 3, 7]
>>>
The weaksortedlist and weaksortedset are weakref variations of the
sortedlist and sortedset.
The sorteddict works just like a regular dict, except the keys are
always sorted. The sorteddict should not be confused with Python
2.7's OrderedDict type, which remembers the insertion order of the
keys.
>>> from blist import sorteddict
>>> my_dict = sorteddict({1: 5, 6: 8, -5: 9})
>>> my_dict.keys()
[-5, 1, 6]
>>>
The btuple is a drop-in replacement for the built-in tuple. Compared
to the built-in tuple, the btuple offers the following advantages:
- Constructing a btuple from a blist takes O(1) time.
- Taking a slice of a btuple takes O(n) time, where n is the size of
the original tuple. The size of the slice does not matter.
>>> from blist import blist, btuple
>>> x = blist([0]) # x is a blist with one element
>>> x *= 2**29 # x is a blist with > 500 million elements
>>> y = btuple(x) # y is a btuple with > 500 million elements
Feedback
--------
We're eager to hear about your experiences with the blist. You can
email me at daniel(a)stutzbachenterprises.com. Alternately, bug reports
and feature requests may be reported on our bug tracker at:
http://github.com/DanielStutzbach/blist/issues
--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/>
Hi,
I'm happy to announce the "almost first" release of the acora package.
It can be downloaded from PyPI.
http://pypi.python.org/pypi/acora/1.1
What is Acora?
---------------
Acora is 'fgrep' for Python, a fast multi-keyword text search engine.
Based on a set of keywords, it generates a search automaton (DFA) and
runs it over string input, either unicode or bytes.
It is based on the Aho-Corasick algorithm and an NFA-to-DFA powerset
construction.
Acora comes with both a pure Python implementation and a fast binary module
written in Cython.
Features
---------
* works with unicode strings and byte strings
* about 2-3x as fast as Python's regular expression engine
* finds overlapping matches, i.e. all matches of all keywords
* support for case insensitive search (~10x as fast as 're')
* frees the GIL while searching
* additional (slow but short) pure Python implementation
* support for Python 2.5+ and 3.x
* support for searching in files
* permissive BSD license
How do I use it?
-----------------
Import the package::
>>> from acora import AcoraBuilder
Collect some keywords::
>>> builder = AcoraBuilder('ab', 'bc', 'de')
>>> builder.add('a', 'b')
Generate the Acora search engine for the current keyword set::
>>> ac = builder.build()
Search a string for all occurrences::
>>> ac.findall('abc')
[('a', 0), ('ab', 0), ('b', 1), ('bc', 1)]
>>> ac.findall('abde')
[('a', 0), ('ab', 0), ('b', 1), ('de', 2)]
Iterate over the search results as they come in::
>>> for kw, pos in ac.finditer('abde'):
... print("%2s[%d]" % (kw, pos))
a[0]
ab[0]
b[1]
de[2]
Deadline: Feb 1, 2010
OSCON, the O'Reilly Open Source Convention
July 19 - 23, 2010
Oregon Convention Center
Portland, OR
http://post.oreilly.com/rd/9z1zg6ii2gsi1l6cshb1806k2apmotnacpkrk77ttgg
Faster, Freer, Smarter: Whatever your Goal, Make It Happen with Open Source
More than 2,500 experts, developers, sys admins, and hackers will meet up
at OSCON 2010 to explore the tools, services, and platforms that make up
the vibrant open source ecosystem. Join us!
The OSCON Call for Participation is now open. If you have winning
techniques, favorite lifesavers, war stories, productivity tips, or other
ideas to share, we want to hear from you. We're especially on the
look-out for ways to do more with less, design and usability best
practices, mobile device innovations, cloud computing, parallelization,
open standards and data, open source in government, business models, and
beyond.
Speak up about the freedom--and opportunity--of open source at OSCON
2010. Submit your proposal by February 1, 2010 at:
http://en.oreilly.com/oscon2010/public/cfp/92
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair
PyModel is an open-source model-based testing framework in Python.
Code, documents, and downloads are available:
http://staff.washington.edu/jon/pymodel/www/
In unit testing, the programmer codes the test cases, and also codes
assertions that check whether each test case passed. In model-based
testing, the programmer codes a "model" that generates as many test
cases as desired and also acts as the oracle that checks the cases.
PyModel supports on-the-fly testing, which can generate indefinitely
long nonrepeating tests as the test run executes. PyModel can focus
test cases on scenarios of interest by composition, a versatile
technique that combines models by synchronizing shared actions and
interleaving unshared actions. PyModel can guide test coverage
according to programmable strategies coded by the programmer.
PyModel provides three programs:
- pma, pymodel analyzer: generates a finite state machine (FSM) and
computes properties by exploring a model program, FSM, test suite,
or a product of these.
- pmg, pymodel graphics: generates a file of graphic commands from an
FSM.
- pmt, pymodel tester: displays traces, generates tests offline,
executes offline tests, or generates and executes tests on-the-fly.
Use pma and pmg to visualize and preview the behavior of pmt. Every
path through the graph created by pma (and drawn by pmg) is a trace
(test run) that may be generated by pmt, when pma and pmt are invoked
with the same arguments.
There will be presentation on PyModel at Northwest Python Day 2010, on
Saturday, Jan 30, in Seattle:
http://www.seapig.org/NWPD10
Hello,
About LDTP:
Linux Desktop Testing Project is aimed at producing high quality test
automation framework (using GNOME / Python) and cutting-edge tools that can
be used to test Linux Desktop and improve it. It uses the Accessibility
libraries to poke through the application's user interface. We strive to
help in building a quality desktop.
Changes in this release:
Fixed ldtp binary name and now it spits out the version info
Updated README and AUTHORS file
Fixed OpenSolaris bug reported by Qinghua Cheng <Conny.Cheng(a)sun.com>
Acknowledgement:
Ara Pulido[1] requested the above change for backward compatibility. Thanks
to Ara, Conny.
Download RPM from
http://download.opensuse.org/repositories/home:/anagappan:/ldtp2:/rpm
Will schedule deb build tomorrow
Documentation references:
For detailed information on LDTP framework and latest updates visit
http://ldtp.freedesktop.org
For information on various APIs in LDTP including those added for this
release can be got from http://ldtp.freedesktop.org/user-doc/index.html
Report bugs - http://ldtp.freedesktop.org/wiki/Bugs
To subscribe to LDTP mailing lists, visit
http://ldtp.freedesktop.org/wiki/Mailing_20list
IRC Channel - #ldtp on irc.freenode.net
Thanks
Nagappan
[1] - http://ubuntutesting.wordpress.com/
--
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.orghttp://nagappanal.blogspot.com
... apologies for cross-posting and multiple copies!
4th Workshop on Dynamic Languages and Applications (DYLA 2010)
categories: programming languages, software engineering, computer science
When: Jun 28, 2010
Where: Malaga, Spain
Submission Deadline: Mar 31, 2010
Notification Due: May 14, 2010
Final Version Due: May 31, 2010
link: http://scg.unibe.ch/wiki/events/dyla2010
Call For Papers
The DYLA Workshop series focuses on the revival of dynamic languages.
These days, dynamic languages (like Ruby, Python, JavaScript, Lua,
etc…) are getting ever more popular. This is a call to arms for
academia! We need to explore the future of dynamic languages through
its human aspects and technical issues. We also ought to look back and
pick up solutions from existing dynamic languages (such as Scheme,
Smalltalk, or Self) to be rediscovered and spread around.
Goal and Topics
The goal of this workshop is to act as a forum where we can discuss
dynamic languages and their applications. Topics of interest include
any topic relevant in applying and/or supporting dynamic languages:
Ruby, Python, Groovy, JavaScript, Lua, Clojure, Lisp, Scheme,
Smalltalk, Self, ABCL, Prolog, and many more…
Human aspects of dynamic languages, such as
- empirical studies about the application of dynamic languages
- best practices and patterns specific to dynamic languages
- program correctness through unit testing (as opposed to types)
- improved or novel IDE support for dynamic languages
- use of dynamic features by library & framework developers
- scripting of static application with dynamic languages
- reverse engineering and analysis of dynamic applications
Technical aspects of dynamic languages, such as
- what features make a language a dynamic one?
- agents, actors, active object, distribution, concurrency and mobility
- delegation, prototypes, mix-ins, traits
- first-class closures, continuations, environments
- reflection and meta-programming
- automated reasoning about programs written in dynamic languages
- (concurrent/distributed/mobile/aspect) virtual machines
- optimization of dynamic languages
- multi-paradigm & static/dynamic-marriages
- type systems for dynamic languages
- (dynamic) aspects for dynamic languages
- higher-order objects & messages
- …other exotic dynamic features
Submissions
The workshop will have a demo-oriented style. The idea is to allow
participants to demonstrate new and interesting features and discuss
what they feel is relevant for the dynamic language community.
Participants need to submit a 2–4 page position paper of their work in
ACM, sig-alternate.cls format. At the workshop, participants will be
asked to give 10-minute “lightning demos” of their contributions.
Submission page is https://www.easychair.org/login.cgi?conf=dyla10
Organizers
- Alexandre Bergel, Univ of Chile,
- Carl Friedrich Bolz, Heinrich-Heine-Univ, Düsseldorf, Germany
- Simon Denier, INRIA Lille, France
- Michael Haupt, HPI Potsdam, Germany
- Adrian Kuhn, Univ of Bern, Switzerland
Program Committee
- Tom Dinkelaker, Technische Univ Darmstadt, Germany
- Johan Fabry, Univ of Chile
- Matthew Flatt, Univ of Utah, USA
- Stephan Herrmann, TU Berlin, Germany
- Abram Hindle, Univ of Waterloo, Canada
- Kasper Lund, Google, Denmark.
- Michael Perscheid, HPI Potsdam, Germany
- Rodolfo Toledo, Univ of Chile
- Niko Schwarz, Univ of Bern, Switzerland
- Peter Sommerlad, HSR Rapperswil, Switzerland
- Alessandro Warth, Viewpoints Research Institute, USA
- Vadim Zaytsev, Univ of Koblenz, Germany
For further information, please visit our website or follow us on twitter
- http://bit.ly/dyla2010
- http://twitter.com/dyla2010
Carl Friedrich Bolz
Where:
Company Dallas (http://www.companydallas.com/) located at 1701 North
Collins Boulevard
Second Floor (Next to Suite 2000)
Richardson, Texas 75080
When:
31 Jan @ 1000 CST
What:
c5t, The CMS for simple minds
Sprint Subjects:
* search
* style (CSS) templating
* calendar
* TESTS TESTS TESTS
Beer will be provided, email me for types... if you sadly can't attend
in person, then join us on #c5t on freenode.
About c5t:
"The CMS for simple minds" -- c5t bridges mongodb, mako, and TG to bring
forth a blazing-fast, easy to use, easy to modify way of storing
documents and content. Yes, a CMS can be fun again!
Veusz 1.6
---------
Velvet Ember Under Sky Zenith
-----------------------------
http://home.gna.org/veusz/
Veusz is Copyright (C) 2003-2010 Jeremy Sanders <jeremy(a)jeremysanders.net>
Licenced under the GPL (version 2 or greater).
Veusz is a Qt4 based scientific plotting package. It is written in
Python, using PyQt4 for display and user-interfaces, and numpy for
handling the numeric data. Veusz is designed to produce
publication-ready Postscript/PDF/SVG output. The user interface aims
to be simple, consistent and powerful.
Veusz provides a GUI, command line, embedding and scripting interface
(based on Python) to its plotting facilities. It also allows for
manipulation and editing of datasets. Data can be captured from
external sources such as internet sockets or other programs.
Changes in 1.6:
* User defined constants, functions or external Python imports can be
defined for use when evaluating expressions.
* Import descriptor is much more tolerant of syntax, e.g. "x,+- y,+,-" can
now be specified as "x +- y + -".
* New SVG export (PyQt >= 4.6). Supports clipping and exports text
as paths for full WYSIWYG.
* Dataset names can now contain any character except "`". Names containing
non-alphanumeric characters can be quoted in expressions `like so`*1.23
* Widget names can contain any character except "/"
* A transparency dataset can be provided to specify the per-pixel
transparency of the image widget.
* A polygon widget has been added.
* There is a new option to place axis ticks outside the plot (outer ticks
setting on axis widget)
* Several new line styles have been added.
* Several new plotting markers have been added.
* The capture dialog can optionally retain the last N values captured.
Minor changes:
* Use of flat cap line style for plotting error bars for exactness.
* Add fixes for saving imported unicode text.
* Fix image colors for big endian systems (e.g. Mac PPC).
* Add boxfill error bar style, plotting errors as filled boxes.
* Positive and negative error bars are forced to have the correct sign.
Features of package:
* X-Y plots (with errorbars)
* Line and function plots
* Contour plots
* Images (with colour mappings and colorbars)
* Stepped plots (for histograms)
* Bar graphs
* Plotting dates
* Fitting functions to data
* Stacked plots and arrays of plots
* Plot keys
* Plot labels
* Shapes and arrows on plots
* LaTeX-like formatting for text
* EPS/PDF/PNG/SVG/EMF export
* Scripting interface
* Dataset creation/manipulation
* Embed Veusz within other programs
* Text, CSV and FITS importing
* Data can be captured from external sources
Requirements for source install:
Python (2.4 or greater required)
http://www.python.org/
Qt >= 4.3 (free edition)
http://www.trolltech.com/products/qt/
PyQt >= 4.3 (SIP is required to be installed first)
http://www.riverbankcomputing.co.uk/pyqt/http://www.riverbankcomputing.co.uk/sip/
numpy >= 1.0
http://numpy.scipy.org/
Optional:
Microsoft Core Fonts (recommended for nice output)
http://corefonts.sourceforge.net/
PyFITS >= 1.1 (optional for FITS import)
http://www.stsci.edu/resources/software_hardware/pyfits
pyemf >= 2.0.0 (optional for EMF export)
http://pyemf.sourceforge.net/
For EMF and better SVG export, PyQt >= 4.6 or better is
required, to fix a bug in the C++ wrapping
For documentation on using Veusz, see the "Documents" directory. The
manual is in PDF, HTML and text format (generated from docbook). The
examples are also useful documentation.
Issues with the current version:
* Due to Qt, hatched regions sometimes look rather poor when exported
to PostScript, PDF or SVG.
* Due to a bug in Qt, some long lines, or using log scales, can lead
to very slow plot times under X11. It is fixed by upgrading to
Qt-4.5.1 (or using a binary). Switching off antialiasing in the options
may help.
If you enjoy using Veusz, I would love to hear from you. Please join
the mailing lists at
https://gna.org/mail/?group=veusz
to discuss new features or if you'd like to contribute code. The
latest code can always be found in the SVN repository.
Jeremy Sanders
Announcing Urwid 0.9.9.1
------------------------
Urwid home page:
http://excess.org/urwid/
Screen shots:
http://excess.org/urwid/examples.html
Tarball:
http://excess.org/urwid/urwid-0.9.9.1.tar.gz
About this release:
===================
This maintenance release fixes a number of bugs including a backwards
incompatibility introduced in the last release and a poor ListBox
snapping behaviour.
New in this release:
====================
* Fix for ListBox snapping to selectable widgets taller than the
ListBox itself
* raw_display switching to alternate buffer now works properly with
Terminal.app
* Fix for BoxAdapter backwards incompatibility introduced in 0.9.9
* Fix for a doctest failure under powerpc
* Fix for systems with gpm_mev installed but not running gpm
About Urwid
===========
Urwid is a console UI library for Python. It features fluid interface
resizing, UTF-8 support, multiple text layouts, simple attribute markup,
powerful scrolling list boxes and flexible interface design.
Urwid is released under the GNU LGPL.