code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
from distutils.core import setup, Extension cbson = Extension('cbson', sources = ['cbson.c']) setup(name = 'cbson', version = '0.1', description = 'Fast BSON decoding via C', ext_modules = [cbson])
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 152, 0, 2, 0, 0, 152, 0, 0 ], [ 14, 0, 0.3889, 0.2222, 0, 0.66, 0.5, 415, 3, 2, 0, 0, 248, 10, 1 ], [ 8, 0, 0.8333, 0.4444, 0, 0...
[ "from distutils.core import setup, Extension", "cbson = Extension('cbson',\n sources = ['cbson.c'])", "setup(name = 'cbson',\n version = '0.1',\n description = 'Fast BSON decoding via C',\n ext_modules = [cbson])" ]
#! /usr/bin/python from itertools import izip import logging from net import gorpc from net import bsonrpc from vtdb import dbexceptions class ReplPosition(object): MasterFilename = None MasterPosition = None RelayFilename = None RelayPosition = None def __init__(self, master_filename, master_position): ...
[ [ 1, 0, 0.0283, 0.0094, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0377, 0.0094, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0566, 0.0094, 0, ...
[ "from itertools import izip", "import logging", "from net import gorpc", "from net import bsonrpc", "from vtdb import dbexceptions", "class ReplPosition(object):\n MasterFilename = None\n MasterPosition = None\n RelayFilename = None\n RelayPosition = None\n\n def __init__(self, master_filename, maste...
import errno import logging import re import time import socket from vtdb import tablet3 as tablet2 from vtdb import dbapi from vtdb import dbexceptions RECONNECT_DELAY = 0.002 def reconnect(method): def _run_with_reconnect(self, *args, **kargs): attempt = 0 while True: try: return method(se...
[ [ 1, 0, 0.0108, 0.0108, 0, 0.66, 0, 546, 0, 1, 0, 0, 546, 0, 0 ], [ 1, 0, 0.0215, 0.0108, 0, 0.66, 0.0909, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0323, 0.0108, 0, ...
[ "import errno", "import logging", "import re", "import time", "import socket", "from vtdb import tablet3 as tablet2", "from vtdb import dbapi", "from vtdb import dbexceptions", "RECONNECT_DELAY = 0.002", "def reconnect(method):\n def _run_with_reconnect(self, *args, **kargs):\n attempt = 0\n ...
import exceptions class Error(exceptions.StandardError): pass class DatabaseError(exceptions.StandardError): pass class Warning(exceptions.StandardError): pass class InterfaceError(Error): pass class InternalError(DatabaseError): pass class OperationalError(DatabaseError): pass class ProgrammingError...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 3, 0, 0.1129, 0.0645, 0, 0.66, 0.1, 529, 0, 0, 0, 0, 153, 0, 0 ], [ 3, 0, 0.2097, 0.0645, 0, 0.66,...
[ "import exceptions", "class Error(exceptions.StandardError):\n pass", "class DatabaseError(exceptions.StandardError):\n pass", "class Warning(exceptions.StandardError):\n pass", "class InterfaceError(Error):\n pass", "class InternalError(DatabaseError):\n pass", "class OperationalError(DatabaseErro...
# Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # Give a somewhat sane API to the topology, using zkocc as the backend. # # There are two main use cases for the topology: # 1. resolve a "db key" into a set of par...
[ [ 1, 0, 0.12, 0.01, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.13, 0.01, 0, 0.66, 0.1, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.14, 0.01, 0, 0.66, 0.2, ...
[ "import json", "import logging", "import random", "from zk import zkocc", "from vtdb import keyspace", "__keyspace_map = {}", "def get_keyspace(name):\n return __keyspace_map[name]", " return __keyspace_map[name]", "def __add_keyspace(ks):\n __keyspace_map[ks.name] = ks", " __keyspace_map[ks.n...
# Implements a query thread pool, responsible for executing # queries/fetches across multiple database cursors in parallel and returning the # results. It implements one query per cursor, one query for all cursors, as well as # fetchmany and fetchall equivalents. from Queue import Queue from threading import Thread im...
[ [ 1, 0, 0.0364, 0.0061, 0, 0.66, 0, 952, 0, 1, 0, 0, 952, 0, 0 ], [ 1, 0, 0.0424, 0.0061, 0, 0.66, 0.0909, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0485, 0.0061, 0, 0....
[ "from Queue import Queue", "from threading import Thread", "import logging", "class ExecuteQueryQueueItem(object):\n def __init__(self, cursor, execute_args, execute_kargs, result_queue):\n self.cursor = cursor\n self.execute_args = execute_args\n self.execute_kargs = execute_kargs\n self.result_...
from vtdb import cursor # Standard cursor when connecting to a sharded backend. class ShardedCursor(object): arraysize = 1 lastrowid = None rowcount = 0 results = None sconn = None description = None index = None def __init__(self, sconn): self.sconn = sconn def close(self): self.sconn = N...
[ [ 1, 0, 0.0169, 0.0085, 0, 0.66, 0, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 3, 0, 0.3559, 0.6356, 0, 0.66, 0.5, 238, 0, 14, 0, 0, 186, 0, 7 ], [ 14, 1, 0.0508, 0.0085, 1, 0...
[ "from vtdb import cursor", "class ShardedCursor(object):\n arraysize = 1\n lastrowid = None\n rowcount = 0\n results = None\n sconn = None\n description = None\n index = None", " arraysize = 1", " lastrowid = None", " rowcount = 0", " results = None", " sconn = None", " description = None...
# times module # # This module provides some Date and Time interface for vtdb # # Use Python datetime module to handle date and time columns. from datetime import date, datetime, time, timedelta from math import modf from time import localtime # FIXME(msolomon) what are these aliasesf for? Date = date Time = time Tim...
[ [ 1, 0, 0.0972, 0.0139, 0, 0.66, 0, 426, 0, 4, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1111, 0.0139, 0, 0.66, 0.0588, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.125, 0.0139, 0, 0...
[ "from datetime import date, datetime, time, timedelta", "from math import modf", "from time import localtime", "Date = date", "Time = time", "TimeDelta = timedelta", "Timestamp = datetime", "DateTimeDeltaType = timedelta", "DateTimeType = datetime", "def DateFromTicks(ticks):\n return date(*local...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. from itertools import izip import logging from net import bsonrpc from net import gorpc from vtdb import cursor from vtdb import dbexceptions from vtdb import field_...
[ [ 1, 0, 0.0202, 0.004, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0243, 0.004, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0324, 0.004, 0, 0.6...
[ "from itertools import izip", "import logging", "from net import bsonrpc", "from net import gorpc", "from vtdb import cursor", "from vtdb import dbexceptions", "from vtdb import field_types", "class TabletConnection(object):\n transaction_id = 0\n session_id = 0\n cursorclass = cursor.TabletCursor\...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. from itertools import izip import logging import re from net import bsonrpc from net import gorpc from vtdb import cursor from vtdb import dbexceptions from vtdb imp...
[ [ 1, 0, 0.0171, 0.0034, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0205, 0.0034, 0, 0.66, 0.0625, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0239, 0.0034, 0, ...
[ "from itertools import izip", "import logging", "import re", "from net import bsonrpc", "from net import gorpc", "from vtdb import cursor", "from vtdb import dbexceptions", "from vtdb import field_types", "class RetryError(dbexceptions.OperationalError):\n pass", "class FatalError(dbexceptions.Op...
# A client that abstracts shard placement. import os import time from net import gorpc from vtdb import cursor from vtdb import dbapi from vtdb import dbexceptions from vtdb import keyspace from vtdb import tablet3 from zk import zkns_query from zk import zkocc # zkocc_addrs - bootstrap addresses for resolving other...
[ [ 1, 0, 0.0105, 0.0035, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0139, 0.0035, 0, 0.66, 0.0833, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0209, 0.0035, 0, ...
[ "import os", "import time", "from net import gorpc", "from vtdb import cursor", "from vtdb import dbapi", "from vtdb import dbexceptions", "from vtdb import keyspace", "from vtdb import tablet3", "from zk import zkns_query", "from zk import zkocc", "def connect(zkocc_addrs, local_cell, keyspace_...
# Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import json import struct from vtdb import dbexceptions ZK_KEYSPACE_PATH = '/zk/local/vt/ns' pack_keyspace_id = struct.Struct('!Q').pack # Encapsulate a few key ...
[ [ 1, 0, 0.0667, 0.0133, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.08, 0.0133, 0, 0.66, 0.1667, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1067, 0.0133, 0, 0....
[ "import json", "import struct", "from vtdb import dbexceptions", "ZK_KEYSPACE_PATH = '/zk/local/vt/ns'", "pack_keyspace_id = struct.Struct('!Q').pack", "class Keyspace:\n name = None\n db_types = None\n shard_count = None\n shard_max_keys = None # Sorted list of the max keys for each shard.\n shard_n...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file.
[]
[]
from vtdb import dbexceptions # A simple class to trap and re-export only variables referenced from # the sql statement since bind dictionaries can be *very* noisy. This # is a by-product of converting the DB-API %(name)s syntax to our # :name syntax. class BindVarsProxy(object): def __init__(self, bind_vars): ...
[ [ 1, 0, 0.0345, 0.0345, 0, 0.66, 0, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 3, 0, 0.431, 0.4138, 0, 0.66, 0.5, 403, 0, 3, 0, 0, 186, 0, 3 ], [ 2, 1, 0.3103, 0.1034, 1, 0.96...
[ "from vtdb import dbexceptions", "class BindVarsProxy(object):\n def __init__(self, bind_vars):\n self.bind_vars = bind_vars\n self.accessed_keys = set()\n\n def __getitem__(self, name):\n self.bind_vars[name]\n self.accessed_keys.add(name)", " def __init__(self, bind_vars):\n self.bind_vars =...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. from vtdb import dbexceptions class BaseCursor(object): arraysize = 1 lastrowid = None rowcount = 0 results = None connection = None description = None ...
[ [ 1, 0, 0.0259, 0.0052, 0, 0.66, 0, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 3, 0, 0.2435, 0.4197, 0, 0.66, 0.2, 477, 0, 14, 0, 0, 186, 0, 9 ], [ 14, 1, 0.0415, 0.0052, 1, 0...
[ "from vtdb import dbexceptions", "class BaseCursor(object):\n arraysize = 1\n lastrowid = None\n rowcount = 0\n results = None\n connection = None\n description = None\n index = None", " arraysize = 1", " lastrowid = None", " rowcount = 0", " results = None", " connection = None", " descr...
from array import array import datetime from decimal import Decimal from vtdb import times # These numbers should exactly match values defined in dist/mysql-5.1.52/include/mysql/mysql_com.h VT_DECIMAL = 0 VT_TINY = 1 VT_SHORT = 2 VT_LONG = 3 VT_FLOAT = 4 VT_DOUBLE = 5 VT_NULL = 6 VT_TIMESTAMP = 7 VT_LONGLONG = 8 VT_IN...
[ [ 1, 0, 0.0104, 0.0104, 0, 0.66, 0, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 1, 0, 0.0208, 0.0104, 0, 0.66, 0.025, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0312, 0.0104, 0, 0.6...
[ "from array import array", "import datetime", "from decimal import Decimal", "from vtdb import times", "VT_DECIMAL = 0", "VT_TINY = 1", "VT_SHORT = 2", "VT_LONG = 3", "VT_FLOAT = 4", "VT_DOUBLE = 5", "VT_NULL = 6", "VT_TIMESTAMP = 7", "VT_LONGLONG = 8", "VT_INT24 = 9", "VT_DATE = 10", ...
# Quick exclusive lock for ensuring two processes don't stomp each other. # # The only drawback here is that this leaves a lock turdfile that doesn't # get cleaned up. Practically speaking this shouldn't be a problem, but it # doesn't feel entirely satisfying. # # This lock has the handy property that if the process di...
[ [ 1, 0, 0.1724, 0.0172, 0, 0.66, 0, 546, 0, 1, 0, 0, 546, 0, 0 ], [ 1, 0, 0.1897, 0.0172, 0, 0.66, 0.25, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.2069, 0.0172, 0, 0....
[ "import errno", "import fcntl", "import logging", "import os", "class FLock(object):\n def __init__(self, path):\n self._path = path\n self._fd = None\n\n def acquire(self, blocking=True):\n if self._fd:\n raise ValueError('lock already held', self._path)", " def __init__(self, path):\n ...
#!/usr/bin/python import sys def main(args): print 'HELO\t2' if args: for arg in args: print "Q\t%s\tIN\tANY\t-1\t1.1.1.1\t1.1.1.2" % arg else: print "Q\ttest.zkns.zk\tIN\tANY\t-1\t1.1.1.1\t1.1.1.2" if __name__ == '__main__': main(sys.argv[1:])
[ [ 1, 0, 0.2143, 0.0714, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.5714, 0.5, 0, 0.66, 0.5, 624, 0, 1, 0, 0, 0, 0, 3 ], [ 8, 1, 0.4286, 0.0714, 1, 0.45, ...
[ "import sys", "def main(args):\n print('HELO\\t2')\n if args:\n for arg in args:\n print(\"Q\\t%s\\tIN\\tANY\\t-1\\t1.1.1.1\\t1.1.1.2\" % arg)\n else:\n print(\"Q\\ttest.zkns.zk\\tIN\\tANY\\t-1\\t1.1.1.1\\t1.1.1.2\")", " print('HELO\\t2')", " if args:\n for arg in args:\n print(\"Q\\t%...
#!/usr/bin/python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # FIXME(alainjobart) This test does not pass. It is a work in progress # for resharding. import utils import tablet # initial shards # range "" ...
[ [ 1, 0, 0.069, 0.0069, 0, 0.66, 0, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 1, 0, 0.0759, 0.0069, 0, 0.66, 0.0667, 374, 0, 1, 0, 0, 374, 0, 0 ], [ 14, 0, 0.1034, 0.0069, 0, ...
[ "import utils", "import tablet", "shard_0_master = tablet.Tablet()", "shard_0_replica = tablet.Tablet()", "shard_1_master = tablet.Tablet()", "shard_1_replica = tablet.Tablet()", "shard_2_master = tablet.Tablet()", "shard_2_replica = tablet.Tablet()", "shard_3_master = tablet.Tablet()", "shard_3_r...
#!/usr/bin/env python import json import optparse import os import pprint import socket import sys import unittest import urllib2 import tablet import utils # range "" - 80 shard_0_master = tablet.Tablet() shard_0_replica = tablet.Tablet() shard_0_spare = tablet.Tablet() # range 80 - "" shard_1_master = tablet.Table...
[ [ 1, 0, 0.0141, 0.007, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0211, 0.007, 0, 0.66, 0.0385, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0282, 0.007, 0, 0.6...
[ "import json", "import optparse", "import os", "import pprint", "import socket", "import sys", "import unittest", "import urllib2", "import tablet", "import utils", "shard_0_master = tablet.Tablet()", "shard_0_replica = tablet.Tablet()", "shard_0_spare = tablet.Tablet()", "shard_1_master =...
from cases_framework import Case, MultiCase cases = [ "alter table vtocc_cached comment 'new'", Case(doc="SELECT_PK (null key)", query_plan="SELECT_PK", sql="select * from vtocc_cached where eid = 2 and bid = %(bid)s", bindings={"bid": None}, result=[], rewritten=[ "sele...
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 991, 0, 2, 0, 0, 991, 0, 0 ] ]
[ "from cases_framework import Case, MultiCase" ]
import time from vtdb import dbexceptions from vtdb import vt_occ2 import framework import nocache_cases class TestNocache(framework.TestCase): def test_data(self): cu = self.env.execute("select * from vtocc_test where intval=1") self.assertEqual(cu.description, [('intval', 3), ('floatval', 4), ('charval',...
[ [ 1, 0, 0.0025, 0.0025, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0074, 0.0025, 0, 0.66, 0.2, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 1, 0, 0.0098, 0.0025, 0, 0.6...
[ "import time", "from vtdb import dbexceptions", "from vtdb import vt_occ2", "import framework", "import nocache_cases", "class TestNocache(framework.TestCase):\n def test_data(self):\n cu = self.env.execute(\"select * from vtocc_test where intval=1\")\n self.assertEqual(cu.description, [('intval', ...
import datetime from decimal import Decimal from cases_framework import Case, MultiCase cases = [ Case(doc='union', sql='select /* union */ eid, id from vtocc_a union select eid, id from vtocc_b', result=[(1L, 1L), (1L, 2L)], rewritten=[ 'select eid, id from vtocc_a where 1 !...
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.8, 0.2, 0, 0.66, 1, 991,...
[ "import datetime", "from decimal import Decimal", "from cases_framework import Case, MultiCase" ]
import json import re import urllib2 def cases_iterator(cases): for case in cases: if isinstance(case, MultiCase): for c in case: yield c else: yield case class Log(object): def __init__(self, line): self.line = line try: (self.method, self.remote_address, s...
[ [ 1, 0, 0.0044, 0.0044, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0089, 0.0044, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0133, 0.0044, 0, ...
[ "import json", "import re", "import urllib2", "def cases_iterator(cases):\n for case in cases:\n if isinstance(case, MultiCase):\n for c in case:\n yield c\n else:\n yield case", " for case in cases:\n if isinstance(case, MultiCase):\n for c in case:\n yield c\n el...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file.
[]
[]
from vtdb import cursor import framework class TestStream(framework.TestCase): # UNION queries like this used to crash vtocc, only straight SELECT # would go through. This is a unit test to show it is fixed. # The fix went in revision bad7511746ca. def test_union(self): cu = self.env.execute("select 1 fro...
[ [ 1, 0, 0.0133, 0.0133, 0, 0.66, 0, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 1, 0, 0.04, 0.0133, 0, 0.66, 0.5, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 3, 0, 0.5333, 0.9467, 0, 0.66,...
[ "from vtdb import cursor", "import framework", "class TestStream(framework.TestCase):\n # UNION queries like this used to crash vtocc, only straight SELECT\n # would go through. This is a unit test to show it is fixed.\n # The fix went in revision bad7511746ca.\n def test_union(self):\n cu = self.env.exe...
#!/usr/bin/env python import json import logging import optparse import os import subprocess import sys import utils from queryservice_tests import test_env create_table = """ create table vt_load( id bigint(20), num1 int(10) unsigned, char1 varchar(20), char2 varchar(20), num2 int(10) unsigned, char3 v...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.1053, 0.0526, 0, 0.66, 0.125, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, 0...
[ "import json", "import logging", "import optparse", "import os", "import subprocess", "import sys", "import utils", "from queryservice_tests import test_env", "def init_data(env):\n env.execute(create_table)\n env.execute(\"begin\")\n for pk in range(10000):\n fixed_values[\"id\"] = pk + 1\n ...
#!/usr/bin/env python import logging import optparse import unittest import sys import utils import framework from queryservice_tests import cache_tests from queryservice_tests import nocache_tests from queryservice_tests import stream_tests from queryservice_tests import test_env if __name__ == "__main__": pars...
[ [ 1, 0, 0.0484, 0.0161, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0645, 0.0161, 0, 0.66, 0.1, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0806, 0.0161, 0, 0.6...
[ "import logging", "import optparse", "import unittest", "import sys", "import utils", "import framework", "from queryservice_tests import cache_tests", "from queryservice_tests import nocache_tests", "from queryservice_tests import stream_tests", "from queryservice_tests import test_env", "if __...
#!/usr/bin/python import utils import tablet from vtdb import tablet3 as tablet2 from vtdb import topology from zk import zkocc # range "" - 80 shard_0_master = tablet.Tablet() shard_0_replica = tablet.Tablet() # range 80 - "" shard_1_master = tablet.Tablet() shard_1_replica = tablet.Tablet() def setup(): utils.z...
[ [ 1, 0, 0.01, 0.0033, 0, 0.66, 0, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 1, 0, 0.0134, 0.0033, 0, 0.66, 0.0556, 374, 0, 1, 0, 0, 374, 0, 0 ], [ 1, 0, 0.0201, 0.0033, 0, 0....
[ "import utils", "import tablet", "from vtdb import tablet3 as tablet2", "from vtdb import topology", "from zk import zkocc", "shard_0_master = tablet.Tablet()", "shard_0_replica = tablet.Tablet()", "shard_1_master = tablet.Tablet()", "shard_1_replica = tablet.Tablet()", "def setup():\n utils.zk_s...
#!/usr/bin/python import logging import os import socket import tempfile import time import datetime from zk import zkocc import utils def setup(): utils.prog_compile(['zkclient2', ]) utils.zk_setup() def teardown(): if utils.options.skip_teardown: return utils.zk_teardown() uti...
[ [ 1, 0, 0.0111, 0.0037, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0148, 0.0037, 0, 0.66, 0.0588, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0185, 0.0037, 0, ...
[ "import logging", "import os", "import socket", "import tempfile", "import time", "import datetime", "from zk import zkocc", "import utils", "def setup():\n utils.prog_compile(['zkclient2',\n ])\n utils.zk_setup()", " utils.prog_compile(['zkclient2',\n ...
#!/usr/bin/env python # coding: utf-8 import hmac import json import logging import os import subprocess import shutil import sys import time import unittest from net import gorpc from net import bsonrpc from vtdb import vt_occ2 from vtdb import dbexceptions LOGFILE = "/tmp/vtocc.log" QUERYLOGFILE = "/tmp/vtocc_quer...
[ [ 1, 0, 0.0169, 0.0042, 0, 0.66, 0, 993, 0, 1, 0, 0, 993, 0, 0 ], [ 1, 0, 0.0211, 0.0042, 0, 0.66, 0.0526, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0253, 0.0042, 0, ...
[ "import hmac", "import json", "import logging", "import os", "import subprocess", "import shutil", "import sys", "import time", "import unittest", "from net import gorpc", "from net import bsonrpc", "from vtdb import vt_occ2", "from vtdb import dbexceptions", "LOGFILE = \"/tmp/vtocc.log\""...
#!/usr/bin/python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import subprocess from vtdb import tablet3 from vtdb import topology from zk import zkocc import os import utils import tablet # single shard /...
[ [ 1, 0, 0.0242, 0.0035, 0, 0.66, 0, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0311, 0.0035, 0, 0.66, 0.0625, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 1, 0, 0.0346, 0.0035, 0, ...
[ "import subprocess", "from vtdb import tablet3", "from vtdb import topology", "from zk import zkocc", "import os", "import utils", "import tablet", "shard_0_master = tablet.Tablet()", "shard_0_slave = tablet.Tablet()", "cert_dir = utils.tmp_root + \"/certs\"", "def openssl(cmd):\n result = subp...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import optparse import os import sys import tempfile import unittest import warnings import tablet import utils from checkers import checker # Dropping a table inexplicably produces a warning despite # the "IF EXISTS" clause. Squelch these warnings. warn...
[ [ 1, 0, 0.012, 0.004, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0159, 0.004, 0, 0.66, 0.04, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0199, 0.004, 0, 0.66, ...
[ "import logging", "import optparse", "import os", "import sys", "import tempfile", "import unittest", "import warnings", "import tablet", "import utils", "from checkers import checker", "warnings.simplefilter(\"ignore\")", "skip_teardown = False", "destination_tablet = tablet.Tablet(62344)",...
#!/usr/bin/python import os import socket import utils import tablet shard_0_master = tablet.Tablet() shard_0_replica1 = tablet.Tablet() shard_0_replica2 = tablet.Tablet() shard_0_rdonly = tablet.Tablet() shard_0_backup = tablet.Tablet() shard_1_master = tablet.Tablet() shard_1_replica1 = tablet.Tablet() def setup...
[ [ 1, 0, 0.0109, 0.0036, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0145, 0.0036, 0, 0.66, 0.0556, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.0217, 0.0036, 0, ...
[ "import os", "import socket", "import utils", "import tablet", "shard_0_master = tablet.Tablet()", "shard_0_replica1 = tablet.Tablet()", "shard_0_replica2 = tablet.Tablet()", "shard_0_rdonly = tablet.Tablet()", "shard_0_backup = tablet.Tablet()", "shard_1_master = tablet.Tablet()", "shard_1_repl...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import os import shlex from subprocess import Popen, PIPE import unittest class TestCase(unittest.TestCase): @classmethod def setenv(cls, env): cls.env = env...
[ [ 1, 0, 0.0704, 0.0141, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0845, 0.0141, 0, 0.66, 0.1429, 300, 0, 1, 0, 0, 300, 0, 0 ], [ 1, 0, 0.0986, 0.0141, 0, ...
[ "import os", "import shlex", "from subprocess import Popen, PIPE", "import unittest", "class TestCase(unittest.TestCase):\n @classmethod\n def setenv(cls, env):\n cls.env = env\n\n def assertContains(self, b, a):\n self.assertTrue(a in b, \"%r not found in %r\" % (a, b))", " def setenv(cls, env)...
#!/usr/bin/python -B # # termineter.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 o...
[ [ 1, 0, 0.4583, 0.0208, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.4792, 0.0208, 0, 0.66, 0.2, 325, 0, 1, 0, 0, 325, 0, 0 ], [ 1, 0, 0.5, 0.0208, 0, 0.66, ...
[ "import logging", "from argparse import ArgumentParser", "from framework.interface import InteractiveInterpreter", "__version__ = '0.1.0'", "def main():\n\tparser = ArgumentParser(description = 'Termineter: Python Smart Meter Testing Framework', conflict_handler='resolve')\n\tparser.add_argument('-v', '--ve...
#!/usr/bin/python # -*- Mode: Python; py-indent-offset: 4 -*- # # Copyright (C) 2005,2007 Ray Burr # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without l...
[ [ 8, 0, 0.1139, 0.1304, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1829, 0.0015, 0, 0.66, 0.0455, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1859, 0.0015, 0, 0.66...
[ "\"\"\"\nThis module can model common CRC algorithms given the set of defining\nparameters. This is intended to be easy to use for experimentation\nrather than optimized for speed. It is slow even for a native Python\nCRC implementation.\n\nSeveral common CRC algorithms are predefined in this module.", "__docfo...
# c1218/data.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # (a...
[ [ 1, 0, 0.0415, 0.0021, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.0436, 0.0021, 0, 0.66, 0.0625, 45, 0, 4, 0, 0, 45, 0, 0 ], [ 14, 0, 0.0477, 0.0021, 0, 0...
[ "from struct import pack, unpack", "from c1218.utils import crc, crc_str, data_chksum, data_chksum_str", "ACK = '\\x06'", "NACK = '\\x15'", "C1218_RESPONSE_CODES = {\n\t0: 'ok (Acknowledge)',\n\t1: 'err (Error)',\n\t2: 'sns (Service Not Supported)',\n\t3: 'isc (Insufficient Security Clearance)',\n\t4: 'onp ...
# c1218/connection.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.0445, 0.0022, 0, 0.66, 0, 984, 0, 2, 0, 0, 984, 0, 0 ], [ 1, 0, 0.0468, 0.0022, 0, 0.66, 0.0769, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.049, 0.0022, 0, 0...
[ "from binascii import hexlify, unhexlify", "from struct import pack, unpack", "from random import randint", "from time import sleep", "import logging", "import serial", "from c1218.data import *", "from c1218.utils import find_strings, data_chksum_str", "from c1218.errors import C1218NegotiateError,...
# c1218/utils.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # (...
[ [ 1, 0, 0.4, 0.02, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.42, 0.02, 0, 0.66, 0.125, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.44, 0.02, 0, 0.66, 0.25...
[ "from struct import pack, unpack", "import string", "from binascii import hexlify, unhexlify", "import CrcMoose # Get it from: http://www.nightmare.com/~ryb/code/CrcMoose.py", "crc = CrcMoose.CRC_HDLC.calcString", "crc_str = lambda x: pack(\"<H\", crc(x))", "def data_chksum(data):\n\tchksum = 0\n\tfor i...
# c1218/errors.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # ...
[ [ 3, 0, 0.4083, 0.1667, 0, 0.66, 0, 255, 0, 2, 0, 0, 645, 0, 1 ], [ 8, 1, 0.3667, 0.05, 1, 0.1, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.4167, 0.05, 1, 0.1, 0.5, ...
[ "class C1218Error(Exception):\n\t\"\"\"\n\tThis is a generic C1218 Error.\n\t\"\"\"\n\tdef __init__(self, msg, errcode = None):\n\t\tself.message = msg\n\t\tself.errCode = errcode", "\t\"\"\"\n\tThis is a generic C1218 Error.\n\t\"\"\"", "\tdef __init__(self, msg, errcode = None):\n\t\tself.message = msg\n\t\ts...
# c1219/data.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # (a...
[ [ 1, 0, 0.0922, 0.0046, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0968, 0.0046, 0, 0.66, 0.1429, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1014, 0.0046, 0, ...
[ "import time", "from struct import pack, unpack", "from c1219.constants import *", "def formatLTime(endianess, tm_format, data):\n\t\"\"\"\n\tReturn data formatted into a human readable time stamp.\n\t\n\t@type endianess: String ('>' or '<')\n\t@param endianess: The endianess to use when packing values\n\t\n\...
# c1219/constants.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 ...
[ [ 14, 0, 0.0617, 0.0031, 0, 0.66, 0, 398, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0648, 0.0031, 0, 0.66, 0.0256, 560, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0679, 0.0031, 0, 0...
[ "GEN_CONFIG_TBL = 0", "GENERAL_MFG_ID_TBL = 1", "ED_MODE_STATUS_TBL = 3", "DEVICE_IDENT_TBL = 5", "PROC_INITIATE_TBL = 7", "PROC_RESPONSE_TBL = 8", "DIM_REGS_TBL = 20", "ACT_REGS_TBL = 21", "DATA_SELECTION_TBL = 22", "CURRENT_REG_DATA_TBL = 23", "PREVIOUS_SEASON_DATA_TBL = 24", "PREVIOUS_DEMAN...
# c1219/access/log.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.2241, 0.0086, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.2328, 0.0086, 0, 0.66, 0.25, 611, 0, 1, 0, 0, 611, 0, 0 ], [ 1, 0, 0.2414, 0.0086, 0, 0....
[ "from struct import pack, unpack", "from c1219.constants import *", "from c1219.data import getHistoryEntryRcd", "from c1219.errors import C1219ParseError", "class C1219LogAccess(object):\t\t# Corresponds To Decade 7x\n\t\"\"\"\n\tThis class provides generic access to the log data tables that are\n\tstored ...
# c1219/access/telephone.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 Licen...
[ [ 1, 0, 0.1421, 0.0055, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1475, 0.0055, 0, 0.66, 0.3333, 611, 0, 1, 0, 0, 611, 0, 0 ], [ 1, 0, 0.153, 0.0055, 0, 0...
[ "from struct import pack, unpack", "from c1219.constants import *", "from c1219.errors import C1219ParseError, C1219ProcedureError", "class C1219TelephoneAccess(object):\t# Corresponds To Decade 9x\n\t\"\"\"\n\tThis class provides generic access to the telephone/modem configuration\n\ttables that are stored i...
# c1219/access/security.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 Licens...
[ [ 1, 0, 0.1926, 0.0074, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.2, 0.0074, 0, 0.66, 0.2, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.2074, 0.0074, 0, 0.66, ...
[ "from struct import pack, unpack", "from c1218.errors import C1218ReadTableError", "from c1219.constants import *", "from c1219.data import getTableIDCBFLD", "from c1219.errors import C1219ParseError", "class C1219SecurityAccess(object):\t\t# Corresponds To Decade 4x\n\t\"\"\"\n\tThis class provides gener...
# c1219/access/general.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.1121, 0.0043, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1164, 0.0043, 0, 0.66, 0.1667, 611, 0, 1, 0, 0, 611, 0, 0 ], [ 1, 0, 0.1207, 0.0043, 0, ...
[ "from struct import pack, unpack", "from c1219.constants import *", "from c1219.errors import C1219ParseError", "from c1218.data import C1218WriteRequest", "from c1218.errors import C1218ReadTableError", "from c1218.utils import find_strings", "class C1219GeneralAccess(object):\t\t# Corresponds To Decad...
# c1219/errors.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # ...
[ [ 3, 0, 0.5581, 0.2093, 0, 0.66, 0, 975, 0, 2, 0, 0, 645, 0, 1 ], [ 8, 1, 0.5116, 0.0698, 1, 0.28, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.5698, 0.0465, 1, 0.28, ...
[ "class C1219ProcedureError(Exception):\n\t\"\"\"\n\tRaised when a procedure can not be executed\n\t\"\"\"\n\tdef __init__(self, msg):\n\t\tself.message = msg\n\t\n\tdef __str__(self):", "\t\"\"\"\n\tRaised when a procedure can not be executed\n\t\"\"\"", "\tdef __init__(self, msg):\n\t\tself.message = msg", "...
# framework/modules/diff_tables.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 th...
[ [ 1, 0, 0.1242, 0.0062, 0, 0.66, 0, 866, 0, 1, 0, 0, 866, 0, 0 ], [ 1, 0, 0.1304, 0.0062, 0, 0.66, 0.1111, 984, 0, 2, 0, 0, 984, 0, 0 ], [ 1, 0, 0.1366, 0.0062, 0, ...
[ "import difflib", "from binascii import hexlify, unhexlify", "from framework.templates import module_template", "import c1219.constants", "HTML_HEADER = \"\"\"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html>\n<head>\n ...
# framework/modules/remote_reset.py # # Copyright 2012 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 t...
[ [ 1, 0, 0.3448, 0.0172, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.3621, 0.0172, 0, 0.66, 0.3333, 254, 0, 1, 0, 0, 254, 0, 0 ], [ 1, 0, 0.3793, 0.0172, 0, ...
[ "from framework.templates import optical_module_template", "from c1219.errors import C1219ProcedureError", "from c1218.errors import C1218ReadTableError, C1218WriteTableError", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **...
# framework/modules/get_modem_info.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.274, 0.0137, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.2877, 0.0137, 0, 0.66, 0.2, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.3014, 0.0137, 0, 0.66...
[ "from framework.templates import optical_module_template", "from c1218.errors import C1218ReadTableError", "from c1219.data import C1219_CALL_STATUS_FLAGS", "from c1219.access.telephone import C1219TelephoneAccess", "from struct import pack, unpack", "class Module(optical_module_template):\n\tdef __init__...
# framework/modules/set_meter_mode.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.2703, 0.0135, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.2838, 0.0135, 0, 0.66, 0.25, 254, 0, 1, 0, 0, 254, 0, 0 ], [ 1, 0, 0.2973, 0.0135, 0, 0....
[ "from framework.templates import optical_module_template", "from c1219.errors import C1219ProcedureError", "from c1219.constants import C1219_METER_MODE_NAMES", "from c1218.errors import C1218ReadTableError, C1218WriteTableError", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs...
# framework/modules/get_security_info.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.2247, 0.0112, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.236, 0.0112, 0, 0.66, 0.25, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.2472, 0.0112, 0, 0.6...
[ "from framework.templates import optical_module_template", "from c1218.errors import C1218ReadTableError", "from c1219.access.security import C1219SecurityAccess", "from c1219.constants import C1219_TABLES, C1219_PROCEDURE_NAMES", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs...
# framework/modules/write_table.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 th...
[ [ 1, 0, 0.3333, 0.0167, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.35, 0.0167, 0, 0.66, 0.25, 984, 0, 1, 0, 0, 984, 0, 0 ], [ 1, 0, 0.3667, 0.0167, 0, 0.66...
[ "import re", "from binascii import unhexlify", "from framework.templates import optical_module_template", "from c1218.errors import C1218WriteTableError", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **kwargs)\n\t\tself.ve...
# framework/modules/get_info.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 L...
[ [ 1, 0, 0.241, 0.012, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.253, 0.012, 0, 0.66, 0.3333, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.2651, 0.012, 0, 0.66,...
[ "from framework.templates import optical_module_template", "from c1218.errors import C1218ReadTableError", "from c1219.access.general import C1219GeneralAccess", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **kwargs)\n\t\tse...
# framework/modules/dump_tables.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 th...
[ [ 1, 0, 0.274, 0.0137, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2877, 0.0137, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3014, 0.0137, 0, 0.66...
[ "from time import sleep", "import os", "from framework.templates import optical_module_template", "from c1219.data import C1219_TABLES", "from c1218.errors import C1218ReadTableError", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(sel...
# framework/modules/get_log_info.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 t...
[ [ 1, 0, 0.2667, 0.0133, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.28, 0.0133, 0, 0.66, 0.2, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.2933, 0.0133, 0, 0.66,...
[ "from framework.templates import optical_module_template", "from c1218.errors import C1218ReadTableError", "from c1219.data import C1219_EVENT_CODES", "from c1219.access.log import C1219LogAccess", "from struct import pack, unpack", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kw...
# framework/modules/read_table.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.4082, 0.0204, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.4286, 0.0204, 0, 0.66, 0.3333, 45, 0, 1, 0, 0, 45, 0, 0 ], [ 1, 0, 0.449, 0.0204, 0, 0.6...
[ "from framework.templates import optical_module_template", "from c1218.utils import find_strings", "from c1218.errors import C1218ReadTableError", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **kwargs)\n\t\tself.version = 1\...
# DO NOT DELETE THIS FILE #
[]
[]
# framework/modules/enum_tables.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 th...
[ [ 1, 0, 0.2899, 0.0145, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.3043, 0.0145, 0, 0.66, 0.25, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.3188, 0.0145, 0, 0....
[ "from framework.templates import optical_module_template", "from time import sleep", "from c1218.data import C1218ReadRequest, C1218_RESPONSE_CODES", "from c1219.data import C1219_TABLES", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(s...
# framework/modules/set_meter_id.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 t...
[ [ 1, 0, 0.3704, 0.0185, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.3889, 0.0185, 0, 0.66, 0.5, 800, 0, 1, 0, 0, 800, 0, 0 ], [ 3, 0, 0.713, 0.5926, 0, 0.66...
[ "from framework.templates import optical_module_template", "from c1219.access.general import C1219GeneralAccess", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **kwargs)\n\t\tself.version = 1\n\t\tself.author = [ 'Spencer McInt...
# framework/modules/run_procedure.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 ...
[ [ 1, 0, 0.3571, 0.0179, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.375, 0.0179, 0, 0.66, 0.3333, 984, 0, 1, 0, 0, 984, 0, 0 ], [ 1, 0, 0.3929, 0.0179, 0, 0...
[ "from framework.templates import optical_module_template", "from binascii import unhexlify", "from c1219.constants import C1219_PROCEDURE_NAMES, C1219_PROC_RESULT_CODES", "class Module(optical_module_template):\n\tdef __init__(self, *args, **kwargs):\n\t\toptical_module_template.__init__(self, *args, **kwargs...
# framework/modules/brute_force_login.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.1562, 0.0078, 0, 0.66, 0, 518, 0, 1, 0, 0, 518, 0, 0 ], [ 1, 0, 0.1641, 0.0078, 0, 0.66, 0.1429, 574, 0, 1, 0, 0, 574, 0, 0 ], [ 1, 0, 0.1719, 0.0078, 0, ...
[ "from framework.templates import optical_module_template", "from framework.utils import StringGenerator", "from binascii import unhexlify", "from time import sleep", "import os", "import re", "class BruteForce:\n\tdef __init__(self, dictionary_path = None):\n\t\tif dictionary_path == None:\n\t\t\tself.d...
# framework/core.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 #...
[ [ 1, 0, 0.0473, 0.0024, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0496, 0.0024, 0, 0.66, 0.0714, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.052, 0.0024, 0, 0...
[ "import os", "import re", "import sys", "import serial", "import logging", "import logging.handlers", "from binascii import unhexlify", "from serial.serialutil import SerialException", "from framework.errors import FrameworkConfigurationError, FrameworkRuntimeError", "from framework.options import...
# framework/templates.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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,...
[ [ 1, 0, 0.2817, 0.0141, 0, 0.66, 0, 961, 0, 2, 0, 0, 961, 0, 0 ], [ 3, 0, 0.5282, 0.4507, 0, 0.66, 0.3333, 657, 0, 4, 0, 0, 0, 0, 11 ], [ 14, 1, 0.3239, 0.0141, 1, ...
[ "from framework.options import AdvancedOptions, Options", "class module_template:\n\tfrmwk_required_options = ()\n\n\tdef __init__(self, frmwk):\n\t\tself.frmwk = frmwk\n\t\t\n\t\tself.name = 'unknown'\n\t\tself.version = 0", "\tfrmwk_required_options = ()", "\tdef __init__(self, frmwk):\n\t\tself.frmwk = frm...
# framework/interface.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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,...
[ [ 1, 0, 0.0311, 0.0016, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0327, 0.0016, 0, 0.66, 0.0714, 604, 0, 1, 0, 0, 604, 0, 0 ], [ 1, 0, 0.0342, 0.0016, 0, ...
[ "import os", "import cmd", "import sys", "import code", "import socket", "import logging", "import traceback", "from random import randint", "from framework.core import Framework, FrameworkConfigurationError", "from framework.errors import FrameworkConfigurationError, FrameworkRuntimeError", "fr...
# framework/utils.py # # Copyright 2012 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 ...
[ [ 1, 0, 0.1176, 0.0059, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1235, 0.0059, 0, 0.66, 0.1111, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1294, 0.0059, 0, ...
[ "import os", "import copy", "import serial", "import itertools", "DEFAULT_SERIAL_SETTINGS = {\n\t'parity': serial.PARITY_NONE,\n\t'baudrate': 9600,\n\t'bytesize': serial.EIGHTBITS,\n\t'xonxoff': False,\n\t'interCharTimeout': None,\n\t'rtscts': False,\n\t'timeout': 1,", "def GetDefaultSerialSettings():\n\t...
# framework/errors.py # # Copyright 2012 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 3, 0, 0.7258, 0.1935, 0, 0.66, 0, 687, 0, 2, 0, 0, 645, 0, 1 ], [ 2, 1, 0.6935, 0.0645, 1, 0.42, 0, 555, 0, 2, 0, 0, 0, 0, 0 ], [ 14, 2, 0.7097, 0.0323, 2, 0.98, ...
[ "class FrameworkError(Exception):\n\tdef __init__(self, msg):\n\t\tself.msg = msg\n\t\n\tdef __str__(self):\n\t\treturn repr(self.msg)", "\tdef __init__(self, msg):\n\t\tself.msg = msg", "\t\tself.msg = msg", "\tdef __str__(self):\n\t\treturn repr(self.msg)", "\t\treturn repr(self.msg)", "class FrameworkC...
# framework/options.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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, o...
[ [ 3, 0, 0.5346, 0.9106, 0, 0.66, 0, 971, 0, 12, 0, 0, 827, 0, 41 ], [ 8, 1, 0.0955, 0.0244, 1, 0.84, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.128, 0.0407, 1, 0.84, ...
[ "class Options(dict):\n\t\"\"\"\n\tThis is a generic options container, it is used to organize framework\n\tand module options. Once the options are defined and set, the values\n\tcan be retreived by referencing this object like a dictionary such as\n\tmyoptions['OPTIONNAME'] will return 'OPTIONVALUE'\n\t\"\"\"\n\t...
# c1222/data.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # (a...
[ [ 1, 0, 0.048, 0.0024, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.0504, 0.0024, 0, 0.66, 0.0417, 679, 0, 2, 0, 0, 679, 0, 0 ], [ 1, 0, 0.0528, 0.0024, 0, 0...
[ "from struct import pack, unpack", "from c1222.utils import data_chksum, data_chksum_str", "from pyasn1.type import tag", "from pyasn1.type import univ", "from pyasn1.codec.ber import encoder as ber_encoder", "from pyasn1.codec.ber import decoder as ber_decoder", "class C1222CallingAPTitle(univ.ObjectId...
# c1222/connection.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
[ [ 1, 0, 0.1562, 0.0078, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1641, 0.0078, 0, 0.66, 0.1, 984, 0, 2, 0, 0, 984, 0, 0 ], [ 1, 0, 0.1719, 0.0078, 0, 0.6...
[ "from random import randint", "from binascii import hexlify, unhexlify", "from struct import pack, unpack", "from select import select", "import logging", "import socket", "from c1222.data import *", "from c1222.errors import C1222IOError", "if hasattr(logging, 'NullHandler'):\n\tlogging.getLogger('...
# c1222/utils.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # (...
[ [ 1, 0, 0.5882, 0.0294, 0, 0.66, 0, 399, 0, 2, 0, 0, 399, 0, 0 ], [ 1, 0, 0.6176, 0.0294, 0, 0.66, 0.1429, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.6471, 0.0294, 0, ...
[ "from struct import pack, unpack", "import string", "from binascii import hexlify, unhexlify", "import CrcMoose # Get it from: http://www.nightmare.com/~ryb/code/CrcMoose.py", "crc = CrcMoose.CRC_HDLC.calcString", "crc_str = lambda x: pack(\"<H\", crc(x))", "def data_chksum(data):\n\tchksum = 0\n\tfor i...
# c1222/errors.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 # ...
[ [ 3, 0, 0.4083, 0.1667, 0, 0.66, 0, 920, 0, 2, 0, 0, 645, 0, 1 ], [ 8, 1, 0.3667, 0.05, 1, 0.83, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.4167, 0.05, 1, 0.83, 0.5...
[ "class C1222Error(Exception):\n\t\"\"\"\n\tThis is a generic C1222 Error.\n\t\"\"\"\n\tdef __init__(self, msg, errcode = None):\n\t\tself.message = msg\n\t\tself.errCode = errcode", "\t\"\"\"\n\tThis is a generic C1222 Error.\n\t\"\"\"", "\tdef __init__(self, msg, errcode = None):\n\t\tself.message = msg\n\t\ts...
#!/usr/bin/env python import codecs import re import jinja2 import markdown def process_slides(): with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile: md = codecs.open('slides.md', encoding='utf8').read() md_slides = md.split('\n---\n') print 'Compiled %s slides.' % len(m...
[ [ 1, 0, 0.0526, 0.0175, 0, 0.66, 0, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0702, 0.0175, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0877, 0.0175, 0, ...
[ "import codecs", "import re", "import jinja2", "import markdown", "def process_slides():\n with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile:\n md = codecs.open('slides.md', encoding='utf8').read()\n md_slides = md.split('\\n---\\n')\n print('Compiled %s slides.' ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-30 newmail.py: Create an alert when a new mail is received. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
[ [ 8, 0, 0.119, 0.2095, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6143, 0.781, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 16 ], [ 2, 1, 0.2571, 0.0286, 1, 0.33, 0...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-30\nnewmail.py: Create an alert when a new mail is received.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when a directory or file in the filesystem, exceeds adefined size. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the term...
[ [ 8, 0, 0.1316, 0.2316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6211, 0.7474, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 9 ], [ 2, 1, 0.2842, 0.0316, 1, 0.87, ...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when a directory or file in the filesystem, exceeds adefined size.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when disk usage > <defined size> %. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
[ [ 8, 0, 0.1359, 0.2391, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6304, 0.75, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 8 ], [ 2, 1, 0.2935, 0.0326, 1, 0.64, 0,...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when disk usage > <defined size> %.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when disk usage > <defined size> %. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
[ [ 8, 0, 0.1374, 0.2418, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6319, 0.7473, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 8 ], [ 2, 1, 0.2967, 0.033, 1, 0.81, 0...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when disk usage > <defined size> %.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when a directory or file in the filesystem, exceeds adefined size. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the term...
[ [ 8, 0, 0.1316, 0.2316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6211, 0.7474, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 9 ], [ 2, 1, 0.2842, 0.0316, 1, 0.05, ...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when a directory or file in the filesystem, exceeds adefined size.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when disk usage > <defined size> %. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
[ [ 8, 0, 0.1374, 0.2418, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6319, 0.7473, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 8 ], [ 2, 1, 0.2967, 0.033, 1, 0.27, 0...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when disk usage > <defined size> %.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-30 newmail.py: Create an alert when a new mail is received. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
[ [ 8, 0, 0.119, 0.2095, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6143, 0.781, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 16 ], [ 2, 1, 0.2571, 0.0286, 1, 0.18, 0...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-30\nnewmail.py: Create an alert when a new mail is received.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when a directory or file in the filesystem, exceeds adefined size. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the term...
[ [ 8, 0, 0.1316, 0.2316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6211, 0.7474, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 9 ], [ 2, 1, 0.2842, 0.0316, 1, 0.39, ...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when a directory or file in the filesystem, exceeds adefined size.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when disk usage > <defined size> %. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
[ [ 8, 0, 0.1359, 0.2391, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6304, 0.75, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 8 ], [ 2, 1, 0.2935, 0.0326, 1, 0.52, 0,...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when disk usage > <defined size> %.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n return self._alert\n\n ...
#! /usr/local/bin/python """ Author: Andy Nagels Date: 2010-01-29 df.py: Create an alert when a directory or file in the filesystem, exceeds adefined size. Copyright (C) 2010 Andy Nagels This file is part of Alertlogger. Alertlogger is free software: you can redistribute it and/or modify it under the term...
[ [ 8, 0, 0.1316, 0.2316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6211, 0.7474, 0, 0.66, 1, 977, 0, 10, 0, 0, 0, 0, 9 ], [ 2, 1, 0.2842, 0.0316, 1, 0.78, ...
[ "\"\"\"\nAuthor: Andy Nagels\nDate: 2010-01-29\ndf.py: Create an alert when a directory or file in the filesystem, exceeds adefined size.\n\nCopyright (C) 2010 Andy Nagels\n\nThis file is part of Alertlogger.", "class Alert:\n\n def get_alert(self):\n \"\"\" Get the alertstring for this alert. \"\"\"\n ...
# -*- coding: utf-8 -*- # # Sphinx documentation build configuration file import re import sphinx master_doc = 'contents' templates_path = ['_templates'] exclude_patterns = ['_build'] project = 'Sigil' copyright = u'2009-2010, Strahinja Marković' version = '0.2.0' release = version show_authors = True html_theme ...
[ [ 1, 0, 0.1111, 0.0278, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1389, 0.0278, 0, 0.66, 0.0526, 522, 0, 1, 0, 0, 522, 0, 0 ], [ 14, 0, 0.1944, 0.0278, 0, ...
[ "import re", "import sphinx", "master_doc = 'contents'", "templates_path = ['_templates']", "exclude_patterns = ['_build']", "project = 'Sigil'", "copyright = u'2009-2010, Strahinja Marković'", "version = '0.2.0'", "release = version", "show_authors = True", "html_theme = 'sphinxdoc'", "modind...
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='nend', version=version, description="nend transforms EPUB NCX documents into EPUB 3 Navigation Documents", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0625, 0.0312, 0, 0.66, 0.3333, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 14, 0, 0.125, 0.0312, 0, ...
[ "from setuptools import setup, find_packages", "import sys, os", "version = '0.1'", "setup(name='nend',\n version=version,\n description=\"nend transforms EPUB NCX documents into EPUB 3 Navigation Documents\",\n long_description=\"\"\"\\\n\"\"\",\n classifiers=[], # Get strings from http:/...
# encoding: utf-8 """ ncx.py Created by Keith Fahlgren on Mon Jun 13 17:09:40 PDT 2011 Copyright (c) 2011 Threepress Consulting Inc. All rights reserved. """ import logging import os.path from lxml import etree log = logging.getLogger(__name__) NCX_TO_END = os.path.join(os.path.dirname(__file__), 'externals', 'xsl...
[ [ 8, 0, 0.15, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3, 0.0333, 0, 0.66, 0.1667, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.3333, 0.0333, 0, 0.66, 0....
[ "\"\"\"\nncx.py\n\nCreated by Keith Fahlgren on Mon Jun 13 17:09:40 PDT 2011\nCopyright (c) 2011 Threepress Consulting Inc. All rights reserved.\n\"\"\"", "import logging", "import os.path", "from lxml import etree", "log = logging.getLogger(__name__)", "NCX_TO_END = os.path.join(os.path.dirname(__file__)...
#!/usr/bin/env python # encoding: utf-8 """ __init__.py Created by Keith Fahlgren on Mon Jun 13 16:17:48 PDT 2011 Copyright (c) 2011 Threepress Consulting Inc. All rights reserved. """ import logging import os.path import subprocess import tempfile from lxml import etree log = logging.getLogger(__name__) JING_FN...
[ [ 8, 0, 0.0671, 0.0732, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.122, 0.0122, 0, 0.66, 0.0769, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1341, 0.0122, 0, 0.66,...
[ "\"\"\"\n__init__.py\n\nCreated by Keith Fahlgren on Mon Jun 13 16:17:48 PDT 2011\nCopyright (c) 2011 Threepress Consulting Inc. All rights reserved.\n\"\"\"", "import logging", "import os.path", "import subprocess", "import tempfile", "from lxml import etree", "log = logging.getLogger(__name__)", "JI...
#!/usr/bin/env python # -*- coding: utf_8 -*- # # Modbus TestKit: Implementation of Modbus protocol in python # # (C)2009 - Luc Jean - luc.jean@gmail.com # (C)2009 - Apidev - http://www.apidev.fr # # This is distributed under GNU LGPL license, see license.txt # import zipfile import glob, os, sys class ...
[ [ 1, 0, 0.2609, 0.0217, 0, 0.66, 0, 93, 0, 1, 0, 0, 93, 0, 0 ], [ 1, 0, 0.2826, 0.0217, 0, 0.66, 0.3333, 958, 0, 3, 0, 0, 958, 0, 0 ], [ 3, 0, 0.5652, 0.5, 0, 0.66,...
[ "import zipfile", "import glob, os, sys", "class ZipArchive:\n\n def zip_it(self, dirName, files):\n dirNamePrefix = dirName+\"/*\"\n for filename in glob.glob(dirNamePrefix):\n if os.path.isfile(filename):\n exclude_me = False\n for exclude in self.excl...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ #modbus exception codes ILLEGAL_FUNCTION = 1 ILLEGAL_DATA_A...
[ [ 8, 0, 0.1711, 0.2105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3421, 0.0263, 0, 0.66, 0.0455, 341, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.3684, 0.0263, 0, 0.66...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "ILLEGAL_FUNCTION = 1", "ILLEGAL_DATA_ADDRESS = 2", "ILLEGAL_DATA_VALUE = 3", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import socket import modbus_tk.defines class...
[ [ 8, 0, 0.0504, 0.062, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.093, 0.0078, 0, 0.66, 0.25, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.1008, 0.0078, 0, 0.66, ...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "import socket", "import modbus_tk.defines", "class SimulatorRpcClient:\n \"\...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt Make possible to write modbus TCP and RTU master and...
[ [ 8, 0, 0.5, 0.7059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ from __future__ import with_statement import th...
[ [ 8, 0, 0.0677, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.0104, 0, 0.66, 0.1429, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1354, 0.0104, 0, 0.66,...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "from __future__ import with_statement", "import threading", "_lock = threading....
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import sys #add logging capability import lo...
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.375, 0.125, 0, 0.66, 0.25, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.625, 0.125, 0, 0.66, ...
[ "import sys", "import logging", "import modbus_tk", "import modbus_tk.defines as cst", "import modbus_tk.modbus_tcp as modbus_tcp" ]
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: example of a custom simulator (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ from modbus_tk.utils import create_logger from modbus_tk.simu...
[ [ 8, 0, 0.1111, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1905, 0.0159, 0, 0.66, 0.2, 113, 0, 1, 0, 0, 113, 0, 0 ], [ 1, 0, 0.2063, 0.0159, 0, 0.66, ...
[ "\"\"\"\n Modbus TestKit: example of a custom simulator\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt", "from modbus_tk.utils import create_logger", "from modbus_tk.simulator import Simulator, LOGGER", "fro...
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import sys #add logging capability import lo...
[ [ 8, 0, 0.0833, 0.1026, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1538, 0.0128, 0, 0.66, 0.1111, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1923, 0.0128, 0, 0.66...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "import sys", "import logging", "import threading", "import modbus_tk", "imp...
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import sys #add logging capability import lo...
[ [ 8, 0, 0.0823, 0.1013, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1519, 0.0127, 0, 0.66, 0.1, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1899, 0.0127, 0, 0.66, ...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "import sys", "import logging", "import threading", "import modbus_tk", "imp...
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import sys import serial #add logging capabi...
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0.2, 601, 0, 1, 0, 0, 601, 0, 0 ], [ 1, 0, 0.4444, 0.1111, 0, 0.6...
[ "import sys", "import serial", "import logging", "import modbus_tk", "import modbus_tk.defines as cst", "import modbus_tk.modbus_rtu as modbus_rtu" ]
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ from setuptools import setup import sys, os ...
[ [ 8, 0, 0.1512, 0.186, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2791, 0.0233, 0, 0.66, 0.25, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.3023, 0.0233, 0, 0.66, ...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "from setuptools import setup", "import sys, os", "version = '0.4.2'", "setup(...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import unittest import modbus_tk import modbus...
[ [ 8, 0, 0.0281, 0.0346, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0519, 0.0043, 0, 0.66, 0.0714, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0563, 0.0043, 0, 0.66, ...
[ "\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"", "import unittest", "import modbus_tk", "import modbus_tk.modbus_rtu as modbus_rt...