Skip to content

Instantly share code, notes, and snippets.

View timbmg's full-sized avatar
👨‍💻
just coding

Tim Baumgärtner timbmg

👨‍💻
just coding
View GitHub Profile
@timbmg
timbmg / pull_from_google_sheets_to_dataframe.py
Last active November 4, 2025 15:55
Pull data from Google Sheets and load it into a pandas DataFrame
import io
import requests
import pandas as pd
url = "https://docs.google.com/spreadsheets/d/<doc-id>/export?format=xlsx"
response = requests.get(url)
df = pd.read_excel(io.BytesIO(response.content), sheet_name="Sheet1")
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.7"
[tool.poetry.dev-dependencies]
@timbmg
timbmg / Functional Groups MNIST EMNIST.ipynb
Last active November 10, 2018 13:39
Functional Groups MNIST EMNIST.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@timbmg
timbmg / dynamic_minibatching_pytorch.py
Last active July 3, 2024 10:47
Dynamic padding of sequences in a mini-batch without pre-determined maximum sequence length
import random
import torch
import numpy as np
from torch.utils.data import Dataset, DataLoader
class DemoDataset(Dataset):
def __init__(self):
super().__init__()
def __getitem__(self, idx):