Feed on
Posts
Comments

For half a decade, I have depended on the great open source Gallery2 project to host my photo galleries. Unfortunately, I am finding myself with less and less time to devote to maintaining the installation, and many useful social media features have yet to make it into its code base. So, I finally decided to port my entire gallery into flickr.

Much to my surprise, there are lots of scripts in the gallery database to import photos from flickr, but no functional scripts to export photos out of gallery2 into flickr. Several past attempts have been made, but I can get none of them to work properly. So I did what any good coder would do, I modified the existing scripts until it worked. I am providing the scripts I hacked at the end of this post. There are several caveats with the scripts that I’m including here:

  1. It’s recommended that you run this script (export-gallery.php) using command line php, or else the script might pre-maturely end due to Apache rest times. I also have max_execution_time = 0 set in my php.ini.
  2. It’s recommended that you dramatically increase resource limitations on your mysql server when attempting to run this script. I made no attempt at optimizing mysql calls at all. The script basically makes a new call whenever it wants new data. I have wait_timeout=600 set in my my.cnf.
  3. I offer NO support whatsoever for these scripts. They were created to ease my own personal transitions, and reading them should be fairly easy.
  4. The script utilizes PHPFlickr and is based on mindlesscode.net’s version of export-gallery. Several major upgrades to the original script have been made, including the ability to export sub-albums.
  5. I recommend only using getToken.php in phpFlickr, as I personally could not get PHPFlickr’s API authentication to work in any reliable fashion.
  6. You should see a line like this in export-gallery.php i.".DATABASE_COLUMN_PREFIX."ownerId=10 AND . This allows you to export galleries on a per-user basis. You can look up the userid information in the gallery2 tables.


So with that said, click here to download the script. You can run it by typing php export-gallery.php on the command line after editing a few variables at the top of export-gallery.php and setting up the API key / token combination from flickr. I used this very useful link from PHPFlickr to get my token after setting up the API key.

College campuses are increasingly turning into hubs for the spread of STDs as college students take on an increasing number of sexual partners. On average, college students now have around 3 sexual partners a year (Martens et al).

It turns out that male students in general would like to be much more promiscuous than their female counterparts. Undergraduate men expressed a desire for a significantly greater mean number of sex partners than did undergraduate women, over a 1-year period, women, on average, were interested in a single sex partner, whereas the average man expressed a desire for about seven partners (Fenigstein et al, 2007). This result did not change in a statistically significant way for those in serious relationships. What was particularly surprising to me is that males are actually successful in being more promiscious, even among the supposedly more conservative asian subgroup (Arliss 2008). As one can observe from the graph below, males have a much higher percentage of being sexually active with more than 3 partners than females.

The implications above are particularly disturbing for the spread of Human papillomavirus (HPV) infections. HPV is mostly harmless in men but might develop into cervical cancer in women. HPV is estimated to be the most commonly transmitted STD. A recent paper from Sexually Transmitted Disease: Influence of Partner’s Infection Status on Prevalent Human Papillomavirus Among Persons With a New Sex Partner included some extremely surprising statistics.

Women attending university or college in Montreal, Canada, and their male partners (N = 263 couples) were enrolled in 2005–2008. HPV was detected in 56% of women and men. 44% have a type that can lead to cancer. New relationships are when HPV transmission is most likely.

The overall prevalence rate of HPV in the US has never been firmly established, with rates ranging from 14% to 90% being published in peer-reviewed literature (Dunne et al, Revzina et al). Studies however, agree on the trend that a much higher incident rate of HPV is being reported on college campuses than in the general public.

The highest prevalence of HPV was identified among women attending sexually transmitted diseases (STD) clinics and college students, identifying them as target populations for prevention interventions. Conversely, the lowest HPV prevalence was among women in the general population.

With the recently released and much publicized HPV vaccine, many women might be lulled into a false sense of security. For one, the vaccine is only mildly effective on a few strains of the HPV virus, and only particularly effective PRIOR to exposure to the virus (Sawaya et al, 2007).

With grade 2 or 3 cervical intraepithelial neoplasia or adenocarcinoma in situ as the outcome, the difference in risk so far appears to be modest: 219 of 6087 vaccinated women (3.6%) received this diagnosis over an average of 3 years, as compared with 266 of 6080 unvaccinated women (4.4%). The absolute risk difference of 0.8% indicates that 129 women would need to be vaccinated in order to prevent one case of grade 2 or 3 cervical intraepithelial neoplasia or adenocarcinoma in situ occurring during this period. If grade 3 cervical intraepithelial neoplasia or adenocarcinoma in situ were the most relevant outcome, evidence was insufficient to infer the effectiveness of vaccination.

This does not mean that girls should not be given the HPV vaccine, rather that they should still be careful (condoms) and should still have regular screenings, even when vaccinated.

Tweets

More Posts