%(InteractiveBase._njobs)s
338124
def _njobs(self):
        """"""
        ret = super(self.__class__, self)._njobs or [0]
        ret[0] += 1
        return ret
319104
@Override
	public void toPDB(StringBuffer buf){
		 Formatter formatter = new Formatter(new StringBuilder(),Locale.UK);
//        DBREF  3ETA A  990  1295  UNP    P06213   INSR_HUMAN    1017   1322
//        DBREF  3EH2 A    2   767  UNP    P53992   SC24C_HUMAN    329   1094
//        DBREF 3EH2 A    2   767     UNP   P53992  SC24C_HUMAN   329   1094
//        DBREF  3ETA A  990  1295  UNP    P06213   INSR_HUMAN    1017   1322
		formatter.format("DBREF  %4s %1s %4d%1s %4d%1s %-6s %-8s %-12s%6d%1c%6d%1c            ",
				idCode, chainName,seqbegin,insertBegin,seqEnd,insertEnd,
				database,dbAccession,dbIdCode,
				dbSeqBegin,idbnsBegin,dbSeqEnd,idbnsEnd
				);

		buf.append(formatter.toString());
		formatter.close();

	}
341920
function(data) {

    var _mode = QRMode.MODE_KANJI;
    var _data = data;

    var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];
    if (!stringToBytes) {
      throw 'sjis not supported.';
    }
    !function(c, code) {
      // self test for sjis support.
      var test = stringToBytes(c);
      if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {
        throw 'sjis not supported.';
      }
    }('\u53cb', 0x9746);

    var _bytes = stringToBytes(data);

    var _this = {};

    _this.getMode = function() {
      return _mode;
    };

    _this.getLength = function(buffer) {
      return ~~(_bytes.length / 2);
    };

    _this.write = function(buffer) {

      var data = _bytes;

      var i = 0;

      while (i + 1 < data.length) {

        var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);

        if (0x8140 <= c && c <= 0x9FFC) {
          c -= 0x8140;
        } else if (0xE040 <= c && c <= 0xEBBF) {
          c -= 0xC140;
        } else {
          throw 'illegal char at ' + (i + 1) + '/' + c;
        }

        c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);

        buffer.put(c, 13);

        i += 2;
      }

      if (i < data.length) {
        throw 'illegal char at ' + (i + 1);
      }
    };

    return _this;
  }
981588
def gpg_interactive_input(self, sub_keys_number):
        
        deselect_sub_key = "key 0\n"

        _input = self._main_key_command()
        for sub_key_number in range(1, sub_keys_number + 1):
            _input += self._sub_key_command(sub_key_number) + deselect_sub_key
        return "%ssave\n" % _input
120686
def main():
    

    DATABASE.load_contents()

    continue_flag = False

    while not continue_flag:
        DATABASE.print_contents()
        try:
            command = raw_input(">>> ")
            for stmnt_unformated in sqlparse.parse(command):
                statement = sqlparse.parse(
                    sqlparse.format(
                        str(
                            stmnt_unformated
                        ),
                        reindent=True
                    )
                )[0]
                type = statement.tokens[0]

                if str(type).lower() == "drop":
                    if str(statement.tokens[2]).lower() == "table":
                        tablename = str(statement.tokens[4])
                        table = DATABASE.get_table(tablename)
                        table.rows = []
                        table.store_contents()
                        DATABASE.delete_table(tablename)
                        DATABASE.store_contents()
                    else:
                        raise Exception(
                            "Invalid Syntax of DROP TABLE t"
                        )
                elif str(type).lower() == "truncate":
                    if str(statement.tokens[2]).lower() == "table":
                        tablename = str(statement.tokens[4])
                        table = DATABASE.get_table(tablename)
                        table.rows = []
                        table.store_contents()
                    else:
                        raise Exception(
                            "Invalid Syntax of TRUNCATE TABLE t"
                        )
                elif str(type).lower() == "delete":
                    if str(statement.tokens[2]).lower() == "from":
                        tablename = str(statement.tokens[4])
                        table = DATABASE.get_table(tablename)
                        whereclause = statement.tokens[6]
                        if str(whereclause.tokens[0]).lower() == "where":
                            comparison = whereclause.tokens[2]
                            key = str(comparison.tokens[0])
                            value = int(str(comparison.tokens[4]))
                            table.delete_row(key, value)
                            table.store_contents()
                        else:
                            raise Exception(
                                "Invalid Syntax of DELETE FROM t where k = v"
                            )

                    else:
                        raise Exception(
                            "Invalid Syntax of DELETE FROM t WHERE k = v"
                        )
                elif str(type).lower() == "insert":
                    if str(statement.tokens[2]).lower() == "into":
                        tablename = str(statement.tokens[4])
                        table = DATABASE.get_table(tablename)
                        if str(statement.tokens[6]).lower() == "values":
                            parenthesis = statement.tokens[8]
                            idlist = parenthesis.tokens[1]
                            values_list = map(
                                lambda x: int(str(x)),
                                idlist.get_identifiers()
                            )
                            table.put_row_raw(values_list)
                            table.store_contents()
                        else:
                            raise Exception(
                                "Invalid Syntax of INSERT INTO t VALUES (v...)"
                            )
                    else:
                        raise Exception(
                            "Invalid Syntax of INSERT INTO t VALUES (v...)"
                        )
                elif str(type).lower() == "create":
                    if str(statement.tokens[2]).lower() == "table":
                        sublist = list(statement.tokens[4].get_sublists())
                        tablename = str(sublist[0])
                        garbage = str(sublist[1])
                        column_list = map(
                            lambda x: x.strip(" ()",).split()[0],
                            garbage.split(",")
                        )
                        DATABASE.create_table_raw(
                            tablename=tablename,
                            columns=column_list[:],
                        )
                        DATABASE.store_contents()
                elif str(type).lower() == "select":
                    col_list_or_single = statement.tokens[2]
                    if "," not in str(col_list_or_single):
                        if str(col_list_or_single) == "*":
                            column_list = ['*']
                        else:
                            column_list = [str(col_list_or_single)]
                    else:
                        column_list = map(
                            lambda x: str(x),
                            col_list_or_single.get_identifiers()
                        )
                    if str(statement.tokens[4]).lower() == "from":
                        tab_list_or_single = statement.tokens[6]
                        if "," not in str(tab_list_or_single):
                            table_list = [str(tab_list_or_single)]
                        else:
                            table_list = map(
                                lambda x: str(x),
                                tab_list_or_single.get_identifiers()
                            )
                        cross_columns = reduce(
                            lambda x, y: x + y,
                            map(
                                lambda x: DATABASE.get_table(
                                    x
                                ).get_column_list_prefixed(),
                                table_list
                            )
                        )
                        cross_table = parthsql.Table(
                            name="temp",
                            columns=cross_columns,
                            rows=[]
                        )
                        for i in itertools.product(
                            *map(
                                lambda x: DATABASE.get_table(x).get_all_rows(),
                                table_list
                            )
                        ):
                            cross_table.put_row_raw(
                                reduce(
                                    lambda x, y: x + y,
                                    i
                                )
                            )

                        if len(statement.tokens) >= 9:
                            whereclause = statement.tokens[8]
                            if str(whereclause.tokens[0]).lower() == "where":
                                comparison = whereclause.tokens[2]
                                key = str(comparison.tokens[0])
                                try:
                                    value = int(str(comparison.tokens[4]))
                                    cross_table.invert_delete_row(key, value)
                                except:
                                    value = str(comparison.tokens[4])
                                    cross_table.invert_delete_row2(key, value)
                            else:
                                raise Exception(
                                    "Invalid Syntax of DELETE FROM t where k = v"
                                )

                        if "*" in column_list:
                            cross_table.print_contents()
                        else:
                            temp_list = []
                            for i in column_list:
                                temp_list.append(cross_table.get_column(i))
                            print "\t\t\t".join(column_list)
                            for i in zip(*(temp_list)):
                                print "\t\t\t".join(map(str, i))
                    else:
                        raise Exception(
                            "Invalid Syntax of SELECT c... FROM t... WHERE k = v"
                        )
                else:
                    raise Exception(
                        "Unsupported Operation"
                    )
        except ValueError:
            print("¯\_(ツ)_/¯")
        except IOError:
            print("¯\_(ツ)_/¯")
        except IndexError:
            print("¯\_(ツ)_/¯")
        except AttributeError:
            print("¯\_(ツ)_/¯")
        except Exception, e:
            print e.message
261009
function RBTSentinel() {
  this.key = null;
  this.value = null;
  this.color = BLACK;
  this.parent = null;
  this.left = null;
  this.right = null;
}
690739
function main() {

    var database = fs.createWriteStream('./lib/database-min.js', { flags: 'w', encoding: 'utf8' });
    var testFile;

    fs.mkdir('./data', 493, function (error) {  // 493 == 0755 (no octal in strict mode.)
        // ignore errors.
    });
    
    database.write("// Do not edit this file, your changes will be lost.\n");
    database.write("module.exports = { \n");
    getJSON('http://alscan.info/agent_groups/groups.json', function (groups) {
        var s = JSON.stringify(groups);
        database.write("groups:" + s + ",\n");
        testFile = fs.createWriteStream('./data/groups.json', { flags: 'w', encoding: 'utf8' });
        testFile.write(s+"\n");
        testFile.end();
        getJSON('http://alscan.info/agent_sources/sources.json', function (sources) {
            var s = JSON.stringify(sources);
            database.write("sources:" + s + ",\n");
            testFile = fs.createWriteStream('./data/sources.json', { flags: 'w', encoding: 'utf8' });
            testFile.write(s+"\n");
            testFile.end();
            getJSON('http://alscan.info/patterns/patterns.json', function (patterns) {
                database.write("patterns:[\n");
                patterns.forEach(function (pattern) {
                    database.write("{p: new RegExp('" + pattern.pattern + "'), x:" + 
                            agentdb.getX(pattern.groupId, pattern.sourceId) + "},");
                });
                database.write("],\n");
                testFile = fs.createWriteStream('./data/patterns.json', { flags: 'w', encoding: 'utf8' });
                testFile.write(JSON.stringify(patterns)+"\n");
                testFile.end();
                getJSON('http://alscan.info/agents/agents.json', function (agents) {
                    var hash = new HashTable(HASH_TABLE_SIZE, HASH_TABLE_SEED, HASH_TABLE_MULTIPLIER);
                    agents.forEach(function (agent) {
                        if (agent.status < 2) {
                            var obj = { a: agent.agent, x: agentdb.getX(agent.groupId, agent.sourceId) };
                            hash.add('a', obj);
                        }
                    });
                    database.write("table:" + JSON.stringify(hash.table) + ",\n");
                    database.write("HASH_TABLE_SIZE:" + HASH_TABLE_SIZE + ",\n");
                    database.write("HASH_TABLE_SEED:" + HASH_TABLE_SEED + ",\n");
                    database.write("HASH_TABLE_MULTIPLIER:" + HASH_TABLE_MULTIPLIER + ",\n");
                    database.write("hash: undefined\n}\n");
                    testFile = fs.createWriteStream('./data/agents.json', { flags: 'w', encoding: 'utf8' });
                    testFile.write(JSON.stringify(agents)+"\n");
                    testFile.end();
                    if (debug) {
                        var history = hash.getHistory();
                        console.log("Hash table history");
                        for (var n=0; n < history.length; n++) {
                            console.log("  Depth=" + n + ", count=" + history[n] + ", percent=" + (history[n] / HASH_TABLE_SIZE));
                        }
                    }
                });
            });
        });
    });
}
809341
function (s) {
          s = Tools.trim(s);

          function rep(re, str) {
            s = s.replace(re, str);
          }

          // example: <strong> to [b]
          rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]");
          rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
          rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
          rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
          rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
          rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]");
          rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]");
          rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]");
          rep(/<font>(.*?)<\/font>/gi, "$1");
          rep(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]");
          rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]");
          rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]");
          rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]");
          rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]");
          rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]");
          rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]");
          rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]");
          rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]");
          rep(/<\/(strong|b)>/gi, "[/b]");
          rep(/<(strong|b)>/gi, "[b]");
          rep(/<\/(em|i)>/gi, "[/i]");
          rep(/<(em|i)>/gi, "[i]");
          rep(/<\/u>/gi, "[/u]");
          rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]");
          rep(/<u>/gi, "[u]");
          rep(/<blockquote[^>]*>/gi, "[quote]");
          rep(/<\/blockquote>/gi, "[/quote]");
          rep(/<br \/>/gi, "\n");
          rep(/<br\/>/gi, "\n");
          rep(/<br>/gi, "\n");
          rep(/<p>/gi, "");
          rep(/<\/p>/gi, "\n");
          rep(/&nbsp;|\u00a0/gi, " ");
          rep(/&quot;/gi, "\"");
          rep(/&lt;/gi, "<");
          rep(/&gt;/gi, ">");
          rep(/&amp;/gi, "&");

          return s;
        }
579713
function Kybos() {
    return (function(args) {
    // Johannes BaagÃ¸e <baagoe@baagoe.com>, 2010
    var s0 = 0;
    var s1 = 0;
    var s2 = 0;
    var c = 1;
    var s = [];
    var k = 0;

    var mash = Mash();
    var s0 = mash(' ');
    var s1 = mash(' ');
    var s2 = mash(' ');
    for (var j = 0; j < 8; j++) {
      s[j] = mash(' ');
    }

    if (args.length == 0) {
      args = [+new Date];
    }
    for (var i = 0; i < args.length; i++) {
      s0 -= mash(args[i]);
      if (s0 < 0) {
      s0 += 1;
      }
      s1 -= mash(args[i]);
      if (s1 < 0) {
      s1 += 1;
      }
      s2 -= mash(args[i]);
      if (s2 < 0) {
      s2 += 1;
      }
      for (var j = 0; j < 8; j++) {
      s[j] -= mash(args[i]);
      if (s[j] < 0) {
        s[j] += 1;
      }
      }
    }

    var random = function() {
      var a = 2091639;
      k = s[k] * 8 | 0;
      var r = s[k];
      var t = a * s0 + c * 2.3283064365386963e-10; // 2^-32
      s0 = s1;
      s1 = s2;
      s2 = t - (c = t | 0);
      s[k] -= s2;
      if (s[k] < 0) {
      s[k] += 1;
      }
      return r;
    };
    random.uint32 = function() {
      return random() * 0x100000000; // 2^32
    };
    random.fract53 = function() {
      return random() +
      (random() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53
    };
    random.addNoise = function() {
      for (var i = arguments.length - 1; i >= 0; i--) {
      for (j = 0; j < 8; j++) {
        s[j] -= mash(arguments[i]);
        if (s[j] < 0) {
        s[j] += 1;
        }
      }
      }
    };
    random.version = 'Kybos 0.9';
    random.args = args;
    return random;

    } (Array.prototype.slice.call(arguments)));
  }
822963
private void a2(StringBuilder sb, int x) {
        if (x < 10) {
            sb.append('0');
        }
        sb.append(x);
    }
436237
function doesStateMatchGlob (glob) {
    var globSegments = glob.split('.'),
        segments = $state.$current.name.split('.');

    //match greedy starts
    if (globSegments[0] === '**') {
       segments = segments.slice(indexOf(segments, globSegments[1]));
       segments.unshift('**');
    }
    //match greedy ends
    if (globSegments[globSegments.length - 1] === '**') {
       segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE);
       segments.push('**');
    }

    if (globSegments.length != segments.length) {
      return false;
    }

    //match single stars
    for (var i = 0, l = globSegments.length; i < l; i++) {
      if (globSegments[i] === '*') {
        segments[i] = '*';
      }
    }

    return segments.join('') === globSegments.join('');
  }
310724
function initSymbols() {
  var i;
  var symlen = AMsymbols.length;
  for (i=0; i<symlen; i++) {
    if (AMsymbols[i].tex) {
      AMsymbols.push({input:AMsymbols[i].tex, 
        tag:AMsymbols[i].tag, output:AMsymbols[i].output, ttype:AMsymbols[i].ttype,
        acc:(AMsymbols[i].acc||false)});
    }
  }
  refreshSymbols();
}
2963
function ($oneSibling, siblingCount, existingSibligCount) {
      var lines = '';
      for (var i = 0; i < existingSibligCount; i++) {
        lines += '<td class="leftLine topLine"></td><td class="rightLine topLine"></td>';
      }
      $oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan', siblingCount * 2)
        .end().next().children(':first').after(lines);
    }
444247
function(bson, ns, cursorId, opts) {
  opts = opts || {};
  this.numberToReturn = opts.numberToReturn || 0;
  this.requestId = _requestId++;
  this.bson = bson;
  this.ns = ns;
  this.cursorId = cursorId;
}
631694
function NjsCompiler(options) {
    this.nodeSequence = 0;
    this.options = options || {};
    if (!this.options.runtime) {
        this.options.runtime = 'njs';
    }
    this.parseBooleanOptions("exceptions", true);
}
1171345
def to_s
    out = ""

    @v.each do |line|
      out << "["

      # display all elements of this line
      line.each do |element|
        out << element.to_f.round(3).to_s << " "
      end

      out << "\b]\n" # TODO : FIX THAT broggi_t
    end
    out
  end
723854
private void toStringTree(String indent, StringBuffer sb) {
		sb.append(toString());
		if (children != null) {
			for (Entry<String, DepTreeNode> entry : children.entrySet()) {
				entry.getValue().toStringTree(indent + "\t", sb); //$NON-NLS-1$
			}
		}
	}