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
function rustr | |
if test (count $argv) -ne 1 | |
echo "Usage: rustr <filename>" | |
return 1 | |
end | |
set filename $argv[1] | |
set output_file (string replace -r '\.rs$' '' $filename) | |
# Create the build directory if it doesn't exist |
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
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt |
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 param as pm | |
import pandas as pd | |
def serialize_param(obj: pm.Parameterized, skip_dataframes=True, exclude_params=None): | |
""" | |
Recursively serialize a Parameterized object into a nested dictionary. | |
Parameters: | |
- obj: pm.Parameterized | |
The object to serialize. |
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 holoviews as hv | |
hv.extension('bokeh') | |
import pandas as pd | |
nodes = [ | |
{ | |
'name': 'A', | |
'x': 1, | |
'y': 0.5, |
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 | |
import holoviews as hv | |
import hvplot.pandas | |
hv.Points((1,1)).opts(size=10) * hv.Points((2,2)).opts(size=10) * pd.DataFrame([[1,1],[2,2]]).hvplot.line(x='0',y='1') |
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
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt |
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 streamz import Stream | |
def market_step(market_inputs): | |
return {'market_movement': market_inputs['market_movement']} | |
def write(x): | |
print(x) | |
def f(n=5): | |
source = Stream(asynchronous=True) # Configure the stream for asynchronous operation |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
import hvplot.pandas | |
df = pd.DataFrame({'x':range(10),'y':range(10), 'z':range(10)}) | |
df.hvplot.step(x='x').opts(legend_position='top_left') | |
df = pd.DataFrame({'x':range(10),'y':range(10),'z':range(10)}) | |
df.hvplot.line(x='x', legend='left') |
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 param as pm | |
import panel as pn | |
import hvplot.pandas | |
import pandas as pd | |
import numpy as np | |
pn.extension() | |
class ResettableParameterized(pm.Parameterized): | |
def _reset(self): | |
with pm.parameterized.batch_call_watchers(self): |
NewerOlder