Because i needed it, and the geodjango buildpack messed up the paths and newrelic support, i forked the standard buildpack and added (okay i copied the code from geodjango buildpack, thanks for that) the installation of the geos lib:
-
Tags
nice way to find out aprox boundaries: http://pos-map.appspot.com/en/coordinates10.html
and a library that totally rocks: http://toblerity.github.io/shapely/manual.html
put together and suddenly you have instand awesomeness
I don’t know what, they want from me
It’s like the more features they come across
The more problems i see
Here’s an informal job description for 2 open positions in my new company, please share it with the people who might be interested!
iOS Developer
Backend Developer
Anstatt Milliarden an sterbende Industrien, schwindliche Infrastrukturprojekten oder verbrecherische Banken zu verscherbeln würde sich doch gerade in der derzeitigen Krisensituation die Chance bieten wichtige strukturelle Reformen innerhalb Europas anzupacken. Die meiner Meinung nach vorrangigen Projekte wären die Schaffung einer europäischen Arbeitslosen- und Pensionsversicherung. Das würde nicht nur kurzfristig einen Haufen Arbeitsplätze schaffen, sondern auf lange Sicht auch einerseits Verwaltungskosten sparen, aber auch echte Wachstumsimpulse schaffen. Was hab ich von einem gemeinsamen Wirtschaftsraum, wenn ich in einem anderen Land zwar in alle Versicherungen einzahlen darf aber erst nach mindestbeitragszeiten von mehreren Jahren (wenn nicht Jahrzehnten) etwas herausbekomme. Ich denke das ist immer noch ein großer Hemmschuh in der flexibilität und mobilität am europäischen Arbeitsmarkt. Und wenn wir schon dabei sind bitte ich noch um ein einheitliches Umsatzsteuer System.
Klar diese Visionen brauchen mehr Mut zur Umsetzung als einfach mit der bisherigen Strategie weiter zu fahren, aber wenn sich die EU langfristig von der aktuellen Elendesverwaltung weg zu einem neuen Wachstumsmotor entwickeln will sind große Veränderungen dringend notwendig.
problem 1: given a list of dictionaries, you need to sum the (int) value of one of the dictionaries fields:
>>> from operator import itemgetter
>>> a = [{"foo": 1},{"foo": 2},{"foo": 3}]
>>> sum(map(itemgetter("foo"), a))
6
problem 2: given a list of dictionaries you want a sum of unique entries under one key
>>> a = [{"foo": "ATH"},{"foo": "ATH"},{"foo": "VIE"}]
>>> len(set(map(itemgetter("foo"), a)))
2
while i would not bet to much on the performance of those babies.
as django’s very own unlocalize filter outputs a string, we can not chain it’s result to the date filter. so i wrote this filter to format (standard) datestrings:
@register.filter
@stringfilter
def strftime(value, format):
return datetime.strptime(value[:19], '%Y-%m-%d %H:%M:%S').strftime(format)
UPDATE: i found a more elegant way to achive what i need, so instead of
{% flight.get_departure_time_display|unlocalize|strftime='%H:%M' %}
and handling the localization in the get_departure_time_display function, i use the timezone tag:
{% timezone flight.arrival_airport.timezone %}
{{ flight.get_arrival_time_display|date:"H:i" }}
{% endtimezone %}
looks much more readable to me.
the filter might come in handy somehwere in the future though, so i leave it as is.
You will not be able to stay home, brother.
You will not be able to turn on, log in and status update
You will not be able to lose yourself on your timeline and friends posts
Get distracted by commercials for online poker and penis enlargments,
while skipping through your spam folder.
Because the revolution will not be on the web.
The revolution will not be on the web.
The revolution will not be featured on youtube
in 4 parts with ads by google.
The revolution will not post pictures on flickr,
or on facebook’s mobile uploads,
using hipstamatic and instagram apps.
The revolution will not be on the web.
The revolution will not be a meme on 9gag or 4chan,
there will be no re-posts on tumblr, likes on facebook and +1s by google.
The revolution will not give you a longer lasting sex, one night stands in your area, or secret tricks for a flatter stomach.
The revoluton will not write you comments, emails or private messages,
because the revolution will not be on the web, Brother.
There will be no ACTA, no PIPA and no SOPA,
there wiil be no site’s shut down or videos blocked because of pirated material.
There will be no pictures of pigs shooting down brothers
filmed close captured on camera phones.
There will be no blogging about viral marketing campaigns and government abuses.
There will be no private sex tapes or pictures from hacked iPhones.
There will be no monthly membership fees.
The revolution will be avaible in your country.
The revolution will not be blocked by the national firewall.
The revolution will not be on the web, will not be on the web,
will not be on the web… The revolution will be live!
here’s the problem with freedom.
most people don’t care about freedom,
they will trade off their freedom for whatever will make them feel less alone.
that’s why societies form, why there are trends, why such things as facebook can be as successful as they are. why people still follow religions, football clubs and communist ideas. so if you want to sell something big don’t argument with freedom, argument with social acknowledgement. freedom will always be a niche market. a luxury product for the few who can afford it.
those who center their interests around freedom will always be considered outsiders, outcasts of society, as the very core of any society is not individual freedom but togetherness. whereas the reason for togetherness is not the substantial thing, but the operationality of it. societies do not break because of the peoples cry for freedom, but the spreading lack of communal identity.
so the outcome of revolutions is hardly ever more freedom, as it is not the intention of it in the first place.
a successfull revolution fixes the problem of alienation in a society, whereas a failed revoultion only is able to establish a feeling of togetherness upon it’s protagonists.
A nation that makes a great distinction between its scholars and its warriors will have its laws made by cowards and its wars fought by fools.
– Thucydides
Wehrpflichtgegner Argumentieren neben der alles diktierenden Kostenfrage vor allem mit Schlagwörtern wie Effizienz, Professionalität, ‘Zeitgemässheit’. Die Argumentation greifft aber ziemlich kurz, da viele Fragen, etwa nach der gesellschaftlichen Kontrollierbarkeit und die Bedeutung für die innere Sicherheit ausgespart bleiben.
Zusätzlich hat das Heer neben seinen offiziellen Aufgaben auch einen sozialen Faktor, der nicht zu unterschätzen ist. Während man sich Schule, Beruf und Freundeskreis mehr oder weniger aussuchen kann bzw. diese aus dem sozialen Hintergrund gegeben sind, müssen zum Heer alle die dazu fähig sind. Diese nunmehr 6 Monate sind daher einer der seltenen Zeiten im Leben wo viele wirklich intensiven Kontakt und gemeinsame, teilweise prägende Erfahrungen mit Menschen unterschiedlichster Gesellschaftsschichten haben. Idealerweise sollte das Heer auch so was wie weine Charakterschule sein, das hier oft Versäumnisse auftretten soll nicht verleugnet werden. Auch, das Grundwehrdiener oft gefühlt oder real unnütze und langweilige Arbeiten durchzuführen haben, und ein großteil der Zeit beim Bundesheer oft als vergeudetet angesehen wird. Aber genau hier, und nicht bei einer Abschaffung der allgemeinen Wehrpflicht, sollte angesetzt werden.
Denn ein Berufsheer hat im Vergleich zu einer Volksarmee für eine Gesellschaft schwerwiegende Auswirkungen, welche in der aktuellen Debatte nichtmal ansatzweise diskutiert werden. Ein aktuelles Beispiel dazu ist Ägypten, wo das Militär vor allem durch Zurückhaltung aufgefallen ist. Ägyptens Heer besteht vor allem aus jungen Grundwehrdienern, die nicht sehr viel von den Leuten auf der Straße trennt. Ein professioneller Aparat, wie ihn die Ägyptische Polizei darstellt verhält sich in so einer Situation jedoch erwiessenermaßen gänzlich anders.
Eine professionelle Armee kann wie eine professionelle Polizeitruppe nie so einen Querschnitt durch die Bevölkerung bilden wie eine Volksarmee. Zu befürchten ist das die meisten freiwilligen schon mit einer gewissen Grundeinstellung den Dienst antreten, und diese Einstellung in den Jahren der Kasernierung noch bestärkt wird. Die Gesellschaft ist da weit weg.
Darum ist ein Berufsheer vermutlich auch effizienter. Die Frage ist, wollen wir diese Effizienz? Effizienz im militärischen bedeutet nach innen und aussen Fähig sein Kriege zu führen. Das erfüllt ein Berufsheer sicher besser. Sicher fällt es einer Freiwilligen Armee leichter in Gefechte zu gehen, als mit Menschen die gezwungen werden. Wieso war die Widerstandsbewegung gegen den Vietnamkrieg so viel intensiver als jene gegen den Irakkrieg, und am Ende erfolgreich? Weil es damals noch die Wehrpflicht in den USA gab, und die jungen Wehrpflichtigen Amerikaner einfach versuchten ihre Haut zu retten. Und genau das ist der historische Irrtum der Anti-Wehrpflichts Bewegung: Wenn gesellschaftliche Verantwortung abgewälzt wird weil niemand den Arsch hinhalten und sich die Hände schmutzig machen will, dann schwindet damit auch die Möglichkeit der gesellschaftlichen Einflussname. Ein Heer wird es so oder so geben. Fragt sich nur ob es ein Heer aus dem Volk sein wird, oder eine hochtrainierte und bewaffnete ‘Parallelgesellschaft’.