Skip to content

Instantly share code, notes, and snippets.

View cuu508's full-sized avatar

Pēteris Caune cuu508

View GitHub Profile
from collections import*
from re import*
Phrase=type("",(str,),{"word_count":lambda o:Counter(findall("\w+",o.lower()))})
@cuu508
cuu508 / ExpandablePanel.java
Created April 28, 2011 23:37
Expandable Panel Android widget -- WIP
package com.example.myapp.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.LinearLayout;
@cuu508
cuu508 / androidicon.py
Created April 27, 2011 19:28
GIMP plugin for applying Android menu icon style
#!/usr/bin/env python
# GIMP plugin for applying Android menu icon style
# For batch processing, use it like this:
# gimp -i --batch-interpreter=python-fu-eval -b 'pdb.python_fu_androidicon_batch(None, None, "/path/to/pictures/*.svg", "/path/to/res");pdb.gimp_quit(1)'
from gimpfu import *
import glob
import os
import shutil