Skip to content

Instantly share code, notes, and snippets.

@atodev
atodev / cmds
Last active June 14, 2025 17:34
Docker
docker pull python:3-slim-bullseye
-- downloads it and runs it
docker run -it python:3-slim-bullseye
--- exit
exit()
-- to run again
docker run -it python:3-slim-bullseye
-- latest system
docker run -it node
@atodev
atodev / start&auth
Created April 2, 2025 01:37
[Gemini]
from google import genai
from google.genai import types
from IPython.display import HTML, Markdown, display
from dotenv import load_dotenv
import os
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
client = genai.Client(api_key=GOOGLE_API_KEY)
@atodev
atodev / one_liners
Last active December 16, 2024 21:08
[kaggle]
--to check catagorical and numerical cols
numerical_cols, categorical_cols = split_numerical_categorical(df_train)
--finding all the non-unique items in catagorical cols
for c in categorical_cols:
print(c, "n unique:",df_all[c].nunique())
-- Colab to Kaggle
!mkdir ~/.kaggle
!cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json
@atodev
atodev / Ollama
Created July 26, 2024 01:47
Ollama
stop ollama
osascript -e 'tell app "Ollama" to quit'
-- start ollama
ollama ps
@atodev
atodev / REACT
Created November 7, 2023 03:28
REACT
https://www.youtube.com/watch?v=xoh_L3KPpks
@atodev
atodev / 3d Graph
Last active November 7, 2023 03:27
3D Graph
https://www.youtube.com/watch?v=uszt88Z-0Fc
paraview
https://www.youtube.com/watch?v=BsK_WwoSKDM&t=1s
good
https://www.idtools.com.au/3d-network-graphs-with-python-and-the-mplot3d-toolkit/
https://networkx.org/documentation/stable/auto_examples/3d_drawing/plot_basic.html
AR
https://openreview.net/pdf?id=VtYxuiX_UQ
https://www.nature.com/articles/s41467-021-22570-w
https://github.com/topics/graph-theory?l=html&o=desc&s=forks
@atodev
atodev / base file
Last active July 11, 2023 00:00
[HTML]
<!DOCTYPE html>>
<html lang="eng">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatable" content="IE=edge">
<meta name="'viewport" content = "width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
Hi!
@atodev
atodev / pyenv
Last active June 9, 2025 22:49
[VENV]
# Install pyenv if you don't have it
brew install pyenv
# Install Python 3.11
pyenv install 3.11.9
# Set local Python version for this project
pyenv local 3.11.9
# Create a new virtual environment
# To activate this environment, use
#
# $ conda activate py10
#
# To deactivate an active environment, use
#
# $ conda deactivate
conda activate py3.9
https://www.kaggle.com/code/ryannolan1/kaggle-housing-youtube-video
plt.scatter(x='MSSubClass', y='SalePrice', data=train_df)
plt.scatter(x='LotFrontage', y='SalePrice', data=train_df)
train_df.query('LotFrontage > 300')
stats.zscore(train_df['LotArea']).sort_values().tail(10)
train_df.query('OverallCond == 5 & SalePrice > 700000')
#1183
values = [598, 955, 935, 1299, 250, 314, 336, 707, 379, 1183, 692, 186, 441, 186, 524, 739, 598, 955, 636, 1062, 1191, 496, 198, 1338]
train_df = train_df[train_df.Id.isin(values) == False]