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
projects: { | |
<begin, end, projectId>: { | |
summary: { | |
treatment: { | |
session: 123 | |
revenue: 123 | |
} | |
control: { | |
session: 123 | |
revenue: 123 |
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 test1.prob4) | |
(defn palindromic-number? [x] | |
(let [arr (vec (.toString x)), size (count arr)] | |
(loop [x 0] | |
(if (not= (get arr x) (get arr (- size x 1))) | |
false | |
(if (> x (/ size 2)) | |
true | |
(recur (inc x))))))) |
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 euler.p4) | |
(defn palindromic-number? [x] | |
(let [arr (vec (.toString x)), size (count arr)] | |
(loop [x 0] | |
(if (not= (get arr x) (get arr (- size x 1))) | |
false | |
(if (> x (/ size 2)) | |
true |
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 euler.p10) | |
(use 'euler.helpers) | |
(defn primes-upto [x] | |
(loop [primes [2] last 3] | |
(if (> last x) | |
primes | |
(recur (if (prime? last) | |
(conj primes last) |
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 euler.p17) | |
;If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. | |
;If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? | |
; | |
;NOTE: Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage. | |
(require '[clojure.string :as string]) | |
(defn ret [rem s] {:num rem :s s}) |
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
{ | |
match: '/v2/projects/:proj_id/experiments/:experiment_id', | |
prereq: (ctx) => { | |
return flux.evalaute(getters.isFullStackProject) | |
}, | |
handle: [ | |
[ | |
ABExperimentEditorSection, | |
...RoutingFns.standardNavHandlers(NavConstants.NavWidth.COLLAPSED, NavConstants.NavItems.PERSONALIZATION), | |
RoutingFns.parseProjectId, |
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 flux from 'core/flux'; | |
import React from 'react'; | |
import historyUtil from 'optly/utils/history'; | |
import ui from 'core/ui'; | |
import Vue from 'vue'; | |
import PropTypes from 'prop-types'; | |
import Immutable from 'optly/immutable'; | |
import { getters as CurrentLayerGetters } from 'bundles/p13n/modules/current_layer'; | |
import { getters as CurrentProjectGetters } from 'optly/modules/current_project'; |
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 React from 'react'; | |
import ui from 'core/ui'; | |
import PropTypes from 'prop-types'; | |
import { Immutable } from 'nuclear-js'; | |
import { connect } from 'core/ui/decorators'; | |
import { Input as OuiInput, Button } from 'optimizely-oui' | |
import SectionModule from '../../section_module/'; |
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 _ from 'lodash'; | |
import React from 'react'; | |
import ui from 'core/ui'; | |
import PropTypes from 'prop-types'; | |
import { Immutable } from 'nuclear-js'; | |
import { connect } from 'core/ui/decorators'; | |
import { Input as OuiInput, Button } from 'optimizely-oui' | |
import SectionModule from '../../section_module/'; |
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 _ from 'lodash'; | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Input, Button } from 'optimizely-oui' | |
import SectionModule from '../../section_module/'; | |
@Form({ |
OlderNewer