conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add macros to help define a multi-reducer\n" }, { "from": "gpt", "value": "(ns clojure-rest.store)\n\n(defmacro def-multi-reducer\n [name reducer-map]\n `(def ~name\n (clojure-rest.store/multi-reducer ~reducer-map)\n ))\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add some tests for middleware->\n" }, { "from": "gpt", "value": "(ns rook.middleware-spec\n (:use\n speclj.core\n io.aviso.rook))\n\n(def terminal-handler identity)\n\n(defn wrap-with-gnip\n [handler metadata]\n (if-let [value (:gnip metadata)]\n (fn [req...
clojure
chosen
[ { "from": "human", "value": "Add migration for moving indexed documents to raw db\n" }, { "from": "gpt", "value": "(ns subman.migrations\n \"Migration which should be run manually from repl.\"\n (:require [monger.collection :as mc]\n [clojurewerkz.elastisch.rest.document :as esd]\n ...
clojure
chosen
[ { "from": "human", "value": "Test for resembling Java OrderServiceTest. Using map and pmap.\n" }, { "from": "gpt", "value": "(ns no.knowit.clojure_functional.order-service\n (:use [clojure.test])\n (:import no.knowit.java_functional.product.Product)\n (:import [no.knowit.java_functional.order...
clojure
chosen
[ { "from": "human", "value": "Add a basic test to ensure libssh2 is JNA-ed properly.\n" }, { "from": "gpt", "value": "(ns clj-libssh2.test-libssh2\n (:require [clojure.test :refer :all]\n [clj-libssh2.libssh2 :as libssh2]))\n\n(deftest check-libssh2-version-is-ok\n \"This shoudln't c...
clojure
chosen
[ { "from": "human", "value": "Add forecast lookup for a location.\n\nUses open weather map.\n" }, { "from": "gpt", "value": "(ns forecast.repository.location-forecast\n (:require [clj-http.client :as client]\n [cheshire.core :refer [parse-string]]\n [clojure.string :refer [...
clojure
chosen
[ { "from": "human", "value": "Add a ns for working with Ruby from Clojure\n" }, { "from": "gpt", "value": "(ns circle.ruby\n (:import javax.script.ScriptEngine)\n (:import javax.script.ScriptEngineManager)\n (:import org.jruby.embed.ScriptingContainer)\n (:import org.jruby.RubySymbol))\n\n(de...
clojure
chosen
[ { "from": "human", "value": "Add PubsubIO source and sink\n" }, { "from": "gpt", "value": "(ns datasplash.pubsub\n (:require [datasplash.core :refer :all])\n (:import (com.google.cloud.dataflow.sdk.io PubsubIO$Read PubsubIO$Write)\n (com.google.cloud.dataflow.sdk.values PBegin)\n ...
clojure
chosen
[ { "from": "human", "value": "Add support for an annotated failure\n\nthat contains extra data aside from the error message\n" }, { "from": "gpt", "value": "(ns mdr2.failjure\n (:require [failjure.core :as fail]))\n\n(defrecord AnnotatedFailure [message data]\n fail/HasFailed\n (failed? [self]...
clojure
chosen
[ { "from": "human", "value": "Add initial SICP chapter 1 notes file\n" }, { "from": "gpt", "value": ";\n; Chapter 1.1 - Notes\n;\n\n; defining a function\n(defn square [x]\n (* x x))\n\n; using the function as a building block in other functions\n(defn sum-of-squares [x y]\n (+ (square x) (squa...
clojure
chosen
[ { "from": "human", "value": "Add a tentacle test ns\n" }, { "from": "gpt", "value": "(ns doctopus.doctopus.tentacle-test\n (:require [clojure.test :refer :all]\n [doctopus.doctopus.tentacle :refer :all]\n [me.raynes.fs :as fs]))\n\n(def one-tentacle)\n" } ]
clojure
chosen
[ { "from": "human", "value": "Solve Simple Product in clojure\n" }, { "from": "gpt", "value": "(ns main)\n\n(defn main []\n (let [a (Integer/parseInt (read-line))\n b (Integer/parseInt (read-line))]\n (* a b)))\n\n(println \"PROD =\" (main))\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add missing file, RVM actions\n" }, { "from": "gpt", "value": "(ns circle.backend.action.rvm\n \"actions for dealing with RVM during builds\"\n (:require [circle.backend.action :as action])\n (:use [circle.backend.build :only (checkout-dir)])\n (:require [circle....
clojure
chosen
[ { "from": "human", "value": "Add test facts to ClojureScript\n" }, { "from": "gpt", "value": "(ns clara.rules.testfacts\n \"This namespace exists primary for testing purposes, working around the fact that we cannot AOT compile test classes. This should be moved to the tests once a workaround fo...
clojure
chosen
[ { "from": "human", "value": "Add tests for parkour.toolbox functions.\n" }, { "from": "gpt", "value": "(ns parkour.toolbox-test\n (:require [clojure.test :refer :all]\n [clojure.string :as str]\n [clojure.java.io :as io]\n [clojure.core.reducers :as r]\n ...
clojure
chosen
[ { "from": "human", "value": "Add file that interfaces with javascript files\n" }, { "from": "gpt", "value": "(ns storemi.js\n (:require \n [clj-rhino :as js]\n [clojure.walk :refer [keywordize-keys]]))\n\n(def parser-scope \n (doto (js/new-safe-scope)\n (js/eval (slurp \"resources/pub...
clojure
chosen
[ { "from": "human", "value": "Add template for routing / load balancing\n" }, { "from": "gpt", "value": "global\n daemon\n maxconn 256\n\ndefaults\n mode http\n timeout connect 5000ms\n timeout client 50000ms\n timeout server 50000ms\n\nfrontend http\n bind *:9999\n <% (do...
clojure
chosen
[ { "from": "human", "value": "Add SPScrapeTripReport which implements ScrapeTripReport protocol.\n" }, { "from": "gpt", "value": "(ns scrape-trs.summitpost.core\n (:require [scrape-trs.summitpost\n [extract-pager-urls :refer [extract-all-pager-urls]]\n [extract-result-url...
clojure
chosen
[ { "from": "human", "value": "Prepare a workaround for the Leiningen 2 Preview 9 provisioning issue\n" }, { "from": "gpt", "value": ";; https://github.com/technomancy/leiningen/issues/747#issuecomment-8024136\n(swap! leiningen.core.project/default-profiles\n update-in [:base] assoc :reposit...
clojure
chosen
[ { "from": "human", "value": "CMR-4176: Add migration to remove provider specific services tables and sequences.\n" }, { "from": "gpt", "value": "(ns migrations.053-remove-provider-services-tables\n (:require [clojure.java.jdbc :as j]\n [config.migrate-config :as config]\n ...
clojure
chosen
[ { "from": "human", "value": "Add generic mac engine abstraction for low level but clojure idiomatic access to mac.\n" }, { "from": "gpt", "value": ";; Copyright (c) 2013-2015 Andrey Antukh <niwi@niwi.be>\n;;\n;; Licensed under the Apache License, Version 2.0 (the \"License\")\n;; you may not use...
clojure
chosen
[ { "from": "human", "value": "Create separate namespace for multiple libs\n" }, { "from": "gpt", "value": "(ns discuss.lib.views\n (:require [om.core :as om :include-macros true]\n [om.dom :as dom :include-macros true]))\n\n(defn fa-icon\n \"Wrapper for font-awesome icons.\"\n ([cla...
clojure
chosen
[ { "from": "human", "value": "Add function for transforming a seq with a name and a value into a JSON member\n" }, { "from": "gpt", "value": "(ns berry.converters.to-member\n (:require [berry.formatting :refer [indent]]))\n\n(declare colon transform-name)\n\n(defn to-member\n [[name value] opti...
clojure
chosen
[ { "from": "system", "value": "Comment out basic auth - no need for fn here\n" }, { "from": "human", "value": "; Copyright © 2015, JUXT LTD.\n\n(ns yada.walk\n (:require\n [clojure.walk :refer [postwalk]])\n (:import [yada.handler Handler]\n [yada.resource Resource]))\n\n;; Function...
clojure
chosen
[ { "from": "human", "value": "Add test for deploy task.\n" }, { "from": "gpt", "value": "(ns test-deploy\n (:use [leiningen.deploy] :reload)\n (:use [clojure.test]\n [clojure.java.io :only [file]]\n [leiningen.core :only [read-project defproject]]\n [leiningen.util.file]))\...
clojure
chosen
[ { "from": "human", "value": "Add ability to run aggregation separate from std phase-2 run\n" }, { "from": "gpt", "value": "\n{:nodes\n {:ph2\n {:name \"tnseq-phase2b\",\n :type \"tool\",\n :args []}\n :prn1 {:type \"func\",\n :name \"prn\"}},\n :edges\n {:ph2 [:prn1]}}\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add a stupid ideally-failing core test\n" }, { "from": "gpt", "value": "(ns desdemona.ui.core-test\n (:require\n [desdemona.ui.core :as c]\n [cljs.test :as t :refer-macros [deftest testing is are]]))\n\n(deftest add-tests\n (is (= (c/add 1 2) 3)))\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add lein file in clojure config folder" }, { "from": "gpt", "value": "{:user {:ultra {:color-scheme :solarized_dark\n :stacktraces true}\n :plugins [[lein-try \"0.4.3\"]\n [lein-ancient \"0.6.10-SNAPSHOT\"]\n [...
clojure
chosen
[ { "from": "human", "value": "Add testing harness function to gamepad-test ns.\n" }, { "from": "gpt", "value": "(ns org.playasophy.wonderdome.input.gamepad-test\n (:require\n [clojure.core.async :as async :refer [<!]]\n [clojure.test :refer :all]\n [com.stuartsierra.component :as compon...
clojure
chosen
[ { "from": "human", "value": "Add missing Eastwood config file.\n" }, { "from": "gpt", "value": "(disable-warning\n {:linter :suspicious-expression\n ;; specifically, those detected in function suspicious-macro-invocations\n :if-inside-macroexpansion-of #{'defun.core/defun}\n :within-depth 12\...
clojure
chosen
[ { "from": "human", "value": "Add an audio chunker that yields chunks whenever it is triggered\n" }, { "from": "gpt", "value": "(ns audio-utils.triggered-chunker\n (:require [audio-utils.util :refer [aatom aswap! << >>]]\n [audio-utils.worker :as w]))\n\n(defprotocol ITriggeredChunker...
clojure
chosen
[ { "from": "human", "value": "Add first example from chapter 9\n" }, { "from": "gpt", "value": "(ns clojure-walkthrough.cjia.ch09-xx\n (:import [java.text SimpleDateFormat]))\n\n(defn new-expense [date-string dollars cents category merchant-name]\n {:date (.parse (SimpleDateFormat. \"yyyy-MM-dd...
clojure
chosen
[ { "from": "human", "value": "Add MP3 encoder implementation for worker audio pipelines\n\nAn important part of this is to translate float sample vectors to\ninteger arrays for encoding since that's what lamejs expects as its\ninput.\n" }, { "from": "gpt", "value": "(ns audio-utils.mp3-encoder\n ...
clojure
chosen
[ { "from": "human", "value": "Add simple test for simulation run\n" }, { "from": "gpt", "value": "(ns clj-gatling.simulation-test\n (:use clojure.test)\n (:require [clj-gatling.simulation :as simulation]))\n\n(defn run-request [id] \"OK\")\n\n(def scenario\n {:name \"Test scenario\"\n :reque...
clojure
chosen
[ { "from": "human", "value": "Add simple mic/input pitch-controlled synth example" }, { "from": "gpt", "value": "(ns overtone.examples.instruments.pitch-controller\n (:use overtone.live))\n\n;; Fire off this synth and connect an instrument/mic.\n;; The pitch will be detected and used to control ...
clojure
chosen
[ { "from": "human", "value": "Add support for Aerobio map file generation from streaming SAM\n" }, { "from": "gpt", "value": "\n{\n :name \"tnseq-phase1\",\n :path \"\",\n\n :graph {:bt1 {:type \"tool\"\n :path \"bowtie2\"\n :args [\"-p\" \"16\" \"--very-sensitive\" \...
clojure
chosen
[ { "from": "human", "value": "Add missing file that should have been committed months ago. Adds fns for uploading SSL certificates to AWS, useful for creating SSL load balancers at the repl\n" }, { "from": "gpt", "value": "(ns circle.backend.aws-iam\n \"fns for working with AWS Identity & Access...
clojure
chosen
[ { "from": "human", "value": "Add a metric name index protocol and implementation\n\nThis is based on lucene and provides both an in-memory\nand on-disk implementation\n" }, { "from": "gpt", "value": "(ns org.spootnik.cyanite.path\n \"Implements a path store which tracks metric names. The\n de...
clojure
chosen
[ { "from": "human", "value": "Test the v5 sample feed against all validaitons\n" }, { "from": "gpt", "value": "(ns vip.data-processor.validation.v5-test\n (:require [clojure.test :refer :all]\n [vip.data-processor.pipeline :as pipeline]\n [vip.data-processor.db.postgres ...
clojure
chosen
[ { "from": "human", "value": "Add a few basic tests for the defview macro\n" }, { "from": "gpt", "value": "(ns app-macros.view-test\n (:require [cljs.test :refer-macros [deftest is]]\n [om.next :as om]\n [app-macros.view :refer-macros [defview]]))\n\n(defview MinimalView)\n...
clojure
chosen
[ { "from": "human", "value": "Add Color - Setting snippets.\n" }, { "from": "gpt", "value": "(ns snippets.color.setting\n (:require [quil.snippet :refer [defsnippet]]\n [quil.core :refer :all]))\n\n(defsnippet background-s {}\n (background 255 0 0)\n (let [gr (create-graphics 100 10...
clojure
chosen
[ { "from": "human", "value": "Solve The Greatest in clojure\n" }, { "from": "gpt", "value": "(ns main\n (:require [clojure.string :as str]))\n\n(defn main []\n (loop [line (read-line)]\n (when line\n (let [[a b c] (str/split line #\" \")\n a' (Integer/parseInt a)\n ...
clojure
chosen
[ { "from": "human", "value": "Add missing pretty print file.\n" }, { "from": "gpt", "value": "(ns onyx.static.pretty-print\n #?(:clj (:require [io.aviso.ansi :as a])))\n\n(def bold\n #?(:clj a/bold\n :cljs identity))\n\n(def magenta\n #?(:clj a/magenta\n :cljs identity))\n\n(def blue\n...
clojure
chosen
[ { "from": "human", "value": "Add job flow for phase 2 tnseq\n" }, { "from": "gpt", "value": "\n{:nodes\n {:ph2\n {:name \"tnseq-phase2\",\n :type \"tool\",\n :args []}\n :prn1 {:type \"func\",\n :name \"prn\"}},\n :edges\n {:ph2 [:prn1]}}\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add state extensions\nState extensions are for a log type to implement for storage and\nplayback of state commands\n" }, { "from": "gpt", "value": "(ns onyx.state-extensions)\n\n(defmulti initialise-log \n (fn [log-type event]\n log-type))\n\n(defmulti close-log ...
clojure
chosen
[ { "from": "human", "value": "CMR-3525: Add new simple background jobs namespace for running jobs\n" }, { "from": "gpt", "value": "(ns cmr.common.background-jobs\n \"Namespace for creating simple background jobs that run at a specified interval in a thread.\n For more complex requirements see t...
clojure
chosen
[ { "from": "human", "value": "Add integration tests for newsfeed service\n" }, { "from": "gpt", "value": "(ns newsfeed.integration.api\n (:require [midje.sweet :refer :all]\n [peridot.core :as p]\n [clojure.data.json :as json]\n [newsfeed.core :as nf]\n ...
clojure
chosen
[ { "from": "human", "value": "Add a basic working example in Clojure\n" }, { "from": "gpt", "value": "; Eli Bendersky [http://eli.thegreenplace.net]\n; This code is in the public domain.\n(ns expression.protocols)\n\n(defrecord Constant [value])\n(defrecord BinaryPlus [lhs rhs])\n\n(defprotocol E...
clojure
chosen
[ { "from": "human", "value": "Add test directory with initial tests.\n" }, { "from": "gpt", "value": ";; Copyright 2015 Andrey Antukh <niwi@niwi.be>\n;;\n;; Licensed under the Apache License, Version 2.0 (the \"License\")\n;; you may not use this file except in compliance with the License.\n;; Yo...
clojure
chosen
[ { "from": "human", "value": "Add the stub of the junit task\n" }, { "from": "gpt", "value": "(ns radicalzephyr.boot-junit\n {:boot/export-tasks true}\n (:require [boot.core :as core])\n (:import org.junit.runner.JUnitCore))\n\n(deftask junit\n \"Run the jUnit test runner.\"\n []\n (with-pr...
clojure
chosen
[ { "from": "human", "value": "Prepare statement query to dbas\n" }, { "from": "gpt", "value": "(ns discuss.find\n (:require [clojure.walk :refer [keywordize-keys]]\n [om.core :as om :include-macros true]\n [om.dom :as dom :include-macros true]\n [discuss.communic...
clojure
chosen
[ { "from": "human", "value": "Add super(aka global or final) aggregation job flow\n" }, { "from": "gpt", "value": "\n{:nodes\n {:ph2\n {:name \"tnseq-final-aggregate\",\n :type \"tool\",\n :args []}\n :prn1 {:type \"func\",\n :name \"prn\"}},\n :edges\n {:ph2 [:prn1]}}\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add AST to form emission pass\n" }, { "from": "gpt", "value": ";; Copyright (c) Reid McKenzie, Rich Hickey & contributors. The use\n;; and distribution terms for this software are covered by the\n;; Eclipse Public License 1.0\n;; (http://opensource.org/licens...
clojure
chosen
[ { "from": "human", "value": "Add a test for sqlite/column-names\n\nThe upcoming korma update broke the original version of this fn, so I added a test first.\n" }, { "from": "gpt", "value": "(ns vip.data-processor.db.sqlite-test\n (:require [vip.data-processor.db.sqlite :as sqlite]\n ...
clojure
chosen
[ { "from": "human", "value": "Solve Banknotes and Coins in clojure\n" }, { "from": "gpt", "value": "(ns main\n (:require [clojure.string :as string]))\n\n(def notas [10000.0 5000.0 2000.0 1000.0 500.0 200.0])\n(def coins [100.0 50.0 25.0 10.0 5.0 1.0])\n\n(defn print-result [value currencies cur...
clojure
chosen
[ { "from": "human", "value": "Add basic test structure + failing test\n" }, { "from": "gpt", "value": "(ns desdemona.cli-test\n (:require\n [desdemona.launcher.aeron-media-driver :as aeron]\n [clojure.test :refer [deftest testing is]])\n (:import\n [java.io StringWriter]))\n\n(def fake-bl...
clojure
chosen
[ { "from": "human", "value": "Add cljs konserve main test.\n" }, { "from": "gpt", "value": "(ns konserve.konserve-test\n (:require [cljs.test :refer [run-tests]]\n [konserve.filestore-test]\n [konserve.serializers-test]))\n\n(run-tests 'konserve.filestore-test\n '...
clojure
chosen
[ { "from": "human", "value": "Move the predicate functions in to their own ns -- it seems likely that\nwe'll wind up with a bunch of these. Also, remove the note about\nexpecting a java.io.File from the docstrings -- our schmancy multimethod\n`is-type` obviates that.\n" }, { "from": "gpt", "value...
clojure
chosen
[ { "from": "human", "value": "Add leiningen `:user` profile file\n" }, { "from": "gpt", "value": "{:user {:plugins [[lein-try \"0.4.1\"]\n [lein-pprint \"1.1.1\"]\n [cider/cider-nrepl \"0.7.0\"]]}}\n" } ]
clojure
chosen
[ { "from": "human", "value": "Solve Fuel Spent in clojure\n" }, { "from": "gpt", "value": "(ns main)\n\n(defn main []\n (let [h (-> (read-line) (Double/parseDouble))\n s (-> (read-line) (Double/parseDouble))]\n (printf \"%.3f%n\" (/ (* h s) 12))))\n\n(main)\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add utils for work with dom file like objects.\n" }, { "from": "gpt", "value": ";; This Source Code Form is subject to the terms of the Mozilla Public\n;; License, v. 2.0. If a copy of the MPL was not distributed with this\n;; file, You can obtain one at http://mozil...
clojure
chosen
[ { "from": "human", "value": "Add simple test for routes\n" }, { "from": "gpt", "value": "(ns subman.t-routes\n (:require [midje.sweet :refer [fact => truthy]]\n [subman.routes :as routes]))\n\n(fact \"routes should be ok\"\n routes/main-routes => truthy)\n" } ]
clojure
chosen
[ { "from": "human", "value": "Add the ability to populate objects with thumbnails and url resolved paths.\n" }, { "from": "gpt", "value": ";; This Source Code Form is subject to the terms of the Mozilla Public\n;; License, v. 2.0. If a copy of the MPL was not distributed with this\n;; file, You c...
clojure
chosen
[ { "from": "human", "value": "Add own defc macro for more easy define components with less boilerplate.\n" }, { "from": "gpt", "value": ";; This Source Code Form is subject to the terms of the Mozilla Public\n;; License, v. 2.0. If a copy of the MPL was not distributed with this\n;; file, You can...
clojure
chosen
[ { "from": "human", "value": "Add smoke tests for core entrypoint functionss\n" }, { "from": "gpt", "value": "(ns clj-gatling.core-test\n (:require [clojure.test :refer :all]\n [clj-gatling.test-helpers :refer :all]\n [clj-containment-matchers.clojure-test :refer :all]\n ...
clojure
chosen
[ { "from": "human", "value": "Add sample from Clojure Applied\n" }, { "from": "gpt", "value": ";; See: https://clojuredocs.org/clojure.test/deftest\n(ns cjapplied.ch08)\n(use 'clojure.test)\n\n(deftest addition\n (is (= 4 (+ 2 2)))\n (is (= 7 (+ 3 4))))\n\n(deftest subtraction\n (is (= 1 (- 4 ...
clojure
chosen
[ { "from": "human", "value": "Add cljs wrapper on vendor\n" }, { "from": "gpt", "value": "(ns parse-names.core\n (:require [parse-names.vendor :as v]))\n\n(defn parse-name [name]\n (let [name-obj (v/parse name)]\n (->> {:first-name (.-firstName name-obj)\n :last-name (.-lastName nam...
clojure
chosen
[ { "from": "human", "value": "Add web NS tests, mostly for routes\n" }, { "from": "gpt", "value": "(ns doctopus.web-test\n (:require [clojure.edn :as edn]\n [clojure.java.io :as io]\n [clojure.test :refer :all]\n [compojure.core :refer [context]]\n [do...
clojure
chosen
[ { "from": "system", "value": "Add in-memory cloudfiles connection to the dev system\n" }, { "from": "human", "value": "(ns user\n (:require [clojars\n [config :as config]\n [errors :as errors]\n [system :as system]]\n [clojars.db.migrate :as migrat...
clojure
chosen
[ { "from": "human", "value": "Add simple tests for search\n" }, { "from": "gpt", "value": "(ns subman.t-search\n (:require-macros [purnam.test.sweet :refer [facts fact]])\n (:require [reagent.core :refer [atom]]\n [subman.helpers :refer [truthy]]\n [subman.search :as searc...
clojure
chosen
[ { "from": "human", "value": "Add clojure day 3 basic\n" }, { "from": "gpt", "value": "; Use refs to create a vector of accounts in memory. Create debit and credit functions to change the balance of an account.\n(def accounts (ref [0 0 0]))\n\n(defn balance\n [accounts index]\n (nth @accounts i...
clojure
chosen
[ { "from": "human", "value": "Add mtg card master namespace\n" }, { "from": "gpt", "value": "(ns decktouch.mtg-card-master\n (:require [clojure.data.json :as json]))\n\n(def mtg-cards (json/read-str (slurp \"resources/AllCards.json\")))\n\n(def card-names (keys mtg-cards))\n\n(defn match\n \"Re...
clojure
chosen
[ { "from": "human", "value": "Add tests for character escaping for VCF string fields\n" }, { "from": "gpt", "value": "(ns cljam.io.vcf.reader-test\n (:require [clojure.test :refer [deftest is]]\n [cljam.io.vcf.reader :as vcf-reader]))\n\n(deftest parse-structured-line-test\n (is (= {...
clojure
chosen
[ { "from": "system", "value": "Update cryogen-core dependency to 0.1.9.\n" }, { "from": "human", "value": "(defproject cryogen \"0.1.0\"\n :description \"Simple static site generator\"\n :url \"https://github.com/lacarmen/cryogen\"\n :license {:name \"Eclipse Publ...
clojure
chosen
[ { "from": "human", "value": "Write scraper for pedals db\n" }, { "from": "gpt", "value": "(ns scraper.core\n (:require [clojure.string :as str]))\n\n(def url \"https://docs.google.com/spreadsheets/d/1XMCStIcX-UkJF2YYmco7mnoSec8I8Vg_1wSSAVR7L00/export?format=csv\")\n\n(def input (slurp url))\n(d...
clojure
chosen
[ { "from": "human", "value": "Add our first test oh boy!\n" }, { "from": "gpt", "value": "(ns doctopus.files-test\n (:require [doctopus.files :refer :all]\n [clojure.test :refer :all]))\n\n(deftest test-truncate-str\n (testing \"Can we truncate one path by removing another path from ...
clojure
chosen
[ { "from": "human", "value": "Add Vocabulary (prefixers) for ONS/ Statistical Geography\n" }, { "from": "gpt", "value": "(ns grafter.rdf.ontologies.ons-geography\n (:require [grafter.rdf.ontologies.util :refer :all]))\n\n(def statistical-entity (prefixer \"http://statistics.data.gov.uk/def/stati...
clojure
chosen
[ { "from": "human", "value": "Add a simple test for randombytes\n" }, { "from": "gpt", "value": "(ns caesium.randombytes-test\n (:require [caesium.randombytes :as r]\n [clojure.test :refer [deftest is]]))\n\n(deftest randombytes-tests\n (let [some-bytes (r/randombytes 10)]\n (is (...
clojure
chosen
[ { "from": "system", "value": "Fix the cljs server calls to use ajax.core :params\n\nInstead of doing poor string interpolation, just use the library.\n" }, { "from": "human", "value": "(ns ^:figwheel-load word-finder.actions.call-server\n (:require [ajax.core :refer [GET]]))\n\n(def server \"ht...
clojure
chosen
[ { "from": "human", "value": "Add Utils test file, don't have anything to put in it yet.\n" }, { "from": "gpt", "value": "(ns hydrofoil.expectations.model\n (:require [expectations :refer :all]\n [hydrofoil.model :refer :all]\n [hydrofoil.core :refer :all]\n [hyd...
clojure
chosen
[ { "from": "human", "value": "Add unit test for mutate and update the charts.\n" }, { "from": "gpt", "value": "(ns clj-diff.test.performance\n (:use [clj-diff.core])\n (:use [clj-diff.performance] :reload)\n (:use [clojure.test]))\n\n(deftest mutate-test\n (let [a \"abcdefghijklmnopqrstuvwxyz...
clojure
chosen
[ { "from": "human", "value": "Add functions for interacting with EBS snapshots\n" }, { "from": "gpt", "value": "(ns circle.admin.ebs\n (:require [org.jclouds.ec2.ebs2 :as ebs])\n (:require [circle.backend.ec2 :as ec2])\n (:use [circle.utils.except :only (throw-if-not)])\n (:use [circle.aws-cr...
clojure
chosen
[ { "from": "human", "value": "Add macro example from section 7.1\n" }, { "from": "gpt", "value": "(ns clojure-walkthrough.cjia.ch07-xx)\n; 7.1: Macro basic\n\n; 7.1.1: Textual substitution\n\n(def a-ref (ref 0))\n\n(dosync\n (ref-set a-ref 1)) ; 1\n\n;; You could implement this using the macros l...
clojure
chosen
[ { "from": "human", "value": "Add ability to calculate edit distance.\n" }, { "from": "gpt", "value": "(ns cljs-nlp.stats.levenshtein\n (:use [clojure.string :only [blanks?]]))\n\n(defn create-element\n [char1 char2 previous-row current-row idx]\n (if (= char1 char2)\n (previous-row (- idx ...
clojure
chosen
[ { "from": "system", "value": "Prepare for next release cycle.\n" }, { "from": "human", "value": "(defproject onyx-app/lein-template \"0.10.0.0-beta10\"\n :description \"Onyx Leiningen application template\"\n :url \"https://github.com/onyx-platform/onyx-template\"\n :license {:name \"MIT Lice...
clojure
chosen
[ { "from": "human", "value": "Add tests of the Grimoire web API\n" }, { "from": "gpt", "value": "(ns grimoire.api.web-test\n (:require [grimoire.api :as api]\n [grimoire.things :as t]\n [grimoire.util :refer [succeed? result]]\n [grimoire.api.web.read]\n ...
clojure
chosen
[ { "from": "human", "value": "Add tests for current clj heuristic analyzer\n" }, { "from": "gpt", "value": "(ns pathfinder.analyze.clojure-test\n (:use midje.sweet\n pathfinder.analyze.analyzer\n pathfinder.analyze.clojure))\n\n(facts \"about heuristic analysis\"\n (fact \"sh...
clojure
chosen
[ { "from": "human", "value": "Add protocols and records stuff.\n" }, { "from": "gpt", "value": "(ns com.nomistech.clojure-the-language.protocols-and-records-test\n (:require [midje.sweet :refer :all]))\n\n;;;; ___________________________________________________________________________\n;;;; ----...
clojure
chosen
[ { "from": "human", "value": "Add reified-tests example source for testing at the REPL\n" }, { "from": "gpt", "value": "(ns lazytest.reified-tests\n (:use (lazytest expect testable runnable-test)))\n\n(def t1 (reify Testable\n\t (get-tests [this]\n\t\t\t (list\n\t\t\t (reify RunnableTes...
clojure
chosen
[ { "from": "human", "value": "Add place holder for cjia\n" }, { "from": "gpt", "value": "(ns clojure-walkthrough.cjia.ch10-xx\n (:require [clojure.test :refer :all]\n [clojure-walkthrough.cjia.ch10-date-operations :refer :all]))\n\n(deftest test-simple-data-parsing\n (let [d (date \"...
clojure
chosen
[ { "from": "human", "value": "Solve Distance Between Two Points in clojure\n" }, { "from": "gpt", "value": "(ns main\n (:require [clojure.string :as str]))\n\n(defn main []\n (let [[x1 y1] (-> (read-line) (str/split #\" \"))\n [x2 y2] (-> (read-line) (str/split #\" \"))\n [x1' y1'...
clojure
chosen
[ { "from": "human", "value": "Solve Average 1 in clojure\n" }, { "from": "gpt", "value": "(ns main)\n\n(defn main []\n (let [a (Double/parseDouble (read-line))\n b (Double/parseDouble (read-line))]\n (format \"%.5f\" (/ (+ (* a 3.5) (* b 7.5)) 11.0))))\n\n(println \"MEDIA =\" (main))\n...
clojure
chosen
[ { "from": "human", "value": "Add code generation tests for the defentity macro\n" }, { "from": "gpt", "value": "(ns workflo.macros.entity-test\n (:require [clojure.spec :as s]\n [clojure.test :refer [deftest is]]\n [workflo.macros.entity :as e :refer [defentity]]))\n\n(def...
clojure
chosen
[ { "from": "human", "value": "Use snapshots to clear chain before test\n\nBefore, deployer was used to clear test blockchain state\nbefore each test. Deployer is now gone, replaced with\ntruffle. I found it much faster to use ganache snapshotting\nbefore / after each test, than to call truffle migrate.\n" ...
clojure
chosen