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
export const color = { | |
transparent: 'rgba(255, 255, 255, 0)', | |
translucent: 'rgba(255, 255, 255, 0.6)', | |
white: '#FFFFFF', | |
black: '#000000', | |
normalText: '#515151', | |
darkGray: '#6F6F6F', | |
mediumGray: '#B5B5B5', | |
lightGray: '#EEEEEE', | |
accentText: '#F1AF8A', |
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, { PureComponent } from 'react' | |
import PropTypes from 'prop-types' | |
import Radium from 'radium' | |
import classNames from 'classnames' | |
import { RadiumLink } from '@/util' | |
import { color } from '@/appStyles' | |
import './style.css' |
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, { PureComponent } from 'react' | |
import PropTypes from 'prop-types' | |
import Radium from 'radium' | |
import classNames from 'classnames' | |
import { RadiumLink } from '@/util' | |
import { color } from '@/appStyles' | |
import './style.css' |
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
const fs = require('fs') | |
const path = require('path') | |
const assert = require('assert') | |
const TEMPLATE_RELATIVE_PATH = '../templates' | |
const SUBJECT_FILENAME = 'subject.txt' | |
const EMAIL_MARKDOWN_FILENAME = 'email.md' | |
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
let fs = require('fs') | |
let path = require('path') | |
const getProblem = (problemId) => { | |
try { | |
return fs.readFileSync(path.join(__dirname, `../content/questions/${problemId}.md`), 'utf8') | |
} catch (e) { | |
throw `Problem #${problemId} not found in questions directory.` | |
} | |
} |
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
from collections import defaultdict | |
from itertools import combinations | |
def fractiles(k, complexity): | |
"""Generator for each type of fractile""" | |
return ((i, artwork(i, k, complexity)) for i in range(2 ** k)) | |
def artwork(original_sequence, k, complexity): | |
if complexity == 1: | |
return original_sequence |
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
from collections import defaultdict | |
from itertools import combinations | |
def fractiles(k, complexity): | |
"""Generator for each type of fractile""" | |
return ((i, artwork(i, k, complexity)) for i in range(2 ** k)) | |
def artwork(original_sequence, k, complexity): | |
if complexity == 1: | |
return original_sequence |
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
" Filetype syntax stuff | |
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType ruby setlocal shiftwidth=2 tabstop=2 | |
au BufRead,BufNewFile *.rs setfiletype rust | |
set backspace=indent,eol,start | |
set backupdir=~/Dropbox/vimbackups | |
" leader | |
:let mapleader = "," |
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
class Trie: | |
def __init__(self): | |
self._trie = {"word": ""} | |
def insert(self, x): | |
trie = self._trie | |
# Go through trie, adding any missing keys. | |
# At the end, set `word?` indicator to true. | |
for index, char in enumerate(list(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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "markusproject/debian" | |
config.vm.network "forwarded_port", guest: 3000, host: 42069 | |
config.vm.provider "virtualbox" do |vb| | |
# Don't boot with headless mode | |
# vb.gui = true | |
vb.name = "markus" |
NewerOlder