Skip to content

Instantly share code, notes, and snippets.

View erikdubbelboer's full-sized avatar

Erik Dubbelboer erikdubbelboer

View GitHub Profile
@fchollet
fchollet / classifier_from_little_data_script_3.py
Last active September 13, 2023 03:34
Fine-tuning a Keras model. 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
@jimparis
jimparis / punch.py
Created October 16, 2012 20:53 — forked from NicolasT/punch.py
Using FALLOC_FL_PUNCH_HOLE from Python to punch holes in files
#!/usr/bin/python
import ctypes
import ctypes.util
c_off_t = ctypes.c_int64
def make_fallocate():
libc_name = ctypes.util.find_library('c')
libc = ctypes.CDLL(libc_name)