-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from JohnVinyard/python3
Python3
- Loading branch information
Showing
33 changed files
with
402 additions
and
314 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
__version__ = '2.12.1' | ||
|
||
from model import BaseModel, ModelExistsError | ||
from .model import BaseModel, ModelExistsError | ||
|
||
from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ | ||
from .feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ | ||
PickleFeature, ClobberPickleFeature, ClobberJSONFeature | ||
|
||
from extractor import Node, Graph, Aggregator, NotEnoughData | ||
from .extractor import Node, Graph, Aggregator, NotEnoughData | ||
|
||
from bytestream import ByteStream, ByteStreamFeature, ZipWrapper, iter_zip | ||
from .bytestream import ByteStream, ByteStreamFeature, ZipWrapper, iter_zip | ||
|
||
from data import \ | ||
from .data import \ | ||
IdProvider, UuidProvider, UserSpecifiedIdProvider, StaticIdProvider, \ | ||
KeyBuilder, StringDelimitedKeyBuilder, Database, FileSystemDatabase, \ | ||
InMemoryDatabase | ||
|
||
from datawriter import DataWriter | ||
from .datawriter import DataWriter | ||
|
||
from database_iterator import DatabaseIterator | ||
from .database_iterator import DatabaseIterator | ||
|
||
from encoder import IdentityEncoder, PickleEncoder | ||
from .encoder import IdentityEncoder, PickleEncoder | ||
|
||
from decoder import Decoder, PickleDecoder | ||
from .decoder import Decoder, PickleDecoder | ||
|
||
from lmdbstore import LmdbDatabase | ||
from .lmdbstore import LmdbDatabase | ||
|
||
from objectstore import ObjectStoreDatabase | ||
from .objectstore import ObjectStoreDatabase | ||
|
||
from persistence import PersistenceSettings, simple_in_memory_settings | ||
from .persistence import PersistenceSettings, simple_in_memory_settings | ||
|
||
from iteratornode import IteratorNode | ||
from .iteratornode import IteratorNode | ||
|
||
from eventlog import EventLog, RedisChannel, InMemoryChannel | ||
from .eventlog import EventLog, RedisChannel, InMemoryChannel | ||
|
||
from var import Var | ||
from .var import Var | ||
|
||
try: | ||
from nmpy import NumpyEncoder, PackedNumpyEncoder, StreamingNumpyDecoder, \ | ||
from .nmpy import NumpyEncoder, PackedNumpyEncoder, StreamingNumpyDecoder, \ | ||
BaseNumpyDecoder, NumpyMetaData, NumpyFeature | ||
except ImportError: | ||
pass |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from extractor import Node | ||
from .extractor import Node | ||
|
||
|
||
class DatabaseIterator(Node): | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import BaseHTTPServer | ||
import http.server | ||
import sys | ||
|
||
|
||
def handler_class(static_content): | ||
class DummyHandler(BaseHTTPServer.BaseHTTPRequestHandler): | ||
class DummyHandler(http.server.BaseHTTPRequestHandler): | ||
def do_GET(self): | ||
self.send_response(200) | ||
self.send_header('Content-Length', len(static_content)) | ||
self.send_header('Content-Type', 'text/plain') | ||
self.end_headers() | ||
self.wfile.write(content) | ||
self.wfile.write(content.encode()) | ||
|
||
return DummyHandler | ||
|
||
if __name__ == '__main__': | ||
port = int(sys.argv[1]) | ||
content = sys.argv[2] | ||
server = BaseHTTPServer.HTTPServer( | ||
server = http.server.HTTPServer( | ||
('localhost', port), | ||
handler_class(content)) | ||
server.serve_forever() |
Oops, something went wrong.