Skip to content

Instantly share code, notes, and snippets.

View robmarkcole's full-sized avatar
💭
Busy pythonizing

Robin Cole robmarkcole

💭
Busy pythonizing
View GitHub Profile
@calebrob6
calebrob6 / torchgeo_object_detection_example.ipynb
Created October 13, 2023 04:10
Short example of object detection training in TorchGeo.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / s2gif.ipynb
Created July 29, 2023 18:42
Make a GIF of Sentinel 2 scenes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MarcSkovMadsen
MarcSkovMadsen / hvplot_interactive.py
Last active January 3, 2023 20:12
Example of using hvPlot .interactive with Panel
import pandas as pd
import hvplot.pandas
import panel as pn
pn.extension(sizing_mode="stretch_width")
PALETTE = [
"#ff6f69",
"#ffcc5c",
"#88d8b0",
@ashleve
ashleve / kfold_example.py
Last active April 24, 2024 10:54
Example of k-fold cross validation with PyTorch Lightning Datamodule
from pytorch_lightning import LightningDataModule
from torch_geometric.datasets import TUDataset
from torch_geometric.data import DataLoader
from sklearn.model_selection import KFold
class ProteinsKFoldDataModule(LightningDataModule):
def __init__(
self,
data_dir: str = "data/",
@abelcallejo
abelcallejo / README.md
Last active March 25, 2024 11:35
Installing GDAL 3.2.1 on Amazon Linux 2

Installing GDAL 3.2.1 on Amazon Linux 2

gdal linux yum

As of this day, this is probably the only and fastest way of installing it.

Package requirements

Based from the GDAL and PROJ build requirements, here is the full list of required packages to install:

@tvst
tvst / SessionState.py
Last active April 14, 2024 20:24
DO NOT USE!!! Try st.session_state instead.
"""Hack to add per-session state to Streamlit.
Usage
-----
>>> import SessionState
>>>
>>> session_state = SessionState.get(user_name='', favorite_color='black')
>>> session_state.user_name
''
@hunterjm
hunterjm / tensorflow_setup.sh
Last active July 20, 2020 17:11
TensorFlow Object Detection Setup (Linux)
# Change this path to your config directory
CONFIG_DIR="/home/homeassistant/.homeassistant"
cd /tmp
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/tensorflow/models.git tensorflow-models
# download protobuf 3.4
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
from flask import Flask
from flask_restful import Api, Resource, reqparse
app = Flask(__name__)
api = Api(app)
users = [
{
"name": "Nicholas",
"age": 42,
version: '3.1'
services:
unifi:
container_name: unifi
restart: unless-stopped
image: linuxserver/unifi
volumes:
- /srv/docker/unifi:/config
environment:
- PGID=0