KategorieBlog

Altpapier Bot

Schon wieder haben wir die Karton-Abfuhr verpasst. Und schon wieder einen Monat warten und zuschauen, wie sich der Karton türmt. So entwickelte sich die Idee, doch einfach in unserem WG-Gruppenchat bei Karton- und Papierabfuhr benachrichtigt zu werden. Dank der öffentlich verfügbaren API war es in kurzer Zeit möglich, ein Script dazu einzurichten. Aus diesem Script wurde ein interaktiver Bot, der sich auf den eigenen Wohnort einstellen lässt. Seit Neuestem auch in meiner Heimatstadt St.Gallen. Im Nachfolgenden wird die Funktionsweise aufgezeigt.

Den Bot einrichten

Eröffne in Telegram einen neuen Chat mit @altpapierBot. Du findest ihn über die Suche. Anschliessend gib «/start» ein. Danach folgt eine kurze Instruktion. Die Stadt Zürich gruppiert die Abfuhr über Postleitzahlen, während die Stadt St.Gallen auf eigene Gebietscodes setzt. Entsprechend muss für Zürich die eigene Postleitzahl mittels «/zip 8048» eingegeben werden, während in St.Gallen der Gebietscode benötigt wird. Dieser ist unter anderem auf dem Abfuhrplan ersichtlich. Die Eingabe lautet in St.Gallen beispielsweise «/area B».

Im Nachfolgenden ist je ein Chat zum Setup in St.Gallen und Zürich zu sehen. Nach dem Einrichten wird man am Abend vor der Abfuhr sowie am Morgen des Abfuhrtages erinnert.

Altpapierbot für St.Gallen

Altpapierbot für Zürich

Wird der Bot nicht mehr benötigt, kann man sich mittels «/stop» abmelden.

Die weiteren Befehle

Hier eine vollständige Auflistung der Befehle:

/startStartet den Dialog
/zip XXXXRegistrierung in Zürich
/area XRegistrierung in St.Gallen
/helpHilfe mit Link auf diesen Blog und Kontaktmöglichkeit
/statsStatistiken zur Nutzung
/stopAbmeldung durch Löschung der Daten

Datenschutz und Quellcode

Nach einer Anmeldung wird ein Eintrag mit der Chat-Id und dem Gebietscode respektive der Postleitzahl in eine MySQL-Tabelle geschrieben. Bei der Chat-Id handelt es sich um die Identifizierung des Chats zwischen User und Altpapierbot. Nach der Abmeldung mittels «/stop» wird dieser Datensatz vollständig gelöscht. Die Daten werden auf pythonanywhere.com gehostet.

Der Quellcode ist unter WTF Public Licence auf Github veröffentlicht. Dort ist ebenfalls eine Liste von Issues zu finden. Gerne darf man auch Pull Requests einreichen 🙂

Living and working in the United Arab Emirates

High humidity, a large amount of karak tea and some highly questionable laws. My time in United Arab Emirates.

My Project

University of Sharjah (UOS) performs material calculations on a high performance computing (HPC) cluster in the modeling and simulation of advanced materials Research Group. Currently, these calculations are running on a proprietary software. My project studies and prepares the migration to Aiida, a free and open source alternative. Aiida is a sophisticated framework written in python and published under MIT license that promises to provide a flexible and scalable infrastructure for atomistic simulations of molecules and crystals using different methods such as quantum-mechanical first-principles.

Life in the UAE

The culturale differences betweeen the UAE and the western world are indiscutibile huge. The UAE are very federalistic. The Emirate of Dubai for example seems to be pretty western. People are wearing sleeveless T-Shirts, there are plenty of bars and nightclubs and you can even notice prostitution. Sharjah on the other side is very conservative. Alcohol is totally forbidden and you don’t feel comfortable walking around outside with shorts that don’t cover your knees even though it is allowed to do. University of Sharjah is even more extreme. Being conservative is somehow their unique selling proposition. But due to the fact that I am faculty staff I have some privileges compared to students. For example, I as a man am allow to talk with women on the campus, while its forbidden to do so as a student. Usually when we talk, a security guard steps by to check our ID’s. After he saw that we are faculty members everything is fine and the guard excuses himself.

In the beginning this was really strange, but i got used to it pretty fast. It is still a bit anoying that it’s not possible for a men and a woman to do sports together or to take the same bus becuase of the strict sex segregation. But the University did a really good job with connecting all the people from abroad with each other by placing our rooms in the dorms right next to each other. Also, there is a local committee that shows us around. Some typical activities are going to the beach, snorkeling, drinking karak (Arabic name for Chai-Tea) and camping in the desert.

Furthermore, it is somehow interessting to get a break from the oversexualized western world. Same as its refreshing to see how uncommon it is for young people to drink alcohol, while the consumtion in Europe is off the charts. This time here helped me to reflect my own alcohol consumtion.

I still have to summarize, that to me secularism is not discussable. This is the main reason I wouldn’t like to spend a longer period in a country that punishes homosexuality and sex before marriage or censores the Internet. Regardless, it was probably one of the most interesting experiences I’ve ever had.