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
;; Breaks on [2 3 3 4 5] | |
;; http://www.4clojure.com/problem/53#prob-title | |
(defn subseq- [coll] | |
(partition-by (fn [x] (= 1 (- (second x) (first x)))) | |
(filter #(< (first %) (second %)) | |
(partition 2 1 coll)))) | |
;; Example | |
(def test-vecs [[1 0 1 2 3 0 4 5] [5 6 1 3 2 7] [2 3 3 4 5] [7 6 5 4]]) |
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
;; With numeric ARG, display the tool bar if and only if ARG is | |
;; positive. Tool bar has icons document (read file), folder (read | |
;; directory), X (discard buffer), disk (save), disk+pen (save-as), | |
;; back arrow (undo), scissors (cut), etc. | |
(tool-bar-mode 0) | |
;; Get rid of the annoying splash and startup screens | |
(setq inhibit-splash-screen t | |
inhibit-startup-message t) | |
(setq grep-program "egrep") | |
(setq-default fill-column 72) |
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
;; With numeric ARG, display the tool bar if and only if ARG is | |
;; positive. Tool bar has icons document (read file), folder (read | |
;; directory), X (discard buffer), disk (save), disk+pen (save-as), | |
;; back arrow (undo), scissors (cut), etc. | |
(tool-bar-mode 0) | |
;; Get rid of the annoying splash and startup screens | |
(setq inhibit-splash-screen t | |
inhibit-startup-message t) | |
(setq grep-program "egrep") | |
(setq-default fill-column 72) |
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
#!/usr/bin/env python | |
import os | |
import random | |
class Follower: | |
def __init__(self, starting_location, current_victim=None): | |
# `starting_location` is a string representing a file system path. | |
self.location = starting_location | |
self.current_victim = current_victim |
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
#!/usr/bin/env python | |
import os | |
import random | |
class Follower: | |
def __init__(self, starting_location, current_victim=None): | |
# `starting_location` is a string representing a file system path. | |
self.location = starting_location | |
self.current_victim = current_victim |
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
;;; Directory Local Variables | |
;;; For more information see (info "(emacs) Directory Variables") | |
((python-mode | |
(python-shell-virtualenv-path . "/Users/mdeboard/Envs/sumo"))) | |
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
;; Version 1 | |
{:user {:plugins [[luminus/lein-template "2.9.10.74"]]} | |
:repl {:dependencies [[cider/cider-nrepl "0.15.0-snapshot"]]}} | |
;; Version 2 | |
{:user {:plugins [[luminus/lein-template "2.9.10.74"]] | |
:dependencies [[cider/cider-nrepl "0.15.0-snapshot"]]}} |
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
;; Running `clojure-jack-in' here | |
(ns guestbook.db.core | |
(:require | |
[conman.core :as conman] | |
[mount.core :refer [defstate]] | |
[guestbook.config :refer [env]])) | |
(defstate ^:dynamic *db* | |
:start (conman/connect! | |
{:datasource |
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
guestbook.db.core> (require '[guestbook.core :refer :all]) | |
nil | |
guestbook.db.core> (mount.core/start #'*db*) | |
ClassCastException mount.core.DerefableState cannot be cast to clojure.lang.IFn guestbook.db.core/eval4338/fn--4339 (core.clj:11) | |
guestbook.db.core> |
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
require('normalize.css/normalize.css'); | |
require('styles/App.css'); | |
require('codemirror/lib/codemirror.css'); | |
import React from 'react'; | |
import Paste from './Paste'; | |
import LanguageStore from '../stores/LanguageStore'; | |
import Constants from '../AppConstants'; | |
import { codemirror } from '../../cfg/base.js'; |