<commit_before>(in-package #:ws)

(defun make-domain-policy (&key (from "*") (to-port "*"))
  "Generates a very basic cross-domain policy file, used for the
WebSocket emulation via Flash.

For more information on what that is, see
http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html"
  (babel:string-to-octets
   (format nil "<?xml version=\"1.0\"?>
<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">
<cross-domain-policy><allow-access-from domain=\"~a\" to-ports=\"~a\" /></cross-domain-policy>~c"
           from to-port
           (code-char 0))
   :encoding :ascii))

(defun lg (&rest args)
  (when *log-level*
    (apply #'format t args)
    (finish-output)))<commit_msg>add declaration so lg can see *log-level* before its DEFVAR<commit_after>(in-package #:ws)

(defun make-domain-policy (&key (from "*") (to-port "*"))
  "Generates a very basic cross-domain policy file, used for the
WebSocket emulation via Flash.

For more information on what that is, see
http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html"
  (babel:string-to-octets
   (format nil "<?xml version=\"1.0\"?>
<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">
<cross-domain-policy><allow-access-from domain=\"~a\" to-ports=\"~a\" /></cross-domain-policy>~c"
           from to-port
           (code-char 0))
   :encoding :ascii))

(defun lg (&rest args)
  (declare (special *log-level*))
  (when *log-level*
    (apply #'format t args)
    (finish-output)))
{'fraction_non_alphanumeric': 0.1732484076433121, 'fraction_numerical': 0.003821656050955414, 'mean_word_length': 3.7750759878419453, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 2, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2785392', 'n_tokens_mistral': 553, 'n_tokens_neox': 531, 'n_words': 131}