This file contains hidden or 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 sequence-inverter.core | |
(:gen-class)) | |
(defn invert-char | |
[char] | |
(let [char-map {"A" "C" | |
"C" "A" | |
"G" "T" | |
"T" "G"}] | |
(get char-map char))) |
This file contains hidden or 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
C G A T A C G T T | |
M: 0 Ix: 0 Iy: -2 ______ | M: -- Ix: -- Iy: -3 ______ | M: -- Ix: -- Iy: -4 ______ | M: -- Ix: -- Iy: -5 ______ | M: -- Ix: -- Iy: -6 ______ | M: -- Ix: -- Iy: -7 ______ | M: -- Ix: -- Iy: -8 ______ | M: -- Ix: -- Iy: -9 ______ | M: -- Ix: -- Iy: -10 ______ | M: -- Ix: -- Iy: -11 ______ | | |
A ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
M: -- Ix: 0 Iy: -- ______ | M: -1 Ix: -- Iy: -- :M____ | M: -4 Ix |
This file contains hidden or 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
M: 0 Ix: 0 Iy: -2 ______ | M: -- Ix: -- Iy: -3 ______ | M: -- Ix: -- Iy: -4 ______ | M: -- Ix: -- Iy: -5 ______ | M: -- Ix: -- Iy: -6 ______ | M: -- Ix: -- Iy: -7 ______ | M: -- Ix: -- Iy: -8 ______ | M: -- Ix: -- Iy: -9 ______ | M: -- Ix: -- Iy: -10 ______ | M: -- Ix: -- Iy: -11 ______ | | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
M: -- Ix: 0 Iy: -- ______ | M: -1 Ix: -- Iy: -- :M____ | M: -2 Ix: -- Iy: -4 :y__:M | M: -5 Ix: -- Iy: -5 :y__:y | M: -4 Ix: -- Iy: -6 :y__:y | M: -7 Ix: -- Iy: -7 :y__:y | M: -8 Ix: -- Iy: -8 :y__:y | M: -9 Ix: -- Iy: -9 :y__:y | M: -8 Ix: -- Iy: -10 :y__:y | M: -9 Ix: -- Iy: -11 :y__:y | | |
--------------------------------------------------- |
This file contains hidden or 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
C G A T A C G T T | |
M: 0 Ix: 0 Iy: -2 ______ | M: -- Ix: -- Iy: -3 ______ | M: -- Ix: -- Iy: -4 ______ | M: -- Ix: -- Iy: -5 ______ | M: -- Ix: -- Iy: -6 ______ | M: -- Ix: -- Iy: -7 ______ | M: -- Ix: -- Iy: -8 ______ | M: -- Ix: -- Iy: -9 ______ | M: -- Ix: -- Iy: -10 ______ | M: -- Ix: -- Iy: -11 ______ | | |
A ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
M: -- Ix: 0 Iy: -- ______ | M: -- Ix: -- Iy: -- ______ | M: -- Ix |
This file contains hidden or 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
C G A T A C G T T | |
M: 0 Ix: 0 Iy: -2 ______ | M: -- Ix: -- Iy: -3 ______ | M: -- Ix: -- Iy: -4 ______ | M: -- Ix: -- Iy: -5 ______ | M: -- Ix: -- Iy: -6 ______ | M: -- Ix: -- Iy: -7 ______ | M: -- Ix: -- Iy: -8 ______ | M: -- Ix: -- Iy: -9 ______ | M: -- Ix: -- Iy: -10 ______ | M: -- Ix: -- Iy: -11 ______ | | |
A ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
M: -- Ix: 0 Iy: -- ______ | M: -1 Ix: -- Iy: -- :M____ | M: -4 Ix |
This file contains hidden or 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
; I have a question about how to test handlers that dispatch other handlers (say when fetching from a server). | |
; Here's what the wiki says about fetching from servers | |
(ns my.app.handlers | |
(:require [ajax.core :refer [GET POST]] | |
[re-frame.core :refer [register-handler])) | |
(register-handler | |
:request-it | |
(fn |
This file contains hidden or 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
; --------------------------------------------------------------------------------- | |
; handler code | |
; --------------------------------------------------------------------------------- | |
; My handler code fetches messages in parrallel and then picks them off of the channel | |
; vector within the go block. I've succesfully redef'ed `http/get` by bringing it out | |
; of the `go` block, but redef'ing 're-frame/dispatch` doesn't seem to be working. | |
(defn fetch-full-messages [db [scenario-name]] | |
(if-let [scenario (get-in db [:admin-configuration :scenarios scenario-name])] |
This file contains hidden or 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
FROM node:4.4.2 | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Set its environment to development | |
ENV NODE_ENV development | |
EXPOSE 3000 |
This file contains hidden or 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
const mapStateToProps = (state: State, ownProps: Object) => { | |
const scenario = _.find(state.scenarios.value, (scenario: Scenario) => scenario.id === ownProps.params.scenarioId) | |
// state looks something like this | |
/** | |
* { | |
* results: { | |
* value: { | |
* 'fooScenarioId': { | |
* 'fooActionId: { | |
* foo: 'bar', |
This file contains hidden or 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
//@flow | |
import { TOGGLE_RESULT_ERROR_DISPLAY, } from '../actions/actionTypes' | |
const _ = require('lodash') | |
export const toggleResultErrorDisplay = (results: ScenarioActionResults = {}, action: ToggleResultErrorDisplayType): ScenarioActionResults => { | |
const result = _.get(results, [action.scenarioId, action.actionId]) | |
if(!result){ | |
return results | |
} | |
const scenarioResults = _.get(results, action.scenarioId) |