chevron-up bell reply instagram twitter2 feed3 finder search-25px-p0

Category Archives: Python

Introduction on Numpy

安装 numpy pip3 install numpy 12 pip3 install numpy  Some basic examples: import numpy as np # Create rank 1 array #[1,2,3] a = np.array([1, 2, 3]) # Create rank 2 array……

Flask Command Line

Happy New Year! Hope everything becomes better in 2018! From the version 0.11.0, Flask began to support shell command. Something you probably you already saw when you are using other web project, such as Django: ./manage.py shell 1……

Get Start with RabbitMQ

RabbitMQ is an open source & enterprise level messsage broker using AMQP protocal. The AMQP protocol is designed for asychronization and message dispatch. RabbitMQ can be used in time-consuming backend jobs such as sending emails to client, generating file for user to downl……

Using Jinja2 with Flask

Jinja2 is a flexible HTML Template along with with Flask, another commonly used Flask template is Mako. Install Jinja2 Install with PIP pip install jinja2 12 pip install jinja2  Basic Ope……

@property in Python

What is @property A normal class with class variable num: class Item(object): def __init__(self, value = 0): self._num = value 12345 class Item(object):     def __init__(self, valu……

Singleton in Python

There are a couple of ways of creating Singleton in Python: use module use __new__ use metaclass use decorator [gist https://gist.github.com/arkilis/67c72117ed76802bd5525e8ccb33c563/] Reference http://python.jobbole.com/87514/ http://www.arkilis.me

Python instance method vs. Static method vs. Class method

In Python, there are three methods: Instance method Static method Class method Look at the following code, have a test for yourself, what are the output: [gist https://gist.github.com/arkilis/341bf667a577b04b8b3a58bce78809a6 /] Results: 1: foo.method("instance method") -- OK ……

Python Teltra SMS SDK

telstra-sms-sdk A fully tested Python SDK allow you to send sms in a more easy way! Current version: 0.0.7 Support Python version: >=python 2.6 (not python3) If you have any questions or issue, please create an issue or pull request. Prerequisite Before you are using this lib, ……