Follow Andrews' post to install PyPy: andrewsmedina.com/2013/07/28/introducao-ao-pypy/
Create a virtualenv (I'm using virtualenvwrapper) with pypy executable:
$ mkvirtualenv lxml-pypy -p /path/to/bin/pypy
$ python --version | |
Python 2.7.3 (480845e6b1dd, Jul 31 2013, 10:58:28) | |
[PyPy 2.1.0 with GCC 4.2.1 Compatible Clang Compiler] | |
$ uname -a | |
Darwin MAC185954.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 | |
Unpacking /Users/flavia.carlette/projects/gevent | |
Running setup.py egg_info for package from file:///Users/flavia.carlette/projects/gevent | |
class Backuper(object): | |
def __init__(access, secret): | |
pass | |
def backup(self, instances): | |
image_id = self.snapshot(instances) | |
self.remove_old() | |
self.save_current(image_id) |
type DescribeLoadBalancerResp struct { | |
LoadBalancerDescriptions []LoadBalancerDescription | |
} | |
type LoadBalancerDescription struct { | |
AvailZones []string | |
BackendServerDescriptions []BackendServerDescriptions | |
CanonicalHostedZoneName string | |
CanonicalHostedZoneId string | |
CreatedTime time.Time //datetime |
package main | |
import ( | |
"fmt" | |
"launchpad.net/goamz/aws" | |
"launchpad.net/goamz/elb" | |
) | |
func main() { | |
auth := aws.Auth{"access", "secret"} | |
e := elb.New(auth, aws.Region{ELBEndpoint: "https://elasticloadbalancing.amazonaws.com"}) | |
createLB := &elb.CreateLoadBalancer{Name: "testLB"} |
// changes the data in db.collection[from] to | |
// db.collection[to] and deletes db.collection[from] | |
// how can I force the execution of the variables from and to? | |
function changeFieldKey(collection) { | |
var docs = db[collection].find({"from-key": {$exists: true}}); | |
for (var i = 0; i < docs.length(); i++) { | |
print(docs[i]) | |
docs[i]["to-key"] = docs[i]["from-key"]; | |
delete docs[i]["from-key"]; | |
print(docs[i]) |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'MYSQL_DATABASE_NAME', | |
'USER': 'MYSQL_USER', | |
'PASSWORD': 'MYSQL_PASSWORD', | |
'HOST': 'MYSQL_HOST', | |
'PORT': 'MYSQL_PORT', | |
} | |
} |
2012-07-10 09:43:48 DEBUG [keystone.common.wsgi] ******************** RESPONSE BODY ******************** | |
2012-07-10 09:43:48 DEBUG [keystone.common.wsgi] {"access": {"token": {"expires": "2012-07-11T12:43:48Z", "id": "1ed8531cf222422c9a77eb8319ff1df5", "tenant": {"description": null, "enabled": true, "id": "3358 | |
4a4f9c624ccea054db3ae2f253db", "name": "paas"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://nova:8774/v2/33584a4f9c624ccea054db3ae2f253db", "region": "RegionOne", "publicURL": " | |
http://nova:8774/v2/33584a4f9c624ccea054db3ae2f253db", "internalURL": "http://nova:8774/v2/33584a4f9c624ccea054db3ae2f253db"}], "endpoints_links": [], "type": "compute | |
", "name": "Compute Service"}, {"endpoints": [{"adminURL": "http://swift:8080", "region": "RegionOne", "publicURL": "http://swift:8080", "internalURL": "http://swift. | |
:8080"}], "endpoints_links": [], "type": "s3", "name": "S3 Service"}, {"endpoints": [{"adminURL": "http://glance:9292/v1", "region": "RegionOne", "publicURL": "http://glance:9292/ |
package main | |
import ( | |
"fmt" | |
"launchpad.net/goamz/aws" | |
"launchpad.net/goamz/ec2" | |
) | |
var auth aws.Auth | |
var region aws.Region |
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y install make libmysqlclient-dev x11-apps | |
wget http://www.rsyslog.com/files/download/rsyslog/rsyslog-4.6.1.tar.gz | |
tar xvf rsyslog-4.6.1.tar.gz | |
cd rsyslog-4.6.1 | |
sudo mkdir /var/log/rsyslog # replace by your $WorkDirectory value, if any |