This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<openbox_config xmlns="http://openbox.org/3.4/rc"> | |
<resistance> | |
<strength>10</strength> | |
<screen_edge_strength>20</screen_edge_strength> | |
</resistance> | |
<focus> | |
<focusNew>yes</focusNew> | |
<!-- always try to focus new windows when they appear. other rules do | |
apply --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from os.path import join | |
from livereload.task import Task | |
from livereload.compiler import lessc | |
static = 'static' | |
def _add_css(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
def average_image_color(filename): | |
i = Image.open(filename) | |
h = i.histogram() | |
# split into red, green, blue | |
r = h[0:256] | |
g = h[256:256*2] | |
b = h[256*2: 256*3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="box"> | |
<img class="image" src="https://dl.dropbox.com/u/6450050/demo/music-player-air/images/359167072-1.jpg" alt=""> | |
<div class="text"> | |
<h2>title</h2> | |
<p>This's Photo.</p> | |
</div> | |
</div> | |
<style type="text/css"> | |
.box { | |
width: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
from color import _color_quantization | |
from color import _save_image, _get_hex_palette | |
from color import image | |
cq = _color_quantization(image, 8) | |
_save_image(cq, 'cq.png') | |
cq_palette = _get_hex_palette(cq, 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
# these code are from [ColorMeta](https://github.com/bcho/colormeta) | |
from PIL import Image | |
def rgb2xyz(r, g, b): | |
# RGB to CIE XYZ REC 709 | |
# http://www.easyrgb.com/index.php?X=MATH&H=02#text2 | |
def _rgb(c): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
from user_other_settings import an_user_gave_filter_which_always_returns_foo | |
# liquidluck meta | |
liquidluck = { | |
'source': 'content', | |
'output': 'deploy', | |
'static_output': 'deploy/static', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<openerp> | |
<data> | |
<record model="ir.ui.view" id="view_email_server_form_inherit"> | |
<field name="name">email.server.form.inherit</field> | |
<field name="model">email.server</field> | |
<field name="type">form</field> | |
<field ref="fetchmail.view_email_server_form" name="inherit_id" /> | |
<field name="arch" type="xml"> | |
<form string="POP/IMAP Server"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
{ | |
'name': 'claim and support', | |
'version': '0.0.1', | |
'author': 'hbc', | |
'website': '', | |
'category': 'Cutomised Modules', | |
'depends': [ | |
'mail_gateway' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
'''Solving system of linear equations with Gauss-Jordan elimination''' | |
from frac import Frac | |
class Equation(list): | |
def reduce_n(self, n): | |
'''Reduce the nth element to 1''' |
OlderNewer