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
''' | |
The goal I have is to generate test dictionaries from an example. | |
The test dictionaries should vary in terms of which keys are present. | |
The values should be chosen from one of the provided options. | |
For example the dict: | |
{ |
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
\documentclass[]{article} | |
\usepackage{wrapfig} | |
\newenvironment{infobox}{\wrapfigure{r}{5cm}}{\endwrapfigure} | |
\begin{document} | |
\begin{infobox} | |
BOX | |
BOX |
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
''' | |
To use: | |
touch testfile | |
doit | |
Serialized .doit.db database (JSON format) will contain: | |
{ | |
"create_object": { |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:DescribeStacks", | |
"cloudformation:GetStackPolicy", | |
"cloudformation:ListStacks", |
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 timeit | |
import string | |
from itertools import combinations | |
ITERATIONS = 10000 | |
TASK = 'task:' | |
d = {TASK + letter: True for letter in 'A'} | |
task_names = [''.join(x) for x in combinations(string.ascii_letters, 2)] | |
print(f'Number of tasks: {len(task_names)}') |
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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"encoding/hex" | |
"errors" | |
"flag" | |
"fmt" | |
"image" |
OlderNewer