Skip to content

Instantly share code, notes, and snippets.

View bukzor's full-sized avatar
🌥️
learning google cloud

Buck Evan bukzor

🌥️
learning google cloud
  • google.com
  • Appleton, WI
  • 20:34 (UTC -06:00)
View GitHub Profile
head.splitc_example3 : The(List(List(Char)), head.splitc('x', ['a', 'x', 'b']))
The.value<List(List(Char))>([['a'], ['b']])
Inside head.splitc_example3:
Found type... The(List(List(Char)),List.cons(List.cons('a',List.nil),List.cons(List.cons('b',List.nil),List.nil)))
Instead of... The(List(List(Char)),head.splitc('x',List.cons('a',List.cons('x',List.cons('b',List.nil)))))
On line 19:
18| head.splitc_example3 : The(List(List(Char)), head.splitc('x', ['a','x', 'b']))
19| The.value<List(List(Char))>([['a'], ['b']])
from __future__ import print_function
import contextlib
import pytest
# Introduce a Loud integer class that has some annoying properties that force us into a bunch of
# set up in our tests (in this case, to prevent unnecessary output to stdout during test)
class LoudInt(int):
@bukzor
bukzor / crash.log
Created March 31, 2019 21:03
terraform crash while updating google_compute_url_map
$ tf plan -out tfplan && tf apply tfplan ; alert "Terraformed! (0)"
GoSM: Setting up security policy for terraform binary.GoSM: Setting up security policy for terraform binary.
Warning: module.global.module.restricted-area--unrestricted.module.continent--asia.module.gke.data.google_container_engine_versions._: "region": [DEPRECATED] Use location instead
Warning: module.global.module.restricted-area--unrestricted.module.continent--asia.module.gke.module.nodepool--batch--f1-micro.google_container_node_pool._: "region": [DEPRECATED] use location instead
@bukzor
bukzor / colortest16777216
Created August 22, 2018 20:58
A simple way to tell if your terminal supports truecolor.
$ cat ~/bin/colortest16777216
#!/usr/bin/env python3
# pylint: disable=g-import-not-at-top,missing-docstring,g-wrong-blank-lines
from collections import namedtuple
class Color(namedtuple('Color', 'r g b')):
"""values are 0 to 1"""
@classmethod
$ brew config
HOMEBREW_VERSION: 1.6.3-dirty
ORIGIN: [email protected]:Linuxbrew/brew.git
HEAD: b67917c837f1fb9c5bf2494cfd89b4eee6802802
Last commit: 6 hours ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 968e12cee4398a031dc80eef3f2cde5bb656ad81
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /home/buck/prefix/brew
HOMEBREW_REPOSITORY: /home/buck/prefix/brew
@bukzor
bukzor / hypothesis-bukzor-logging.patch
Last active April 20, 2018 21:15
hypothesis impossible error
diff --git a/hypothesis/core.py b/hypothesis/core.py
--- a/hypothesis/core.py
+++ b/hypothesis/core.py
@@ -222,8 +222,6 @@ def execute_explicit_examples(
)
try:
with BuildContext(None) as b:
- if settings.verbosity >= Verbosity.verbose:
- report('Trying example: ' + example_string)
test_runner(
@bukzor
bukzor / make.log
Created March 22, 2018 18:01
homebrew libbsd compile fail on Android
libtool: compile: clang -DHAVE_CONFIG_H -I.. -isystem ../include/bsd/ -include ../config.h -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT -g -O2 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -c fpurge.c -o fpurge.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC --mode=compile clang -DHAVE_CONFIG_H -I.. -isystem ../include/bsd/ -include ../config.h -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT -g -O2 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -c -o funopen.lo funopen.c
libtool: compile: clang -DHAVE_CONFIG_H -I.. -isystem ../include/bsd/ -include ../config.h -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT -g -O2 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -c funopen.c -fPIC -DPIC -o .libs/funopen.o
funopen.c:141:2: error: "Function funopen() needs to be ported."
#error "Function funopen() needs to be ported."
^
1 error generated.
make[1]: *** [Makefile:632: funopen.lo] Error 1
make[1]: Leaving directory '/usr/tmp/libbsd-20180322-
@bukzor
bukzor / build.log
Created February 11, 2018 22:40
Build Elm from source, with GHC 8.2
$ runhaskell installers/BuildFromSource.hs 0.18
Using GHC 8.2
Using Cabal 2.0.0.1
fatal: destination path 'elm-compiler' already exists and is not an empty directory.
fatal: destination path 'elm-package' already exists and is not an empty directory.
fatal: destination path 'elm-make' already exists and is not an empty directory.
fatal: destination path 'elm-reactor' already exists and is not an empty directory.
fatal: destination path 'elm-repl' already exists and is not an empty directory.
Downloading the latest package list from hackage.haskell.org
@bukzor
bukzor / README.md
Last active December 19, 2017 22:05
Profiling for hypothesis#914

These SVG's represent profiling runs of the example shown in hypothesis#914 with hypothesis' new use_coverage feature turned off and on, respectively. The "nocov" case ran in 0.058s while "yescov" ran in 0.262 seconds, a more than 5x slowdown. In my own work, I have a non-trivial test that slows down from 13s to >50s, a ~4x slowdown, and it follows the same profile seen below, but with many more calls to lstat().

You can see (you'll want to right-click and "open image in new tab") that the largest contributor to the difference between the scenarios is the lstat() call. This is called by coverage.Collector.save_data() where it normalizes the paths of all files involved in the coverage trace. save_data() is called by hypothesis between each example in order to pull the coverage data out of the collector object.

@bukzor
bukzor / -
Created April 18, 2017 01:19 — forked from anonymous/-
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from datetime import datetime
from datetime import timedelta
import pytz
import tzlocal