Skip to content

Instantly share code, notes, and snippets.

@Dr-ZeeD
Dr-ZeeD / scrapy_script.py
Created October 23, 2016 22:11
Scrapy one-file script with custom logging and click.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import click
from twisted.internet import reactor
from scrapy import Item, Spider
from scrapy.crawler import CrawlerRunner
from scrapy.settings import Settings
from scrapy.utils.log import configure_logging
@Dr-ZeeD
Dr-ZeeD / read_inventories.py
Created October 21, 2016 11:57
Read Python Intersphinx inventories.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import warnings
import click
from sphinx.ext.intersphinx import fetch_inventory
_inventory_uris = {
@Dr-ZeeD
Dr-ZeeD / HDF5_create_file.c
Created February 2, 2016 21:03
How to create an empty HDF5 file using the C API.
// This file demonstrates how to create an empty HDF5 file using the C API.
// If you happen to have HDF5 installed using MacPorts you can compile the
// exmaple using
//
// gcc -I/opt/local/include HDF5_create_file.c -L/opt/local/lib -lhdf5 -o HDF5_create_file
//
// 2016, Dominik Steinberger
#include "hdf5.h"
int main() {