Skip to content

Instantly share code, notes, and snippets.

View btbytes's full-sized avatar
🐎
🏈

Pradeep Gowda btbytes

🐎
🏈
View GitHub Profile
@btbytes
btbytes / MoinMoin-1.1.1Install
Created August 21, 2008 22:32
MoinMoin 1.7.1 install script for Webfaction
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/usr/local/bin/python2.5
"""
MoinMoin-1.7.1.py install/uninstall script for WebFaction.
This installs the MoinMoin library in $HOME/lib/python2.5
and the MoinMoin CGI files in the webapp directory.
To prevent SPAM it removes the update rights for the anonymous
user and adds them for your username (you must create a MoinMoin
@btbytes
btbytes / DisqusThread.py
Created August 22, 2008 01:38
MoinMoin macro to insert Disqus.com powered comment thread into the wiki page
# -*- coding: iso-8859-1 -*-
"""
DisqusThread - macro to insert Disqus.com powered comment thread into the wiki page
@copyright: 2008 Pradeep Kishore Gowda <pradeep@btbytes.com>
@license: GNU GPL, see COPYING for details.
2008-08-22 Pradeep Kishore Gowda
* Initial release v1.0.0
import os, sys
from base64 import encodestring
from ZPublisher.Request import Request
from ZPublisher.Response import Response
from ZPublisher.BaseRequest import RequestContainer
from AccessControl.SecurityManagement import newSecurityManager
e=os.environ
e['SERVER_NAME']= 'localhost'
@btbytes
btbytes / create_plone_doc.py
Created March 7, 2009 04:08
Create Plone Documents programatically from the shell/script
'''
create_plone_doc.py
Create Plone Document from debug shell.
Useful for creating content automatically in Plone. Think data import from other CMSes. etc.
'''
from wrap import wrap #see http://gist.github.com/75207
from Products.CMFCore.utils import getToolByName
import transaction
@btbytes
btbytes / install_py-sip_on_mac.md
Created March 7, 2009 23:32
Install Python SIP on Mac OS X

Installing SIP on Mac proved to be a tad difficult with this error message

$ sudo port install py-sip

---> Activating python24 @2.4.6_0+macosx Error: Target org.macports.activate returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4 already exists and does not belong to a registered port. Unable to activate port python24.

So, I removed the whole directory:

$sudo rm -rf /opt/local/Library/Frameworks/Python.framework/Versions/2.4/

and then installed py-sip

@btbytes
btbytes / .gitignore
Created March 16, 2009 13:32
A simple Particle Swarm Optimisation implementation in Python
*~
*.pyc
/***** PKG **** */
/************************************************************************/
/* hardware access functions or macros */
/************************************************************************/
#ifdef CAN_PORT_IO
/* #error Intel port I/O access */
/* using port I/O with inb()/outb() for Intel architectures like
AT-CAN-MINI ISA board */
#ifdef IODEBUG

Following arstechnica's article on pyqt deployment I tried installing PyQT on mac

$ sudo port install python25
$ sudo port install python_select
$ sudo python_select python25
$ sudo port install py25-macholib-devel
$ sudo port install py25-sip

So far, so good. Installing py25-pyqt4 threw up an error Error: Target org.macports.configure returned: error copying "/opt/local/libexec/qt4-mac/mkspecs/macx-g++/qmake.conf": no such file or directory

\documentclass{article}
\usepackage{fontspec}
%
% This file is a sample tex file to illustrate use of
% XeTeX in typesetting Bengali document.
% License: GNU FDL: (C) Golam Mortuza Hossain, 2008
%
%
% Define fonts that you want to use
%

Tabbycat

Create an alternative to yaki using Repoze technologies.

Features

  • All the features supported by Yaki
  • Explore the possibility of using available RFC2822 parsers. One possible advantage is having multiline/complex metadata than one supported right now.

Repoze already has a lot of the components required.