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 | |
from httplib import HTTPConnection as Connection | |
import time | |
import sys | |
# send data | |
conn = Connection('saio:8080') # example.com:8090 | |
conn.request('GET', '/v1/AUTH_test/c/big', headers={}) | |
resp = conn.getresponse() |
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
function processLine(e) { | |
var line = e.target; | |
switch (line.getAttribute("_type")) { | |
case "reply": | |
case "topic": | |
var textnode = line.lastChild.firstChild; | |
if (textnode.nodeValue.substr(1, 5) == "opic:" || | |
textnode.nodeValue.indexOf("has set topic:") >= 0) { | |
var newdiv = document.createElement("div"); | |
newdiv.setAttribute("id", "thetopic"); |
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
$ git config --list | |
credential.helper=osxkeychain | |
user.name=John Dickinson | |
user.email=me@not.mn | |
color.ui=always | |
alias.st=status | |
alias.ci=commit | |
alias.co=checkout | |
alias.staged=diff --cached | |
alias.unstaged=diff |
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
diff --git a/doc/source/overview_replication.rst b/doc/source/overview_replication.rst | |
index 2db17d5..4d3803a 100644 | |
--- a/doc/source/overview_replication.rst | |
+++ b/doc/source/overview_replication.rst | |
@@ -2,48 +2,118 @@ | |
Replication | |
=========== | |
-Since each replica in swift functions independently, and clients generally require only a simple majority of nodes responding to consider an operation successful, transient failures like network partitions can quickly cause replicas to diverge. These differences are eventually reconciled by asynchronous, peer-to-peer replicator processes. The replicator processes traverse their local filesystems, concurrently performing operations in a manner that balances load across physical disks. | |
- |
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
def foo(x, y=None, *a, **kw): | |
print '%r, %r, %r, %r' % (x, y, a, kw) | |
foo(1) | |
foo(1, 2) | |
foo(1, 2, 3, 4, 5, bar=6) | |
foo(1, 2, y=3) # want: 1, 3, (2,), {} |
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
Last login: Tue Nov 24 14:41:49 on ttys001 | |
john>europa>~>$ testtoken | pbcopy | |
john>europa>~>$ curl -i -H "X-Auth-Token: xxx" http://saio:8080/v1/AUTH_test/ | |
HTTP/1.1 204 No Content | |
Content-Type: text/plain; charset=utf-8 | |
X-Account-Object-Count: 0 | |
X-Timestamp: 1448404927.22093 | |
X-Account-Bytes-Used: 0 | |
X-Account-Container-Count: 0 | |
X-Put-Timestamp: 1448404927.22093 |
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
john@openslice:~/swift$ rm -r .tox | |
john@openslice:~/swift$ tox | |
____________________________________________________________________ [tox sdist] _____________________________________________________________________ | |
[TOX] ***creating sdist package | |
[TOX] /home/john/swift$ /usr/bin/python setup.py sdist --formats=zip --dist-dir .tox/dist >.tox/log/0.log | |
[TOX] ***copying new sdistfile to '/home/john/.tox/distshare/swift-1.7.3.zip' | |
Traceback (most recent call last): | |
File "/usr/local/bin/tox", line 9, in <module> | |
load_entry_point('tox==1.3', 'console_scripts', 'tox')() | |
File "/usr/local/lib/python2.6/dist-packages/tox/_cmdline.py", line 19, in main |
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
$ ssh s.not.mn | |
Linux openslice 2.6.35.4-rscloud #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 GNU/Linux | |
Ubuntu 10.04.4 LTS | |
Welcome to Ubuntu! | |
* Documentation: https://help.ubuntu.com/ | |
Last login: Fri Sep 21 23:17:11 2012 from 75-101-56-125.dsl.static.sonic.net | |
john@openslice:~$ cd swift | |
john@openslice:~/swift$ nosetests test/unit/proxy/test_server.py:TestObjectController.test_leak_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
Instead of: | |
line = 'Sep 16 20:00:02 ',srv,' testsrv ', \ | |
'199.115.119.21 - 16/Sep/2012/20/00/02 GET ',obj, \ | |
' HTTP/1.0 200 - StaticWeb - - 17005 - ',txn,' - 0.0095 -' | |
stream = ["".join(line)] | |
How about: | |
stream = 'Sep 16 20:00:02 srv testsrv 199.115.119.21 - ' \ |
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
Last login: Tue Sep 11 19:42:36 2012 from 10.0.1.100 | |
OpenIndiana (powered by illumos) SunOS 5.11 oi_151a6 September 2012 | |
$ python | |
Python 2.6.4 (r264:75706, Apr 17 2011, 11:24:50) [C] on sunos5 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import ctypes, ctypes.util | |
>>> libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True) | |
>>> sys_fallocate = getattr(libc, 'fallocate') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> |