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 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
#One workaround is to create clone environment, and then remove original one: | |
#(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux) | |
conda create --name new_name --clone old_name --offline #use --offline flag to disable the redownload of all your packages | |
conda remove --name old_name --all # or its alias: `conda env remove --name old_name` | |
#There are several drawbacks of this method: | |
# time consumed on copying environment's files, | |
# temporary double disk usage. |
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 streamlit as st | |
import base64 | |
import textwrap | |
def render_svg(svg): | |
"""Renders the given svg string.""" | |
b64 = base64.b64encode(svg.encode('utf-8')).decode("utf-8") | |
html = r'<img src="data:image/svg+xml;base64,%s"/>' % b64 | |
st.write(html, unsafe_allow_html=True) |
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 pyvista as pv | |
import numpy as np | |
make_gif = True | |
# increase n_points for a higher resolution | |
n_points = 100 | |
xmin, xmax = -1.2, 1.2 | |
bounds = 1.25 * np.array([xmin, xmax, xmin, xmax, 0., 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
--- | |
title: "Muertes por comuna, mes y año en Chile 2000-2020" | |
output: html_notebook | |
--- | |
```{r} | |
library(tidyverse) | |
``` | |
# Cargar datos |
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 nest_asyncio | |
nest_asyncio.apply() |
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 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 os | |
import openai | |
from rich.console import Console | |
console = Console() | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
history = [{"role": "system", "content": "You are a helpful assistant."},] |
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 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 python3 | |
import openai | |
import time | |
import matplotlib.pyplot as plt | |
def pick_numbers(n, model, temperature, clean_session): | |
numbers = [] | |
messages = [] | |
system_msg = "Please only respond with the number, don't say anything else." | |
messages.append({"role": "system", "content": system_msg}) |
OlderNewer