This file contains hidden or 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
| include Makefile.venv | |
| Makefile.venv: | |
| curl \ | |
| -o Makefile.fetched \ | |
| -L "https://github.com/sio/Makefile.venv/raw/v2020.05.07/Makefile.venv" | |
| echo "ab60a72bb9215935db6d3d8cd0f8dfe8cd48e8cca0235227ecc476f1cff46e51 *Makefile.fetched" \ | |
| | sha256sum --check - \ | |
| && mv Makefile.fetched Makefile.venv |
This file contains hidden or 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
| name: datalab-dev | |
| channels: | |
| - conda-forge | |
| - defaults | |
| dependencies: | |
| - jinja2=2.11.2=pyh9f0ad1d_0 | |
| - jupyter_client=6.1.3=py_0 | |
| - jupyter_core=4.6.3=py37hc8dfbb8_1 | |
| - jupyterlab=1.2.6=py_0 | |
| - jupyterlab_server=1.0.7=py_0 |
This file contains hidden or 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
| # | |
| # act: activates a pyenv-managed virtualenv based on args, pwd, or fzf choice | |
| # | |
| act() { | |
| local env="$1" | |
| if [[ "$#" -ne "0" ]]; then | |
| pyenv activate "$1" | |
| return 0 |
This file contains hidden or 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
| # @description clones git repository (including submodules) and changes working | |
| # directory to it. If `directory` not specified, uses $PROJECTS. | |
| # and if that's not set, fallsback to current directory. | |
| # | |
| # @example gclone git@github.com:loganlinn/blog.git | |
| # @example gclone loganlinn/blog | |
| function gclone { | |
| emulate -L zsh | |
| if [[ "$#" -eq 0 ]]; then |
This file contains hidden or 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 logging | |
| import click | |
| class ColorFormatter(logging.Formatter): | |
| colors = { | |
| "error": dict(fg="red"), | |
| "exception": dict(fg="red"), | |
| "critical": dict(fg="red"), |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Usage: log_warning [<message> ...] | |
| # | |
| # Logs a warning message. Acts like echo, | |
| # but wraps output in the standard direnv log format | |
| # (controlled by $DIRENV_LOG_FORMAT), and directs it | |
| # to stderr rather than stdout. | |
| # | |
| # Example: |
This file contains hidden or 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
| diff --git a/src/results_notebooks/optimizely/api.py b/src/results_notebooks/optimizely/api.py | |
| index 2eb2fa2..6132c4c 100644 | |
| --- a/src/results_notebooks/optimizely/api.py | |
| +++ b/src/results_notebooks/optimizely/api.py | |
| @@ -13,7 +13,7 @@ See Also | |
| import datetime | |
| import os | |
| import re | |
| -from typing import ClassVar, Generic, List, Optional, Type, TypeVar | |
| +from typing import ClassVar, Dict, Generic, List, Type, TypeVar |
This file contains hidden or 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 itertools | |
| from typing import Iterable | |
| import dask | |
| import dask.core | |
| import dask.multiprocessing | |
| import dask.optimization | |
| class LazyGraph: |
This file contains hidden or 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
| defmodule TicTacToe do | |
| defmodule Board do | |
| def create(maxX \\ 3, maxY \\ 3) do | |
| for x <- 0..(maxX - 1), | |
| y <- 0..(maxY - 1) do | |
| {{x, y}, nil} | |
| end | |
| |> Map.new() | |
| |> Map.put_new(:maxY, maxY) | |
| |> Map.put_new(:maxX, maxX) |
This file contains hidden or 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 kotlin.properties.ReadWriteProperty | |
| import kotlin.reflect.KProperty | |
| fun <V> map(props: Props, key: String): ReadWriteProperty<Any?, V> { | |
| return object : ReadWriteProperty<Any?, V> { | |
| @Suppress("UNCHECKED_CAST") | |
| override fun getValue(thisRef: Any?, property: KProperty<*>): V = props[key]!! as V | |
| override fun setValue(thisRef: Any?, property: KProperty<*>, value: V) { | |
| props[key] = value |