Skip to content

Instantly share code, notes, and snippets.

View jordangarcia's full-sized avatar

Jordan Garcia jordangarcia

View GitHub Profile
projects: {
<begin, end, projectId>: {
summary: {
treatment: {
session: 123
revenue: 123
}
control: {
session: 123
revenue: 123
(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)))))))
(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
(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)
(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})
{
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,
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';
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/';
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/';
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { Input, Button } from 'optimizely-oui'
import SectionModule from '../../section_module/';
@Form({