Skip to content

Instantly share code, notes, and snippets.

@giswqs
giswqs / sam2_aral_sea.ipynb
Last active September 19, 2024 16:07
Aral Sea
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elejke
elejke / install-conda.sh
Last active April 12, 2025 07:20 — forked from arose13/install-conda.sh
Install Miniforge (Minimal conda installation) in Ubuntu arm64 / aarch64
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniforge and make it the main Python interpreter
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh -O ~/miniforge.sh
bash ~/miniforge.sh -b -p ~/miniforge
rm ~/miniforge.sh
echo "PATH=$PATH:$HOME/miniforge/bin" >> .bashrc
@mindy850302
mindy850302 / aws-s3-list-objects.py
Last active February 22, 2023 16:38
AWS Simple-Storage-Service (S3) objects list and export to csv.
import boto3
import pandas
AWS_ACCESS_KEY_ID = 'YOUR_AWS_ACCESS_KEY_ID'
AWS_SECRET_ACCESS_KEY = 'YOUR_AWS_SECRET_ACCESS_KEY'
# connect to s3
s3 = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY_ID,
@veuncent
veuncent / aws_glacier_delete_vault.md
Last active June 5, 2025 07:49
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME 
@fchollet
fchollet / classifier_from_little_data_script_1.py
Last active February 26, 2025 01:37
Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@clhenrick
clhenrick / README.md
Last active March 3, 2025 23:02
PostgreSQL & PostGIS cheatsheet (a work in progress)
@bsweger
bsweger / useful_pandas_snippets.md
Last active May 28, 2025 23:07
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)