<commit_before>(ns cion-clojure.core
  (:gen-class)
  (:require [clj-http.client :as client])
  (:use [clojure.data.xml]))

(defn create-project [project-name]
  (client/post "http://ivan:password@localhost:8080/httpAuth/app/rest/projects/"
  {:body project-name
   :content-type "text/plain"
   :accept :xml}))
   
(defn get-project-names []
	(parse-str (:body (client/get "http://ivan:password@localhost:8080/httpAuth/app/rest/projects/"))))
  
(defn -main [& args]
  (alter-var-root #'*read-eval* (constantly false))
  (println "Hello, World!")
  (get-project-names))<commit_msg>extracting the project names and printing a mock-up of the code that would re-create the configuration that it has just read<commit_after>(ns cion-clojure.core
  (:gen-class)
  (:require [clj-http.client :as client])
  (:use [clojure.data.xml]))

(defn create-project [project-name]
  (client/post "http://ivan:password@localhost:8080/httpAuth/app/rest/projects/"
  {:body project-name
   :content-type "text/plain"
   :accept :xml}))
   
(defn create-projects [project-names]
	(map create-project project-names))

(defn extract-name [node]
	(:name (:attrs node)))
	
(defn project-names-xml []
	(parse-str (:body (client/get "http://ivan:password@localhost:8080/httpAuth/app/rest/projects/"))))

(defn get-project-names []
	(map extract-name (:content (project-names-xml))))

(defn quoted [s]
	(str "\"" s "\""))

(defn -main [& args]
  (alter-var-root #'*read-eval* (constantly false))
  (println (str "(create-projects (list " (clojure.string/join " " (map quoted (get-project-names))) "))")))
{'fraction_non_alphanumeric': 0.1876981610653139, 'fraction_numerical': 0.010145846544071021, 'mean_word_length': 4.460207612456747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '741563', 'n_tokens_mistral': 581, 'n_tokens_neox': 559, 'n_words': 120}