Miriam Ruiz: GoPlay!
apt-get install debtags ept-cache
debtags update
mkdir /var/lib/popcon/
cd /var/lib/popcon
wget http://popcon.debian.org/all-popcon-results.txt.gz
ept-cache reindex
apt-get install debtags ept-cache
debtags update
mkdir /var/lib/popcon/
cd /var/lib/popcon
wget http://popcon.debian.org/all-popcon-results.txt.gz
ept-cache reindex
superimposing the Last Supper with its mirror-image throws up another picture containing a figure who looks like a Templar knight and another holding a small baby.Apparently all the websites showing the resulting image were heavily slashdotted, but superimposing a mirrored image is not rocket science, so I gave it a try. The result has nothing to do with Templar knights, but is shows very clearly that Jesus becomes Chtulhu:
Excited by this finding, I looked for more. I could not find much in the Mona
Lisa:
But indeed the Vitruvian
Man after
superimposing a mirror image shows incredibly large balls:
Leonardo was Italian, and in Italy "growing big balls" means "getting very
tired and sick of something". This is clearly a very deep message from
Leonardo.
But why stop at Lenoardo?
Absolutely wonderful.
Shortly you see if there are flights available on your preferred date."Shortly" has lasted for as long as 3 hours, which is when I decided to try again, and ultimately to try someone else.
Sorry, we were temporarily unable to process your request due to a technical problem. Please wait a moment and try again.I've waited countless moments, and now, 11 hours since my first try, their idea of a moment still isn't over. But what kind of technical problem is this anyway, which resolves itself on retry after waiting a moment?
Our website is currently undergoing maintenance. Please come back later.All day.
An error has occurred processing your request. Please contact our technical staff.without a link or any hint as to how to contact them. I just tried them all again, without any changes; 11 hours later. Apparently they don't want my business. I really wonder what the future of air travel will be. In many ways, I hope they stop dumping prices and concentrate again on customer satisfaction. But I guess that applies to pretty much everything these days. PS: I especially appreciate Easyjet's policy of separating friends: after buying one ticket on a given route in August and finding out that we need a second one, I am told that "the route you have selected will be available from 28 October 2007". The funny thing is that we already have a ticket for that route in August. They just don't want my friend to fly along... NP: Gazpacho: Firebird Update: Sam Morris alerted me to Kayak, a very impressive meta-search engine for flights. Sure beats visiting each site in turn (although that could get you better deals through specials), and also replaces STA Travel and Opodo for me. Update: Enrico Zini points me to skyscanner, which complements Kayak in that it searches only the low-cost airlines. Kayak does include EasyJet, but they aren't always the cheapest.
#!/usr/bin/perl -w
use strict;
use warnings;
while (<>)
s/std::basic_string<char, std::char_traits<char>, std::allocator<char> >\s*/std::string/g;
s/std::set<(.+?), std::less<\1>, std::allocator<\1> >/std::set<$1>/g;
print;
It's quite simple minded, but it has more than once been a lifesaver.
@expose(template="myapp.templates.foobar")
def index(self, someparam, **kw):
if 'language' in kw: turbogears.i18n.set_session_locale(kw['language'])
Then, we need a way to edit the current URL so that we can generate modified
links to self that preserve the existing path_info and query parameters. In
your main controller, add:
def linkself(**kw):
params =
params.update(cherrypy.request.params)
params.update(kw)
url = cherrypy.request.browser_url.split('?', 1)[0]
return url + '?' + '&'.join(['='.join(x) for x in params.iteritems()])
def add_custom_stdvars(vars):
return vars.update( "linkself": linkself )
turbogears.view.variable_providers.append(add_custom_stdvars)
(see the turbogears stdvars
documentation and the cherrypy
request documentation (cherrypy 2 documentation at the bottom of the
page))
And finally, in master.kid:
<div id="footer">
<div id="langselector">
<span class="language">
<a href="$ tg.linkself(language='it_IT') ">
<img src="$ tg.url('/static/images/it.png') "/>
</a>
</span>
<span class="language">
<a href="$ tg.linkself(language='C') ">
<img src="$ tg.url('/static/images/en.png') "/>
</a>
</span>
</div><!-- langselector -->
</div><!-- footer -->
$ ept-cache related wesnoth -t clean
wesnoth-editor - map editor for Wesnoth
wesnoth-server - multiplayer network server for Wesnoth
wesnoth-tsg - The South Guard official campaign for Wesnoth
wesnoth-ttb - A Tale of Two Brothers official campaign for Wesnoth
wesnoth-utbs - Under the Burning Suns official campaign for Wesnoth
asc - turn-based strategy game
attal - turn-based strategy game
xbattle - Concurrent multi-player battle strategy game
crimson - A hex-based tactical game
stratagus - realtime strategy game for Unix and X
fcmp - Free media files for FreeCraft
wormux - funny fight game on 2D maps
stratagus-gl - realtime strategy game for Unix and X - OpenGL version
boson - core package for Boson
netpanzer - online multiplayer tactical warfare game
You're looking for a package sort of like mutt and firefox?
$ ept-cache related mutt firefox -t clean
mozilla-thunderbird - Transition package for icedove rename
balsa - An e-mail client for GNOME
mozilla-mailnews - Transition package for Iceape Mail & Newsgroups and Address Book
mozilla-thunderbird-dev - Transition package for icedove-dev rename
mozilla-thunderbird-enigmail - Transition package for enigmail rename
mozilla-thunderbird-inspector - Transition package for icedove-inspector rename
firefox-gnome-support - Transition package for iceweasel rename
mozilla-firefox-gnome-support - Transition package for iceweasel rename
mozilla-thunderbird-typeaheadfind - Transition package for icedove-typeaheadfind rename
firefox-dom-inspector - Transition package for iceweasel rename
etpan-ng - console mail user agent based on libEtPan!
firefox-webdeveloper - Transition package for iceweasel rename
firefox-greasemonkey - Transition package for iceweasel rename
tkrat - Mail user agent with POP, IMAP, mh support using Tk
thunderbird - Transition package for icedove rename
All of this in ept-cache 0.5.7 uploaded tonight to unstable.
Remember to ept-cache reindex after upgrades, as the indexing algorithm
sometimes improves. With 0.5.7, for example, it generates an index which is
something like 66% smaller than the previous versions.
/usr/share/man/ /usr/share/info/ and /usr/share/doc directories and a much reduced number of translation files in /usr/share/locale - the default would be only the translation files for languages that are supported on that machine, via 'dpkg-reconfigure locales'. Initially, only the narrow filters needed by Emdebian were considered - discussions at DebConf7 have shown how this can be easily extended to support arbitrary filters - necessarily the risks of using such optional filters would be made clear to the users in the manpage etc. - so that any file in any package could be omitted from the install process and the package file lists as well as during the preparation of packages for embedded devices. /etc/dpkg/filters.d/) and would include the option to exclude files en-masse and specifically include some files that may otherwise be excluded in specific circumstances. The same filters could be used when building packages for embedded usage as well as installing Debian packages on systems where space is a problem. The main benefit of this filtering for Emdebian is that it makes it much easier to isolate the package changes needed to make the package cross-compilable from the changes needed to remove stuff that embedded devices don't need but which Debian Policy requires. This in turn makes Emdebian patches more useful to Debian maintainers when bugs are filed on their packages about a failed cross-build./usr/share/doc (which you can control) with /usr/share/locale/ (which you cannot currently control) or view the baobab images from my current laptop installation.ept-cache reindex to rebuild the index with
debtags in it.
The system is very clever: here is how it works.
First you prepare the query as usual: tokenize, stem and so on:
// This is the nice ept interface to Xapian
TextSearch textsearch;
Xapian::Enquire enquire(textsearch);
// Set up the base query
Xapian::Query query = textsearch.makeORQuery(keywords.begin(), keywords.end());
enquire.set_query(query);
// Get a set of tag-based tokens that can be used to expand the query
vector<string> expand = textsearch.expand(enquire);
// Build the expanded query
Xapian::Query expansion(Xapian::Query::OP_OR, expand.begin(), expand.end());
enquire.set_query(Xapian::Query(Xapian::Query::OP_OR, query, expansion));
// Get the results as usual
Xapian::MSet matches = enquire.get_mset(pos, 20);
for (Xapian::MSetIterator i = matches.begin(); i != matches.end(); ++i)
...
And this is how you build the expanded query:
// This functor filters out all tokens that are not tags
// (tags are indexed with a 'T' prefix)
struct TagFilter : public Xapian::ExpandDecider
virtual bool operator()(const std::string &term) const return term[0] == 'T';
;
static TagFilter tagFilter;
vector<string> TextSearch::expand(Xapian::Enquire& enq) const
// A Xapian RSet is a list of keywords that can be used to 'expand'
// the search to show more documents like a set of given ones
Xapian::RSet rset;
// Select the top 5 result documents as the 'good ones' to
// use to expand the search
Xapian::MSet mset = enq.get_mset(0, 5);
for (Xapian::MSet::iterator i = mset.begin(); i != mset.end(); ++i)
rset.add_document(i);
// Get the expansion terms, but only those that are tags
Xapian::ESet eset = enq.get_eset(5, rset, &tagFilter);
vector<string> res;
for (Xapian::ESetIterator i = eset.begin(); i != eset.end(); ++i)
res.push_back(*i);
// Pass the tags to the caller, who will OR them to their
normal keyword search
return res;
ept-cache info and make sure that the popcon and debtags data sources
are enabledept-cache search -t clean -s t- lessept-cache dumpavail keyword1 keyword2 grep-dctrl -sPackage,Search-Score .
To check how much a package would match certain keywords:
#!/bin/sh
PACKAGE=$1
shift
ept-cache dumpavail "$@" grep-dctrl -sSearch-Score -FPackage -X $PACKAGE
Technical details in the descriptions
The programming language used to implement the software and the X UI toolit
used by the software can also be removed from descriptions: Debtags offer a
better place to store this information, and most package managers now show tags
together with the package description.
Submitting descriptions for review
Submitting descriptions for review to the Smith Review
Project means posting them to
the publicly archived
debian-l10n-english mailing
list, and that may turn off some.
It would also be interesting to change the description template generated by
debhelper to mention the Smith Review Project and a link to description
guidelines
Description guidelines
There are various description guidelines that could use consolidation and
eventually inclusion in the Developers Reference.
For example, Writing package
descriptions is a very
good guide, but most of the unsolved issues at the end have actually now been
solved by the Smith Review Project.
apt-get install kcachegrind valgrind
valgrind --tool=callgrind programname
kcachegrind callgrind.out.nnnnn
You can see in what functions the program spent its time, for every function in
the program how much time it spent in every of the called functions and all
other sort of cool analysis. And it's graphical, interactive, useful, cool.
It helps to compile without libtool (otherwise you're valgrinding a shellscript
unless you do something like valgrind --tool=callgrind .libs/lt-programname.
It also helps to compile with debugging symbols.
Package: libept-dev
Description: High-level library for managing Debian package information
The library defines a very minimal framework in which many sources of data
about Debian packages can be implemented and queried together.
.
The library includes four data sources:
.
* APT: access the APT database
* Debtags: access the Debtags tag information
* Popcon: access Popcon package scores
* TextSearch: fast Xapian-based full text search on package description
.
This is the development library.
Package: ept-cache
Description: Commandline tool to search the package archive
ept-cache is a simple commandline interface to the functions of libept.
.
It can currently search and display data from four sources:
.
* The APT database
* The Debtags tag information
* Popcon package scores
* A fast Xapian-based full text index on package descriptions
Yes, this finally brings lots of very cool data sources about packages
together.
Try this one:
# Check if all data providers are active and give instructions on how
# to activate those that aren't
ept-cache info
# Follow the instructions to activate everything
# Show all GUI image editors, sorted by popularity, in reverse order
ept-cache search image editor -t gui -s p-
If you have the Xapian data provider enabled, the
results of a search are given in relevance order, the most relevant first.
And also, searches are done with proper stemming, so if you look for image
editor it will also find image editing, although it would score image
editor higher.
It's also quite lovely to work with it in C++. I'll improvise here a few
examples:
Print name and short description of every package
#include <ept/apt/apt.h>
#include <ept/apt/packagerecord.h>
using namsepace std;
using namespace ept::apt;
void playWithApt()
// Apt data source
Apt apt;
// Parser of package records
PackageRecord rec;
// Iterate all package records
for (Apt::record_iterator i = apt.recordBegin();
i != apt.recordEnd(); ++i)
rec.scan(*i);
cout << rec.pakcage() << " - " << rec.shortDescription() << endl;
Show all image editors
#include <ept/debtags/debtags.h>
#include <set>
using namespace ept::debtags;
void playWithDebtags()
// Apt data source
Apt apt;
// Parser of package records
PackageRecord rec;
// Debtags data source
Debtags debtags;
if (!debtags.hasData())
return;
set<Tag> tags;
tags.insert(debtags.vocabulary().tagByName("works-with::image:raster"));
tags.insert(debtags.vocabulary().tagByName("use::editing"));
tags.insert(debtags.vocabulary().tagByName("role::program"));
set<string> results = debtags.getItemsHavingTags(tags);
for (set<string>::const_iterator i = results.begin();
i != results.end(); ++i)
rec.scan(apt.rawRecord(*i));
cout << rec.pakcage() << " - " << rec.shortDescription() << endl;
Print all package names, sorted by popularity
#include <ept/popcon/popcon.h>
#include <algorithm>
using namespace ept::popcon;
// STL comparator
struct PopconCompare
Popcon& popcon;
bool operator<(const std::string& pkg1, const std::string& pkg2) const
return popcon[pkg1] < popocon[pkg2];
;
void playWithPopcon()
// Apt data source
Apt apt;
// Popcon data source
Popcon popcon;
vector<string> sorted;
if (!popcon.hasData())
return;
// Get all package names in the vector
copy(apt.begin(), apt.end(), back_inserter(sorted));
// Sort it by popularity
sort(sorted.begin(), sorted.end(), PopconCompare(popcon));
// Print it out
for (vector<string>::const_iterator i = sorted.begin();
i != sorted.end(); ++i)
cout << *i << endl;
Search for image viewer, but we don't want to view kernel images
#include <xapian.h>
using namespace ept::textsearch;
void playWithXapian()
TextSearch textsearch;
vector<string> wanted;
vector<string> notwanted;
Xapian::Enquire enq(textsearch.db());
// This will tokenise the search query into terms, stem them
// and OR them together in a query. Xapian will score higher
// those results in which more ORed terms match, which is what
// we want.
Xapian::Query want = textSearch.makeOrQuery("image viewer");
Xapian::Query dontWant = textSearch.makeOrQuery("linux kernel");
enq.set_query(Xapian::Query(Xapian::Query::OP_AND_NOT, want, dontWant));
// Print the top 20 results, with their relevance percentage
Xapian::MSet matches = enq.get_mset(0, 20);
for (Xapian::MSetIterator i = matches.begin(); i != matches.end(); ++i)
// The get_data() of a document is the package name
cout << i.get_document().get_data() << " ("
<< i.get_percent() << "%)" << endl;
Next.