Python Script to Automate Prism PZFX XML Data

I am working on a mathematical modeling figure using Graphpad Prism. I got data from a collaborator. He works on the computational part. He sends me his model fitting and simulation results in a set of CSV files. The data contains: Experiment data: 2 genotypes x 5 cell species x 7 times points x 3 […]

FireFox for Mac中文字体粗细大小不一的解决办法(默认英文)

我的Firefox for Mac 一直有这个问题,某些中文网站字体显示粗细大小不一。如图: 困扰我很久,参考知乎的答案: 答案中的用户把中文zh放在了en之前,结果访问很多国外网站比如Airbnb, Kayak时,它们默认我来自中国(因为zh-cn排第一嘛)。把界面,货币等都默认为中国,对于在海外学习生活的我们不是很方便。 解决办法是:把en-US(如果在美国),en放在zh-cn之前。 这样访问英文网站没问题,中文字体也没问题。效果如下图: 设置Firefox / Preferences / Content / Languages: 你也可以加入zh-hk,zh-tw以便访问这些地区的繁体网站。如图:

Template rendered html email for Web2py email verification and password reset

For discussion about this old problem, read Google group thread here. I ended up modifying gluon/ It is probably not a good practice. But it is the easiest solution. I edit register() and email_reset_password() modifying something like (depends on which one) message=self.messages.verify_email % d to message=(”,response.render(’email/template.html’, d)) Be careful with the ending parentheses, the two […]

Force SSL/HTTPS and non-www in web2py

Update 02.08.2018: Code is updated to use just one line to force https: request.requires_https() ======= I read this!topic/web2py/RzJ4pYtAWF4 and then I realized “cronjob” problem described in these answers are no longer relevant since `scheduler` has long since replaced `cron` I created a new model and add: ########## FORCED SSL non-www ########## […]

Securing Web2py with Let’s Encrypt / Certbot

In case anybody wondering the same question about using certbot/let’s encrypt and web2py: how do you serve the .well-known folder for certification, when all the request goes to wsgi handler? 1. use `–standalone` as David advised. But you have to stop the web server every time you renew. 2. instead, you can use the standard […]

Passenger WSGI setup with pyenv on Dreamhost for Web2Py

Update 2019.12.06: I have moved from DreamHost to Google Cloud VPS. If this post does not work for you, please see alternative method in a comment by Chris. I have been using fastcgi+flup (link) to run my web2py apps on shared Dreamhost hosting. But the speed was really mediocre. Dreamhost recommends Passenger WSGI for python […]

Inkscape Design Notes

1. Inkscape document background color does not export to PDF, but only to PNG. Use rectangle with desired color as background. 2. Inkscape does not support CMYK color mode for printing. Convert text to path, then import/open with Scribus to export PDF in CMYK mode. Text in SVG does not import into Scribus well. But […]

北京大学标志logo SVG 矢量文件加反白

最近帮校友会制作印刷品,需要用到logo矢量文件。但是北京大学视觉系统只提供了eps文件,而且反白的标志只提供了PNG,没有提供矢量文件。 我在网上用CloudConvert的在线工具把eps转成svg, 然后用inkscape反白处理,并把黑色的logo删除,单留了一个logo. 我把文件分享在这里,希望有同样需要的朋友能省点时间: 北京大学视觉系统标志原稿EPS 北京大学视觉系统标志SVG 北京大学视觉系统标志红色svg 北京大学视觉系统标志反白红底svg

挺可悲的 google广告里面一半是chinese girls/women

我那个china主题的网站上有google提供的关键字文字广告 几乎一半的广告条目是chinese girls / chinese women/ date chinese girls之类的 似乎关于中国除了旅游广告 就是这种卖肉的广告了 不知道这是互联网广告界的问题呢 还是我们中国(男人)的悲哀… sigh btw: 推见一个游戏 叫world of goo 今年独立游戏大奖,号称百年不遇的好游戏 可以与俄罗斯方块媲美