(defun my/adjust-font-size (height)
"Adjust font size by given height. If height is '0', reset font
size. This function also handles icons and modeline font sizes."
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
CREATE TABLE lookup_date | |
( | |
yyyymmdd INT NOT NULL, | |
date_actual DATE NOT NULL, | |
epoch BIGINT NOT NULL, | |
day_suffix VARCHAR(4) NOT NULL, | |
day_name VARCHAR(9) NOT NULL, | |
day_of_week INT NOT NULL, | |
day_of_month INT NOT NULL, | |
day_of_quarter INT NOT NULL, |
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 pandas as pd | |
def set_options(*seq): | |
"https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#partition" | |
assert len(seq) % 2 == 0, "I need pairs of option/values?" | |
options = [iter(seq)] * 2 | |
for opt, val in list(zip(*options)): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title><style type="text/css"> | |
code { font-family: monospace; } | |
div.constraint, | |
div.issue, | |
div.note, | |
div.notice { margin-left: 2em; } | |
ol.enumar { list-style-type: decimal; } |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CATALOG> | |
<CD> | |
<TITLE>Empire Burlesque</TITLE> | |
<ARTIST>Bob Dylan</ARTIST> | |
<COUNTRY>USA</COUNTRY> | |
<COUNTRY>UK</COUNTRY> | |
<COMPANY>Columbia</COMPANY> | |
<PRICE>10.90</PRICE> | |
<YEAR>1985</YEAR> |
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
<CATALOG> | |
<CD> | |
<TITLE>Empire Burlesque</TITLE> | |
<ARTIST>Bob Dylan</ARTIST> | |
<COUNTRY>USA</COUNTRY> | |
<COMPANY>Columbia</COMPANY> | |
<PRICE>10.90</PRICE> | |
<YEAR>1985</YEAR> | |
</CD> | |
<CD> |
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
strict digraph { | |
graph [resolution=128 , ranksep=0.2 , | |
fontname="Arial Bold Italic" , fontsize=12 , | |
compound=true , rankdir=LR , | |
style=rounded , splines=line, | |
label="Agile GTD Work Streams"] | |
############################################################################ | |
# input apps ################################################################## | |
node[fillcolor=darkgreen,style=filled, fontname=Arial, fontsize=11, shape=cds, fontcolor=white]; |
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 pprint import pprint as pp | |
def reached_top_of_stairs(stairway_height, step_tuple): | |
return sum(step_tuple) == stairway_height | |
def compute_max_steps(stairway_height, step_options): | |
non_zero = [f for f in step_options if f != 0] | |
min_step = min(non_zero) | |
return int(stairway_height / min_step) |
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 user) | |
(defn reached-top-of-staircase? | |
"Tests to make sure the steps get us to the top of the stairway." | |
[{:keys [stairway-height]} step-vec] | |
(= stairway-height (apply + step-vec))) | |
(defn compute-max-steps | |
"The idea here is that the maximum number of steps we could take is the | |
stairway height divided by the smallest step. " |
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
(def airplanes {:planes | |
{:plane | |
[{:make "Cessna", | |
:year "1977", | |
:model {:#text "MoonDart", :at-color "blue"}, | |
:owner ["mitch" "glen" "paulie"], | |
:action | |
[{:#text "sample text - landed the plane and it was windy.", | |
:at-type "landing", | |
:at-weather "windy", |
NewerOlder