Start:
./manager.py
./data.py 1
./data.py 2
./worker.py 2
./worker.py 2
./worker.py 2
./worker.py 2
| #!/usr/bin/env python3 | |
| from collections import defaultdict | |
| import string | |
| import sys | |
| def get_words(): | |
| words = [w.strip() for w in open("wordle-nyt-allowed-guesses.txt")] | |
| words += [w.strip() for w in open("wordle-nyt-answers-alphabetical.txt")] | |
| words = set(words) |
| event log_one (n:count) | |
| { | |
| Reporter::info(fmt("Hello %d", n)); | |
| if(n != 0) { | |
| schedule 1sec { log_one(n-1) }; | |
| } | |
| } | |
| event bro_init() | |
| { |
| module DNS; | |
| event log_one (n:count) | |
| { | |
| local info: Info; | |
| local id: conn_id; | |
| id$orig_h = 1.2.3.4; | |
| id$orig_p = 23121/udp; | |
| id$resp_h = 5.6.7.8; |
| # This class defines a grub2-mkconfig exec block so that other | |
| # classes can refresh it. | |
| class hardware::grub { | |
| exec { 'grub2-mkconfig': | |
| command => '/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg', | |
| refreshonly => true, | |
| user => 'root', | |
| } | |
| } |
| use std::collections::HashMap; | |
| use std::io::{self, BufRead, BufWriter}; | |
| use std::io::Write; | |
| fn count(max_rows: usize) -> Result<(), io::Error> { | |
| let stdin = io::stdin(); | |
| let mut counts = HashMap::new(); | |
| for line in stdin.lock().lines() { | |
| let l = line.unwrap(); | |
| let stat = counts.entry(l).or_insert(0); |
| [Unit] | |
| Description=Bro | |
| After=network.target | |
| [Service] | |
| ExecStartPre=-/bro/bin/broctl cleanup | |
| ExecStartPre=/bro/bin/broctl check | |
| ExecStartPre=/bro/bin/broctl install | |
| ExecStart=/bro/bin/broctl start | |
| ExecStop=/bro/bin/broctl stop |
| #!/bin/bash -e | |
| REPO=git://git.bro.org/bro | |
| STATE_FILE=/usr/local/bro/INSTALLED_VERSION | |
| function die { | |
| echo $* | |
| exit 1 | |
| } |
Start:
./manager.py
./data.py 1
./data.py 2
./worker.py 2
./worker.py 2
./worker.py 2
./worker.py 2
| event bro_init() | |
| { | |
| Log::remove_default_filter(Files::LOG); | |
| Log::add_filter(Files::LOG, [ | |
| $name = "files-split", | |
| $path_func(id: Log::ID, path: string, rec: Files::Info) = { | |
| if (rec?$mime_type && rec$mime_type == "application/pkix-cert") | |
| return "files_certs"; | |
| return "files"; | |
| } |
| #!/usr/bin/env python2 | |
| import sys | |
| m=2000 | |
| for line in sys.stdin: | |
| if len(line) > m: | |
| print len(line) | |
| m = len(line) |