サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Wikipedia
www.laurentluce.com
This post describes the implementation of sentiment analysis of tweets using Python and the natural language toolkit NLTK. The post also describes the internals of NLTK related to this implementation. Background The purpose of the implementation is to be able to automatically classify a tweet as a positive or negative tweet sentiment wise. The classifier needs to be trained and to do that, we need
This article describes how string objects are managed by Python internally and how string search is done. PyStringObject structure New string object Sharing string objects String search PyStringObject structure A string object in Python is represented internally by the structure PyStringObject. “ob_shash” is the hash of the string if calculated. “ob_sval” contains the string of size “ob_size”. The
This article describes how integer objects are managed by Python internally. An integer object in Python is represented internally by the structure PyIntObject. Its value is an attribute of type long. To avoid allocating a new integer object each time a new integer object is needed, Python allocates a block of free unused integer objects in advance. The following structure is used by Python to all
This post describes the CPython implementation of the list object. Lists in Python are powerful and it is interesting to see how they are implemented internally. Following is a simple Python script appending some integers to a list and printing them. >>> l = [] >>> l.append(1) >>> l.append(2) >>> l.append(3) >>> l [1, 2, 3] >>> for e in l: ... print e ... 1 2 3 As you can see, lists are iterable.
This post describes how dictionaries are implemented in the Python language. Dictionaries are indexed by keys and they can be seen as associative arrays. Let’s add 3 key/value pairs to a dictionary: >>> d = {'a': 1, 'b': 2} >>> d['c'] = 3 >>> d {'a': 1, 'b': 2, 'c': 3} The values can be accessed this way: >>> d['a'] 1 >>> d['b'] 2 >>> d['c'] 3 >>> d['d'] Traceback (most recent call last): File "<s
Home Python Python threads synchronization: Locks, RLocks, Semaphores, Conditions and Queues Python threads synchronization: Locks, RLocks, Semaphores, Conditions and Queues This article describes the Python threading synchronization mechanisms in details. We are going to study the following types: Lock, RLock, Semaphore, Condition and Queue. Also, we are going to look at the Python internals behi
This article describes the internals of launching an instance in OpenStack Nova. Overview Launching a new instance involves multiple components inside OpenStack Nova: API server: handles requests from the user and relays them to the cloud controller. Cloud controller: handles the communication between the compute nodes, the networking controllers, the API server and the scheduler. Scheduler: selec
Update 11/24/2011: Updated article based on the latest nova.sh script. This article describes the internals of the script nova.sh used to get the OpenStack Nova source code, install it and run it. Nova is a cloud computing fabric controller, the main part of an IaaS system. The script can be retrieved using Git: git clone https://github.com/vishvananda/novascript.git Arguments The script takes 1 m
Home Python Cars monitoring client/server application using Python Twisted This article describes how to use Twisted to build a client/server cars monitoring system. We are going to focus on the client/server communication. The client and server source code can be retrieved using Git: git clone https://github.com/laurentluce/twisted-examples.git Overview Some researchers invented a system capable
このページを最初にブックマークしてみませんか?
『Laurent Luce's Blog』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く