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 marimo | |
__generated_with = "0.10.7" | |
app = marimo.App(width="medium") | |
@app.cell | |
def _(div, mo, result, run_button, style1, style2, style3, style_editors): | |
if run_button.value: | |
result[0] = div.render(style1.value, style2.value, style3.value) |
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
# video: https://github.com/user-attachments/assets/7e364faf-ddac-4acc-b5e6-83e61c9ed2de | |
import marimo | |
__generated_with = "0.9.20" | |
app = marimo.App(width="medium") | |
@app.cell | |
def __(): |
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 pathlib import Path | |
import json | |
import os | |
import psutil | |
kernel_pids = [p.pid for p in psutil.process_iter(['pid', 'name']) if 'python' in p.info['name']] | |
rows = [] | |
for pid in kernel_pids: | |
process = psutil.Process(pid) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Animated Ball-and-Stick Triangle</title> | |
<style> | |
.triangle-container { | |
position: relative; | |
width: 200px; |
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
# ls aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# app aliases | |
alias edit='gnome-text-editor' | |
# history aliases | |
alias h='history' |
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
#!/bin/bash | |
# this script will install a single package into a virtual environment using poetry, | |
# check the size of the installed dependencies, and clean up. | |
# | |
# usage: | |
# ./poetry_package_sizer.sh "notebook pandas polars altair bokeh matplotlib panel plotly streamlit fastapi flask django rdkit torch" | |
# Poetry version: 1.5.1 | |
# Python version (change to yours) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
#canvasContainer { | |
display: inline-block; | |
position: relative; | |
background-color: #f7f7f7; | |
padding: 5px; | |
text-align: center; |
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
''.join([chr(i) for i in [70, 85, 67, 75, 32, 89, 69, 65, 72, 33]]) |
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 functools import reduce | |
import numpy as np | |
import pandas as pd | |
class Counts: | |
"""COUNT ... GROUP BY on every column of a large dataset""" | |
def __init__(self, file, ddl_file, n_cols=None, n_top=10): | |
self.file = file | |
self.columns = get_columns_from_ddl(ddl_file) |
NewerOlder