I hereby claim:
- I am linuxiscool on github.
- I am ygg_odin (https://keybase.io/ygg_odin) on keybase.
- I have a public key ASAyiq1D9Xh1wB3cC9OrzdrA2p0GoPnx6sgqFA2kaYCLlwo
To claim this, I am signing this object:
"""CONVENTIONS: | |
positions are done row-column from the bottom left and are both numbers. This corresponds to the alpha-number system in traditional chess while being computationally useful. they are specified as tuples | |
""" | |
import itertools | |
WHITE = "white" | |
BLACK = "black" | |
from holoviews import Element, Store | |
from bokeh.models import Column | |
from holoviews.plotting.bokeh import ElementPlot | |
class BokehFigure(Element): | |
"""Wraps bokeh figure""" | |
class BokehFigurePlot(ElementPlot): | |
def initialize_plot(self, ranges=None, plot=None, plots=None, source=None): |
""" | |
In jupyter notebook simple logging to console | |
""" | |
import logging | |
import sys | |
logging.basicConfig(stream=sys.stdout, level=logging.INFO) | |
# Test | |
logger = logging.getLogger('LOGGER_NAME') |
# pip install pandas hvplot==0.7.1 holoviews==1.14.3 bokeh panel==0.11.3 | |
# panel serve holoviz_linked_brushing.py --auto --show | |
import hvplot.pandas | |
import holoviews as hv | |
import panel as pn | |
from bokeh.sampledata.iris import flowers | |
pn.extension(sizing_mode="stretch_width") | |
hv.extension("bokeh") |
I hereby claim:
To claim this, I am signing this object:
It's true packages exist to make it "easy" to use Django inside of a jupyter notebook. I seem to always run into issues successfully running these packages. I've found the below method useful although I cannot recall how I discovered how this works (aka attribution needed).
virtualenv
, venv
, pipenv
, etc)cfehome
)f4eamogj2e
I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env
files.
When attempting to run source .env
in a project, I usually encounter this problem:
.env (line 2): Unsupported use of '='. In fish, please use 'set KEY value'.
from sourcing file .env
source: Error while reading file '.env'
""" | |
Run this in a Jupyter Cell | |
""" | |
import param as pm | |
import pandas as pd | |
import numpy as np | |
import hvplot.pandas | |
class A(pm.Parameterized): |
import param as pm | |
import panel as pn | |
pn.extension() | |
class Protocol(pm.Parameterized): | |
display_level = pm.Integer(default=1, bounds=(0, 2), step=1, precedence=2) | |
target_apy = pm.Number(0.15, bounds=(0,1), precedence=1) | |
total_curve_pool_tvl = pm.Number(1e7, bounds=(0,None), precedence=0) | |
def __init__(self): |