pip install python-dotenv anthropic set ANTHROPIC_API_KEY your-api-key-here
from anthropic import Anthropic
from dotenv import load_dotenv
import os
# Load environment variables
load_dotenv()
pip install python-dotenv anthropic set ANTHROPIC_API_KEY your-api-key-here
from anthropic import Anthropic
from dotenv import load_dotenv
import os
# Load environment variables
load_dotenv()
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 |
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt |
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. |
import holoviews as hv | |
hv.extension('bokeh') | |
import pandas as pd | |
nodes = [ | |
{ | |
'name': 'A', | |
'x': 1, | |
'y': 0.5, |
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') |
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt |
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 |
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') |