Skip to content

Instantly share code, notes, and snippets.

View atodev's full-sized avatar

Tom atodev

View GitHub Profile
@atodev
atodev / Repair
Created February 12, 2026 04:53
USB
Open Command Prompt as an administrator.
Open Diskpart: Type diskpart and press Enter.
List all disks: Type list disk and press Enter. Carefully identify your USB drive by its size to avoid selecting the wrong disk (e.g., your main hard drive).
Select your disk: Type select disk X (replace X with the disk number of your USB drive) and press Enter.
Clean the drive: Type clean and press Enter. This command removes all partition data from the drive.
Create a new partition: Type create partition primary and press Enter.
Format the partition: Type format fs=ntfs quick (or format fs=fat32 quick for smaller or older drives) and press Enter. This performs a quick format with the specified file system.
Assign a drive letter: Type assign and press Enter to automatically assign an available drive letter, or type assign letter=Z (replace Z with your desired letter).
Exit Diskpart: Type exit and press Enter. Your USB drive should now be accessible and working.
@atodev
atodev / setup
Last active February 5, 2026 02:09
shadcn-ui
npx create-next-app@latest ninja-recipe
cd ninja-recipe
npx shadcn@latest init
------------------
npx create-next-app@latest interview-edge --typescript --tailwind --eslint
npx shadcn-ui@latest init
@atodev
atodev / dotenv
Last active November 6, 2025 22:39
dotenv
from dotenv import load_dotenv
import os
load_dotenv()
API_KEY = os.getenv("API_KEY")
SECRET_KEY = os.getenv("SECRET_KEY")
client = Client(API_KEY, SECRET_KEY)
@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!