NavigationUser login |
BlogsPython: Introduction for Absolute BeginnersSubmitted by interdocserv@ya... on Wed, 03/18/2009 - 05:26.
Excellent tutorial from the University of Cambridge for the non-tech savvy minded: Building a Community around SafetySubmitted by interdocserv@ya... on Wed, 03/18/2009 - 01:36.
Images for class presentation: Protecting sex-workers from violence in Tanzania USSD - alternative technology to SMSSubmitted by koit@mit.edu on Tue, 03/17/2009 - 21:45.
The alternative to SMS that I just mentioned in class is called USSD - Unstructured Supplementary Service Data, see the Wikipedia entry. Unfortunately, I didn't find anything meaningful about it in freeswitch manuals. SMS through email, and checking your gmail account in pythonSubmitted by pokharel@fas.ha... on Tue, 03/17/2009 - 18:49.
Our team dealt with text messages by using the email gateways that providers provide in the US to text messages. (Look here for info: http://en.wikipedia.org/wiki/SMS_gateway) The idea is this: you can send email from a text, and the email comes in as being from an email address that is tied to a phone. If you just reply to this address, then you will get a text message on the phone the first message was sent from. From my t-mobile phone, I text the number 500 with the message "cfa.baddate@gmail.com/no subject/some text" and the gmail account receives an email from 9703146388@tmomobile.com. When I reply to 9703146388@tmomobile.com, I get a text sent to my phone. So really, you can treat txts as short emails, and just use a library like libgmail (libgmail.sourceforge.net) to deal with gmail. Posted is selected parts of my code that you should be able to use once you have libgmail to send emails, also known as texts if you have the right numbers.
def recheck_gmail(self): def text(self,number,msg): And here's a simple outer loop using the code (for python 2.5 "from __future__ import with_statement", should work without any mods for python 2.6) Note: this code probably won't just work. This are just snippets of my code. Attached is the complete code. Needs a db.txt with a python dictionary. Protecting sex-workers from violence in TanzaniaSubmitted by alajous@mit.edu on Tue, 03/17/2009 - 18:37.
Description of the project The present project has the objective of establishing a pilot experiment where two kinds of applications involving the use of cell phone technology would be used in a cohort of sex-workers in the city of Mwanza Tanzania. The two applications are designed to provide sex workers with a private co-sex worker’s list that would benefit each member by exchanging information about their physical location when they are confronted with violent clients. 1. The system has a phone side component that is based on a count-down application which prompts the user to enter the location and number of hours she will be with the client. The information would only be distributed to a network of friends in the event that the application is not stopped. The phone would send an emergency SMS directly to a list of friends alerting them in real time about a possible danger situation. Rationale It is well established that government based support to prevent violence is scarce and sub-optimal in Tanzania, and that community based organization is required to solve many of the problems faced in this society including violence prevention. Information regarding violence against women is hard to standardize because of underreporting. In the case of Tanzania 19% of the women in Dar es Salaam reported being subject of physical violence by someone other than their partner.(WHO, 2004). Although the information is not particular to women related to the sex industry, it does tell us something about the general context of women in the country. According to the WHO there are several factors that increase the risk of being subjects of violence. Among them are: − financial autonomy, Considering these risk factors, sex-workers appear to be in a continuously precarious situation. Because of the structure of their occupation all this risks seem to be augmented by being present at the same time. Although a full-scale solution for violence would have to go deeper into the causes and solutions for these risk factors, empowerment and social support can be increased by the creation of networks and the enhancement of information sharing in the short term. We believe that the use of wireless technology can achieve this and help sex-workers reduce the risk of being subjected to gender-based violence. Materials and Methods We built three applications, two phone-based, and one server-based. The server-based application is a cell-phone based social network that takes in “bad date reports” from sex workers. The bad date reports are then sent out immediately (in real time) to members of the reporter's friends (as defined by the social network—coming soon), and also logged in a database. Newcomers, and those already in the system, can make use of the database by searching it for keywords. The idea is that sex workers will enter client violence information in free-form, for example by sending a text message saying “Australian blonde named Steve tried to hit me at Joe's Bar. He was refusing to wear condoms, and got unhappy when I insisted. Joe's wife helped me sneak out the back.” A new sex worker can then come along, and search the database for this message by any of the key words, for example, “getinfo Steve” or “getinfo Australian” will get him/her the previous message that was entered. SMS interface: Since SMS's are packaged up, and delivered via email, the server-based application is currently email based. In our tests, we were able to email to the programmer's cell-phone, by using the email gateway address of his cellphone “XXX@tmomobile.com” for a cell-phone XXX and t-mobile service carrier. The current reporting system uses cfa.baddate@gmail.com as it's sms recipient. In a field deployment, the system would want to use an actual number. This can be fed in through a GSM modem into python, and python can call a simple “process” function in our server in order to process these text messages. Database: As the application is built as a proof of concept, the database used is a simple python dictionary that is saved in a file using the cPickle library. The cPickle library simply generates text encodings of objects. In a real implementation, one would want to use a real database like SQL to do operations. “Social Network”: In order to determine who your friends are, there needs to be some sort of “social network” that needs to be built up on the server. The social network can be of differing varieties, and we explored three possibilities, which we can call the list-serve variety, the twitter variety, and the facebook variety. In the list-serve variety, there are entities which we can call list-serves that people can sign up to. Whenever somebody signs up to a list-serve, they become “friends” with everybody else on the list-serve. The facebook idea is that people can sign up friends directly, rather than using a list-serve as an intermediary. However, since this idea assumes that friendships are reciprocal, we would need a confirmation process. The third idea is that I can decide who's friend I am, but not who is my friend. This is the twitter idea—in that I can decide who to listen to, but not (directly) who listens to me. No confirmation is ostensibly required, but more user control needs to be built into the system. Feedback: The motivation for the server app is that it can store information that sex workers put in, and deliver it back to them in the future. The way to relay back information is again complicated, and calls for some ingenuity and experimentation. The current system simply searches all text messages for the user's query, and returns back the latest-by-date text message that has that query string in it. Other ideas could be: return the last N text messages sent regarding this query, use technologies such as SMS find to find appropriate answers, or have NGO curators looking at the database, and for each keyword (example: Australian, Steve, skinny, etc), make a summary text message that sex workers would get back when that keyword was queried. Again, the program is built to be easily modifiable to do any of the above things. Phone-based Applications The two phone-based applications are meant to further strengthen the sex worker community and encourage them to work together for their safety. Emergency Callback The first phone-based application is an Emergency Callback system modeled on a mobile phone system in use on some university campuses in the US. For example when the user is about to walk home to their dorm from a night out they enter into the mobile application the amount of time it should reasonably take them to get there. If the timer reaches the preset time limit and the user has not canceled the countdown then the system notifies campus security with their number and location and they try to call the user to see if they are alright. If no response then they go looking for the user. Our system operates in a similar manner based on a simple timer countdown. It can be used when a sex worker is walking home for the night or can be used to estimate how long they should reasonably be with a client before someone should check in on them. Because the local police are at best ignoring sex workers and at worse contributing to their abuse and exploitation our system notifies the users “social network” sending an SMS to all their friends either added locally on the phone from their list of contacts or via an SMS to the bad date reporting server which would then send out the message to the “social network”. In addition, since we cannot rely on sex workers’ cell-phones to be GPS enabled or network provided cell ID information we decided to use a simple prompt when entering the countdown time to also ask for their probable location. Bad Date Reporting The second phone-based application is to work in conjunction with the bad date reporting server. The open manner in which the bad date server receives reports is very useful in keeping the system flexible. However, victims of physical and sexual assault can be emotionally traumatized and have difficulty providing useful information in a strictly voluntary unprompted manner. For this reason we developed a simple cell-phone-based application that prompts the user for pertinent information about the incident. 1. Name of the client The above information is consolidated into an SMS with each answer separated by a delineator that is then sent to the bad date reporting server. Five or six questions seemed the appropriate number to ask, asking too many or too detailed questions can actually cause the victim to re-live the incident which can be difficult and potentially turn victims off from completing a report or using the system again in the future. Having a formatted series of questions with the answers delineated in the SMS makes the information easier to parse on the server side. Cell phone penetration and providers in Tanzania In Tanzania, the teledensity has been increasing from one per cent in 2000 to 25 per cent in 2008. Currently, there are six licensed mobile phone operators — Tanzania Telecommunications Company Ltd (TTCL), Zantel, Zain, Tigo, Vodacom and Benson. Cell phones are ideal tools for a mobile team and the equipment is less likely to be stolen compared with laptops or personal digital assistants. Cell phones don’t stick out in the field because from an outside observer, it looks like a sex-workers is just making a phone call. Therefore protecting this group from possible police investigation of retaliation from violent clients. However, there is a limitation to the use of cell phones because of the cost of the service in relation to the per capita income of the country. In fact Tanzania is one of the countries with the most expensive services according to the ITU, which calculated the cost of 25 monthly calls and 30 SMS at around 33% of the per capita income. In consequence cellphone penetration is not very high at 24 lines per 100 inhabitants. Applications involving the phone and the Internet have been described previously in literature. For example, Voxiva developed Alerta, a system that involves the phone and the Internet for communication and disease surveillance. Alerta was piloted initially in health clinics of the Ministry of Health in Peru, and later in October, 2002 http://www.prevenperu.org Voxiva platform for health solutions have been deployed in Latin America, Africa, Iraq, and India. For example, in Africa, Voxiva created a national HIV/AIDS information system for eight countries that monitors current data for national and global reporting requirements, and manages the use of antiretrovirals to reduce the spread of viral resistance. In India, Voxiva created, within a month, a surveillance system for Japanese encephalitis http://www.voxiva.net/. In South Africa, the project Cell Life http://www.cell-life.org/ is using cell phones to monitor adherence for the management of HIV/AIDS in patients on antiretroviral therapy. Some of the platforms Cell Life is using include a global system for mobile communications (GSM), wireless Internet gateway (WIG), and a geographical information system (GIS) database. Karras et al. reported in the procedures of the AMIA Symposium that a Java-enabled wireless phone could be potentially used in disaster response and public health informatics. They emphasized that the technology was inherently deployable, portable and that minimal orientation to new hardware was needed since everyone was comfortable with entering numbers on a phone keypad and pushing the send button. But not often these applications in data collection emphasize that communities should have access to the data generated nor there are sufficient planning in implementing the use of the data by the communities. Alternativa: Overcoming obstacles for non-party politics in MexicoSubmitted by alajous@mit.edu on Tue, 03/17/2009 - 17:04.
Alternativa is a political organization in Mexico that is trying to do politics outside of the party system 1. A closed political system Although Mexico has regular elections where there is some degree of competition since the mid-nineties, access to the political system for non-professional politicians is very limited. For example to compete in any election you have to be supported by a political party, and the prerequisites to form a political party are very high. (you need around 200,000 signatures plus territorial organization in 2/3 of the country). 2. Alternativa Alternativa was a political party that participated in the 2006 presidential elections with the only woman running for president, Patricia Mercado. Unexpectedly her campaign had some degree of success because it managed to link local mobilization with national politics. The campaign had very limited resources in comparison to the three big parties, but still it was able to get almost 3% of the national vote and some representation in congress. 3. Kicked-out! Exactly a year ago (march 16) during a party convention to elect the new chair-person of the party, a minority in the party allied with the big parties, hired a group a thugs and beat up the group that opposed these alliances. The expelled group was not only the majority of activists, but also most of the founders including Patricia Mercado. 4. What’s next? After leaving the party, some of the founders decided to reorganize to participate in politics, but outside of the party system. In Mexico there are few examples of this, but the ones that have been done have been fairly effective (i.e. the Zapatistas). This image alternativa is of an event made by Alternativa where the “monument for the revolution” was covered on “revolution day” to represent the urge to leave traditional politics in the past. The main message was: “less partyocracy, more citizenship” (To appreciate the size of the thing, compare the size of a person, to the monument). 5. Three projects to link local mobilization with national politics. At the moment Alternativa is trying to develop three projects centered in accountability before july 5, when mid-term elections will take place: a) Open-space debates between candidates in some districits. Get it while it's hot! Free Switch!Submitted by csik on Tue, 03/17/2009 - 05:27.
Dan has just uploaded his freeswitch tutorial: Sending SMS via Skype w/ only 6 lines of codeSubmitted by hellyeah@mit.edu on Tue, 03/17/2009 - 01:44.
Hey folks, [ note: for code examples, see the attached files. I just wasted an hour trying to force Drupal (this blogging software) to preserve whitespace so it doesn't destroy all python code posted. Can the admin for this blog change the whitespace settings so we can share python code here? ]
The Skype API under Linux has one complication: it will not run when invoked by other programs such as chron or mod_python. This is because it needs access to the XServer environment variables. My solution to this is to create a little Skype relay server that is invoked on the command line and runs perpetually. Other programs can send SMS messages by sending message data to the relay server via a UDP socket. The example below simply receives a message body (via UDP) and sends it (via the Skype API) to a hard-coded phone number list. SkypeRelayServer.py: Here is an example of a client script that uses SkypeRelayServer.py to send SMS messages. It's a python script in the mod_python environment that reads an SMS message string submitted from a Web form and sends the data to SkypeRelayServer.py to be broadcast via SMS.
Liberia’s Blackboard BloggerSubmitted by hellyeah@mit.edu on Tue, 03/17/2009 - 00:07.
Great article: http://www.afrigadget.com/2009/03/13/liberias-blackboard-blogger/ Alfred Sirleaf is an analog blogger. He take runs the “Daily News”, a news hut by the side of a major road in the middle of Monrovia. He started it a number of years ago, stating that he wanted to get news into the hands of those who couldn’t afford newspapers, in the language that they could understand. Alfred serves as a reminder to the rest of us, that simple is often better, just because it works. The lack of electricity never throws him off. The lack of funding means he’s creative in ways that he recruits people from around the city and country to report news to him. He uses his cell phone as the major point of connection between him and the 10,000 (he says) that read his blackboard daily. Brilliant response to censorshipSubmitted by shyamprasads@cdm.com on Fri, 03/13/2009 - 04:21.
Though NYT doesn’t really tell you the dirty part, a bit of googling does! http://www.nytimes.com/2009/03/12/world/asia/12beast.html?scp=1&sq=mud%2... |