This file contains hidden or 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 optparse import OptionParser | |
| import elliptics | |
| def iterate(s, group): | |
| route = s.routes.filter_by_group(group)[0] | |
| it_s = s.clone() | |
| it_s.cflags = 0 | |
| it_s.set_direct_id(route.address, route.backend_id) |
This file contains hidden or 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 | |
| import sys | |
| import errno | |
| import elliptics | |
| def main(): | |
| address = elliptics.Address.from_host_port_family(sys.argv[1]) |
This file contains hidden or 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
| { | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", | |
| "*.dds", |
This file contains hidden or 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
| import os | |
| local_base_dir = '/Users/user' | |
| mount_points = { | |
| 'host' : { | |
| '/home/user': 'volume' | |
| } | |
| } | |
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| # ============================================================================= | |
| # 2013+ Copyright (c) Kirill Smorodinnikov <shaitkir@gmail.com> | |
| # All rights reserved. | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or |
This file contains hidden or 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 | |
| import elliptics | |
| host='host' | |
| port=1025 | |
| family=2 | |
| remote = elliptics.Address(host, port, family) |
This file contains hidden or 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 print_address_ranges(address): | |
| import elliptics | |
| n = elliptics.create_node(remotes=[address]) | |
| s = elliptics.Session(n) | |
| print s.routes.get_address_ranges(elliptics.Address.from_host_port_family(address)) | |
| print_address_range('myhost:1025:2') |
This file contains hidden or 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
| #include <boost/python/manage_new_object.hpp> | |
| #include <boost/python/return_value_policy.hpp> | |
| some_object* some_function() { | |
| return new some_object(); | |
| } | |
| .def("some_function", some_function, boost::python::return_value_policy<boost::python::manage_new_object>(), |
This file contains hidden or 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
| import elliptics | |
| log = elliptics.Logger("/dev/stderr", 31) | |
| cfg = elliptics.Config() | |
| cfg.cookie = "0123456789012345678901234567890123456789" | |
| cfg.config.wait_timeout = 60 | |
| cfg.config.check_timeout = 60 | |
| n = elliptics.Node(log, cfg) |