📷
| 👍 | 💰 | 🔗 |
|---|---|---|
| 6 | $648 | Sony A6000 |
| 5 | $1100 | Fuji X100T |
| 3 | $4250 | Leica Q |
| 3 | $1400 | Fuji XT1 |
| 2 | $950 | Sony RX100 IV |
| 2 | $950 | Fuji T-10 |
| import expect from 'expect'; | |
| import { countByFrom, probablize } from 'src/MarkovMatrix'; | |
| describe('MarkovMatrix', () => { | |
| it('counts by from-state', () => { | |
| const input = [ | |
| ['foo', 'bar'], | |
| ['foo', 'bar'], | |
| ['foo', 'bar'], | |
| ['foo', 'baz'], |
| import { compose, countBy, divide, filter, groupBy, head, last, toLower, map, prop, sum, values } from 'ramda'; | |
| const sumValues = compose(sum, values); | |
| export function countByFrom(input) { | |
| return compose( | |
| map(countBy(last)), | |
| groupBy(head), | |
| filter((x) => { | |
| return x.length > 1; |
| /* @flow */ | |
| import type { Action, AppState, StyleProp } from '../../Types'; | |
| import { append, compose, equals, init, last, lensPath, over, reject, set, | |
| update, view } from 'ramda'; | |
| const UNDO = 'UNDO'; | |
| export function undo(): Action { | |
| return { | |
| type: UNDO, | |
| data: true, |
| /* @flow */ | |
| import { compose, contains, filter, forEach, flip, map, prop } from 'ramda'; | |
| type TypekitFont = { | |
| descriptors: { | |
| featureSettings: string, | |
| subset: string, | |
| unicodeRange: string, | |
| weight: number, | |
| }, |
📷
| 👍 | 💰 | 🔗 |
|---|---|---|
| 6 | $648 | Sony A6000 |
| 5 | $1100 | Fuji X100T |
| 3 | $4250 | Leica Q |
| 3 | $1400 | Fuji XT1 |
| 2 | $950 | Sony RX100 IV |
| 2 | $950 | Fuji T-10 |
| import expect from 'expect'; | |
| import { flatten, unflatten } from 'src/flatten'; | |
| describe('Flatten', () => { | |
| it('flattens an object, prefixed by original keys', () => { | |
| const input = { | |
| foo: { | |
| bar: 'baz', | |
| qux: 'zip', | |
| }, |
| import { StyleMatrix, Style, StyleProp } from './Types'; | |
| import { addIndex, assoc, concat, keys, map, prop, reduce } from 'ramda'; | |
| const reduceIndexed = addIndex(reduce); | |
| function product([head, ...tail]) { | |
| if (head === undefined) { return [[]]; } | |
| const prod = product(tail); |
| const Xray = require('x-ray') | |
| const x = Xray() | |
| x('https://www.typewolf.com/site-of-the-day/', '.item', [{ | |
| title: '.item-title', | |
| date: '.item-date', | |
| fonts: ['.item-tags a'] | |
| }]) | |
| .paginate('.btn-more:nth-child(2)@href') | |
| .limit(165) |