summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-05-08 07:55:14 +1200
committerLars Wirzenius <liw@liw.fi>2010-05-08 07:55:14 +1200
commit3ef8138c87a048871406ab10c5a3487de661c489 (patch)
tree3a2b6bedff93a05d6eeb28114af85f4d499fa705
parent7307aefb2f8e75349d9fe787d2e6001949c965f9 (diff)
downloadlarch-3ef8138c87a048871406ab10c5a3487de661c489.tar.gz
Add copyright and license information to every file.
-rw-r--r--Makefile17
-rw-r--r--btree/__init__.py16
-rw-r--r--btree/codec.py16
-rw-r--r--btree/codec_tests.py16
-rw-r--r--btree/intset.py16
-rw-r--r--btree/intset_tests.py16
-rw-r--r--btree/nodes.py16
-rw-r--r--btree/nodes_tests.py16
-rw-r--r--btree/nodestore.py16
-rw-r--r--btree/nodestore_disk.py16
-rw-r--r--btree/nodestore_disk_tests.py16
-rw-r--r--btree/nodestore_memory.py16
-rw-r--r--btree/nodestore_memory_tests.py16
-rw-r--r--btree/tree.py16
-rw-r--r--btree/tree_tests.py16
-rwxr-xr-xcodec-speed15
-rwxr-xr-xprofile14
-rwxr-xr-xspeed-test16
-rwxr-xr-xviewprof15
19 files changed, 300 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6aa8e08..f5d1b2b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,20 @@
+# Makefile for B-tree implementation
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
all:
check: all
diff --git a/btree/__init__.py b/btree/__init__.py
index 6960ed8..e133472 100644
--- a/btree/__init__.py
+++ b/btree/__init__.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
from nodes import LeafNode, IndexNode
from codec import NodeCodec
from tree import BTree, KeySizeMismatch
diff --git a/btree/codec.py b/btree/codec.py
index 47ae10f..71c5906 100644
--- a/btree/codec.py
+++ b/btree/codec.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import struct
import btree
diff --git a/btree/codec_tests.py b/btree/codec_tests.py
index 5e5e86d..4a34a9f 100644
--- a/btree/codec_tests.py
+++ b/btree/codec_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import unittest
import btree
diff --git a/btree/intset.py b/btree/intset.py
index 17ca1b7..707f081 100644
--- a/btree/intset.py
+++ b/btree/intset.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
class IntSet(object):
'''A dense set of integers.
diff --git a/btree/intset_tests.py b/btree/intset_tests.py
index 22f54bd..f60524b 100644
--- a/btree/intset_tests.py
+++ b/btree/intset_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import unittest
import intset
diff --git a/btree/nodes.py b/btree/nodes.py
index 2234e5e..45fdd5a 100644
--- a/btree/nodes.py
+++ b/btree/nodes.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
class Node(dict):
'''Abstract base class for index and leaf nodes.
diff --git a/btree/nodes_tests.py b/btree/nodes_tests.py
index 0dabe1f..0a8070a 100644
--- a/btree/nodes_tests.py
+++ b/btree/nodes_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import unittest
import btree
diff --git a/btree/nodestore.py b/btree/nodestore.py
index 531f30f..969bd54 100644
--- a/btree/nodestore.py
+++ b/btree/nodestore.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import btree
diff --git a/btree/nodestore_disk.py b/btree/nodestore_disk.py
index 97792c5..f9ca4ec 100644
--- a/btree/nodestore_disk.py
+++ b/btree/nodestore_disk.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import ConfigParser
import os
import struct
diff --git a/btree/nodestore_disk_tests.py b/btree/nodestore_disk_tests.py
index 8e131fe..0bfcf7c 100644
--- a/btree/nodestore_disk_tests.py
+++ b/btree/nodestore_disk_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import shutil
import tempfile
import unittest
diff --git a/btree/nodestore_memory.py b/btree/nodestore_memory.py
index e543463..0106a03 100644
--- a/btree/nodestore_memory.py
+++ b/btree/nodestore_memory.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import btree
diff --git a/btree/nodestore_memory_tests.py b/btree/nodestore_memory_tests.py
index 4628c5c..4c691be 100644
--- a/btree/nodestore_memory_tests.py
+++ b/btree/nodestore_memory_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import unittest
import btree
diff --git a/btree/tree.py b/btree/tree.py
index 11128b9..34a1447 100644
--- a/btree/tree.py
+++ b/btree/tree.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import struct
import btree
diff --git a/btree/tree_tests.py b/btree/tree_tests.py
index 6fd0d7d..296d3bc 100644
--- a/btree/tree_tests.py
+++ b/btree/tree_tests.py
@@ -1,3 +1,19 @@
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import random
import sys
import unittest
diff --git a/codec-speed b/codec-speed
index d9a5434..88c677a 100755
--- a/codec-speed
+++ b/codec-speed
@@ -1,4 +1,19 @@
#!/bin/sh
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
python -m timeit \
-s 'import btree' \
diff --git a/profile b/profile
index 0a0643e..1560d80 100755
--- a/profile
+++ b/profile
@@ -1,4 +1,18 @@
#!/usr/bin/python
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
diff --git a/speed-test b/speed-test
index 3cad0b4..f80f2ed 100755
--- a/speed-test
+++ b/speed-test
@@ -1,5 +1,19 @@
#!/usr/bin/python
-#
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Excercise my btree implementation, for simple benchmarking purposes.
# The benchmark gets a location and an operation count as command line
# arguments.
diff --git a/viewprof b/viewprof
index e1e757d..d49c997 100755
--- a/viewprof
+++ b/viewprof
@@ -1,4 +1,19 @@
#!/usr/bin/python
+# Copyright 2010 Lars Wirzenius
+#
+# 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import pstats
import sys