
Python_Ruby
文章平均质量分 52
wonderfan
云计算,电商和移动互联网
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python: overview of Fabric
What is Fabric? Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. More specifically, Fabr原创 2013-11-04 22:04:22 · 672 阅读 · 0 评论 -
[Python] My Overview of Django
My Overview of Django Framework原创 2014-03-06 10:56:44 · 778 阅读 · 0 评论 -
[Python] Use Python to generate Java Unit Test codes automatically
This code snippet is used to generate the unit test of Java codes.原创 2014-03-20 21:20:05 · 960 阅读 · 0 评论 -
[Ruby]Guide to return statement
In Ruby language, the return statement in the Ruby functions are interesting, Let's explore them as below:原创 2014-07-06 21:27:19 · 640 阅读 · 0 评论 -
[Ruby] Define abstract methods
Ruby has its own style to define the abstract methods in its class.原创 2014-07-06 21:53:44 · 738 阅读 · 0 评论 -
[Ruby]How to create singleton class ?
Singleton is one design pattern in the software engineering. Ruby has its own special feature to declare singleton class原创 2014-07-07 09:59:00 · 737 阅读 · 0 评论 -
[Ruby] Ruby Variable Scope
Scope defines where in a program a variable is accessible. Ruby has four types of variable scope, local, global, instance and class.原创 2014-06-02 07:26:21 · 998 阅读 · 0 评论 -
[HA]负载均衡:HAPROXY与KEEPALIVED强强组合
如何利用haproxy和keepalived 配置负载均衡?原创 2014-07-26 08:32:35 · 1299 阅读 · 0 评论 -
[Python]剖析类的机理
Python是如何创建类的?原创 2014-07-26 16:24:11 · 912 阅读 · 0 评论 -
[Python] How to unpack and pack collection in Python?
How to unpack and pack collection in Python?原创 2014-08-04 10:47:50 · 650 阅读 · 0 评论 -
[Python]How to handle the exception in Python?
This post demonstrates how to use try clause to handle the exceptions.原创 2014-09-19 14:05:43 · 1116 阅读 · 0 评论 -
[Ruby] Install vagrant and virtualbox-4.2 on ububtu
This post tells you how to install the mix of vagrant and virtualbox on ubuntu.原创 2014-09-06 08:09:11 · 1045 阅读 · 0 评论 -
[Ruby]BOSH Introduction
How the BOSH works?原创 2014-09-06 08:43:56 · 893 阅读 · 0 评论 -
[OpenStack]Deploy WordPress Using Heat
How to write HOT?原创 2014-09-06 09:43:34 · 1112 阅读 · 0 评论 -
[Python]Understand attribute in Python
This recipe is a small code snippet of showing how to distinguish attribute and item in Python language.原创 2014-09-21 11:44:21 · 915 阅读 · 0 评论 -
[Django] Base class in the model layer
In the model layer, the Model class is the base class while the ModelBase class is metaclass. They are the entry points of the whole model layer原创 2014-08-16 21:50:44 · 743 阅读 · 0 评论 -
[Python] The attribute with dynamic __dict__
This essay is aimed to articulate the usage of attributes in Python language原创 2014-08-30 10:49:26 · 818 阅读 · 0 评论 -
[Python] How to use Pyramid?
In this blog, i will tell you how to use Pyramid by codes.原创 2014-03-04 11:59:18 · 922 阅读 · 0 评论 -
[Python] How to pack and unpack variables in Python?
The follow code snippets show how to use variables smartly.原创 2014-02-18 16:29:25 · 765 阅读 · 0 评论 -
[Python]Shallow and Deep copy operation
The difference between shallow and deep copying is only relevant for compound objects (objects that contain other objects, like lists or class instances).原创 2014-03-01 10:52:59 · 852 阅读 · 0 评论 -
Use Sqlite in Python
How to use Sqlite as the database in Python?原创 2013-12-29 19:07:57 · 720 阅读 · 0 评论 -
[Django] View class and Form
A view is a callable which takes a request and returns a response. This can be more than just a function, and Django provides an example of some classess wich can be used as views.These allow you to s原创 2014-01-08 08:31:12 · 753 阅读 · 0 评论 -
[Django] Tell your site how to load the template files?
TEMPLATE_DIRS = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'), ) TEMPLATE_LOADERS = ( 'django.template.loaders.app_directories.Loader', 'django.template.loaders原创 2014-01-09 08:14:14 · 503 阅读 · 0 评论 -
Use Django to show data
Simple codes for Django applicaiton原创 2013-12-25 17:59:26 · 1171 阅读 · 0 评论 -
[Python]Test Driven Development in Flask application
In this recipe, i will describe how to use TDD method to developer Flask application.原创 2014-01-23 08:40:40 · 1263 阅读 · 0 评论 -
[Python] ORM implemented by sqlalchemy
from sqlalchemy import create_engine,ForeighKey from sqlalchemy import Column,Date, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, bac原创 2014-01-16 07:49:37 · 596 阅读 · 0 评论 -
[Python] Put the log into file
import os import sys import logging import logging.handlers DEFAULT_LOG_LEVEL = logging.DEBUG LOG_DIR = 'logs' LOG_FILENAME = 'server.log' def init_logging(): try: if not os.path.exists(LOG_DIR):原创 2014-01-15 23:11:33 · 625 阅读 · 0 评论 -
[Python] Do your unit test to ensure code's quality
from unittest import TestCase, main class OutcomesTest(TestCase): def test_fail(self): self.assertTrue(True) def test_error(self): raise RuntimeError('Test error') def test_pass(self): se原创 2014-01-16 16:06:19 · 628 阅读 · 0 评论 -
[Python] One utility class for JSON output
from sqlalchemy.orm.attributes import InstrumentedAttribute import datetime class JsonUtils: entity_superclass = 'sqlalchemy.ext.declarative.Base' def __init__(self, depth=1): se原创 2014-01-17 16:44:43 · 660 阅读 · 0 评论 -
Restful application based on Cherrypy
class User: exposed = True @cherrypy.expose @cherrypy.tools.json_out(content_type='application/json') def get(self, id=None): json = utils.JsonUtils(depth=1) if id原创 2014-01-17 16:48:18 · 680 阅读 · 0 评论 -
[Python]Transform the entity result to JSON
This post gives the guide of how to use sqlalchemy's engine, session and query API and change the results into JSON format.原创 2014-01-17 21:38:37 · 1057 阅读 · 0 评论 -
[Python]How to use magic methods in Python?
In this article, i write a simple code example to explore how to use super,new,init and str magic method in Python.原创 2014-02-07 11:55:03 · 777 阅读 · 0 评论 -
[Python] Commands in Django
Commands in Django原创 2014-02-09 10:13:30 · 829 阅读 · 0 评论 -
[Python]The import utilities in Python Standard Library
The import utilities in Python Standard Library原创 2014-02-08 10:11:13 · 1961 阅读 · 0 评论 -
[Python] Importing Python Modules
Importing Python Modules原创 2014-02-08 10:06:31 · 845 阅读 · 0 评论 -
[Python] The project structure in Django
The project structure in Django原创 2014-02-10 22:30:44 · 1056 阅读 · 0 评论 -
[Python]Use Flask-Admin with PostgreSQL
This code recipe gives you an idea of how to use Flask-Admin with postgresql database.原创 2014-10-18 16:35:28 · 1636 阅读 · 0 评论