This blog post series has moved here.
You might also be interested in the 2016 version.
(ns db-test.core | |
(:require [clojure.java.jdbc :as j]) | |
(use [korma.db]) | |
(use [korma.core]) | |
(:gen-class)) | |
(defn setup-connection [] | |
(def oracle-db {:classname "oracle.jdbc.odbc.OracleDriver" | |
:subprotocol "oracle" | |
:subname "thin:@//remotehost:1521/derpina1" |
(ns sql-like-join | |
(:require [clojure.set :refer [difference | |
intersection | |
union]])) | |
(defn inner-join | |
[left-keys right-keys] | |
(intersection (set left-keys) (set right-keys))) | |
(defn outer-join |
This blog post series has moved here.
You might also be interested in the 2016 version.
1. Download jgit.sh from here: https://eclipse.org/jgit/download/ | |
(Yes -> it's a file with a .sh extension and we want to work in Windows, but download it!) | |
2. Rename the downloaded file to something easier to deal with. E.g. "jgit.sh" | |
3. Create a new file called jgit.bat and stick it in the same folder as jgit.sh. | |
4. Type the following into the jgit.bat file: |
const std = @import("std"); | |
const event = std.event; | |
const mem = std.mem; | |
const assert = std.debug.assert; | |
pub fn main() !void { | |
const MyServer = struct { | |
tcp_server: event.TcpServer, | |
const Self = this; |
(defn parse-fnb [path] | |
(let [fnb-csv-rows | |
(as-> (slurp (clojure.java.io/file path)) x | |
(clojure.string/split x #"\n") | |
(drop 6 x) | |
(map #(clojure.string/split % #", ") x)) | |
header (->> fnb-csv-rows first (map keyword)) | |
rows (->> fnb-csv-rows | |
rest | |
(map #(zipmap header %)) |
{ | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": true, | |
"experimental_showTabsInTitlebar": true, | |
"requestedTheme": "dark", | |
"profiles": [ | |
{ |
This article compares the approaches of data manipulation using data.table in R and standard functions in Clojure, in order to evaluate the necessity of a Clojure library providing similar functionality of data.table. In the conceptual level, data.table provides a DSL in R specifically for data analysis, with a unified syntax similar to SQL for selecting, grouping, updating and joining tabular data. In contrast, the standard libraries of Clojure provide basic building blocks for general purpose, including persistent data structures (e.g. sequence, vector, set, map) and generic transformation functions (e.g. map, filter, reduce). This article aims to illustrate the impact of the two approaches on data manipulation using common use cases.
The dataset used in this article is the NYC-flights14 data, which is On-Time flights data from the Bureau of Transporation Stati