This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"> | |
<xsl:output method="text" encoding="utf-8" /> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="ss:Row"><xsl:apply-templates select="ss:Cell" /><xsl:text> | |
</xsl:text> | |
</xsl:template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scottdw.feip.core | |
(:import [java.awt Image] | |
[java.awt.image BufferedImage] | |
[org.imgscalr Scalr] | |
[org.jtransforms.fft DoubleFFT_2D RealFFTUtils_2D]) | |
(:require [mikera.image.core :as img] | |
[mikera.image.colours :as ic] | |
[clojure.core.matrix :as mat])) | |
(defn gen-p-img [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scottdw.jpeg | |
(:import [clojure.lang Keyword] | |
[com.drew.imaging ImageMetadataReader] | |
[com.drew.metadata Directory Metadata Tag] | |
[java.net URI] | |
[java.nio ByteBuffer] | |
[java.nio.file Files Paths]) | |
(:require [clojure.java.io :as io])) | |
(defn read-metadata [^String file-name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scottdw.mmgr.gl | |
(:import [javax.media.opengl DebugGL3 GL GL2 GL3 GLAutoDrawable GLCapabilities GLEventListener GLProfile] | |
[com.jogamp.newt NewtFactory] | |
[com.jogamp.newt.event WindowAdapter WindowEvent] | |
[com.jogamp.newt.opengl GLWindow]) | |
(:require [clojure.java.io :as io] | |
[taoensso.timbre :as timbre :refer (trace debug error)])) | |
(defn create-shader [^GL3 gl resource type] | |
(let [source (slurp (io/resource resource)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scottdw.plot.demo | |
(:import [java.util Random] | |
[org.jzy3d.analysis AnalysisLauncher AbstractAnalysis] | |
[org.jzy3d.chart Chart] | |
[org.jzy3d.chart.factories AWTChartComponentFactory] | |
[org.jzy3d.colors Color ColorMapper] | |
[org.jzy3d.colors.colormaps ColorMapRainbow] | |
[org.jzy3d.maths Coord3d Range] | |
[org.jzy3d.plot3d.builder Builder Mapper] | |
[org.jzy3d.plot3d.builder.concrete OrthonormalGrid] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scottdw.image | |
(:import | |
[java.awt Color Image Dimension] | |
[java.awt.image BufferedImage] | |
[java.io File] | |
[javax.imageio ImageIO] | |
[javax.swing JFrame JPanel]) | |
(require [scottdw.stats :as stats])) | |
(defn read-image [^String filename] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns stats) | |
(defn mode [vs] | |
(let [fs (frequencies vs)] | |
(first (last (sort-by second fs))))) | |
(defn quantile | |
([p vs] | |
(let [svs (sort vs)] | |
(quantile p (count vs) svs (first svs) (last svs)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn neighbours-fn [w h n] | |
(letfn [(has-w [i] (not (zero? (rem i w)))) | |
(pos-w [i] (dec i)) | |
(has-n [i] (>= i w)) | |
(pos-n [i] (- i w)) | |
(has-e [i] (not (zero? (rem (inc i) w)))) | |
(pos-e [i] (inc i)) | |
(has-s [i] (< i (* w (dec h)))) | |
(pos-s [i] (+ i w))] | |
(let [pred-pos-m {:w [has-w pos-w] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import | |
[java.awt.geom Rectangle2D$Double] | |
[java.awt Dimension Color] | |
[javax.swing JFrame JLabel] | |
[java.io File] | |
[javax.imageio ImageIO]) | |
(defn translate-scale-fn [min max target] | |
(let [scale-factor (/ target (- max min))] | |
(fn [v] |
NewerOlder