- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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 python | |
import sys | |
import os.path | |
def clean_args(args): | |
if len(args) == 2: | |
search_word = args[1] |
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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
* Usege: | |
* | |
* $this->load->library('CsvUploader'); | |
* $this->csvuploader->open('/tmp/uploaded/test.csv'); | |
* | |
* $this->csvuploader->readHeader(); | |
* while ($data = $this->csvuploader->readLine(TRUE)) { |
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
# size分だけの数値を増やしたり減らしたりするジェネレータ | |
def repeat_range(range_size, offset = 0): | |
def repeat_gen(): | |
signed = 1 | |
i = -1 | |
while True: | |
i += signed | |
if i == 0 : |
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
{% for field in form %} | |
<div class="form-group {{funcs["yesno"](field.errors,"has-error")}}"> | |
<label for="{{field.label.field_id}}" class="col-sm-2 control-label">{{field.label.text}}</label> | |
<div class="col-sm-10"> | |
{% raw field(class_="form-control") %} | |
{% if field.description %} | |
<span class="help-block">{{ field.description}}</span> | |
{% end %} | |
{% if field.errors %} | |
<span class="help-block"> |
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
<?php | |
// アイキャッチの設定とデフォルト画像の登録 | |
add_action('init', function() { | |
add_theme_support('post-thumbnails'); | |
$filename = dirname(__FILE__) . "/img/no_image.png"; | |
if (file_exists($filename)) { | |
$wp_upload_dir = wp_upload_dir(); | |
$upload_path = $wp_upload_dir['path']; |
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
class Base(object): | |
def getAttributeKeys(self): | |
""" Baseを継承したクラスで定義された | |
要素(メソッドやプロパティ)のキーだけを取得したい | |
""" | |
class Child(Base): |
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
/** | |
* Copyright (c) 2014 pistatium | |
* | |
* This software is released under the MIT License. | |
* | |
* http://opensource.org/licenses/mit-license.php | |
*/ | |
import java.util.*; | |
import java.lang.Math; |
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 __future__ import absolute_import, division, print_function | |
import pickle | |
import functools | |
import redis | |