Skip to content

Instantly share code, notes, and snippets.

View robinsonkwame's full-sized avatar

Kwame Porter Robinson robinsonkwame

View GitHub Profile
@nonamenix
nonamenix / hug_swagger.py
Last active April 5, 2019 19:37
Swagger specification for hug. Ugly draft.
import inspect
import collections
from collections import OrderedDict
import hug
import logging
from apispec import APISpec
from apispec.ext.marshmallow.swagger import field2parameter
from copy import copy
@brentp
brentp / betareg.py
Last active September 17, 2024 14:48
beta regression in statsmodels
# -*- coding: utf-8 -*-
u"""
Beta regression for modeling rates and proportions.
References
----------
Grün, Bettina, Ioannis Kosmidis, and Achim Zeileis. Extended beta regression
in R: Shaken, stirred, mixed, and partitioned. No. 2011-22. Working Papers in
Economics and Statistics, 2011.
@AJamesPhillips
AJamesPhillips / gist:04f3047ca8770f4a3a58
Created May 2, 2014 15:18
Integration testing Scrapy spiders
import subprocess
import unittest
from scrapy.crawler import Crawler
from scrapy.utils.project import get_project_settings
from twisted.internet import reactor, task
from my_project.spiders.spider1 import Spider1
from my_project.spiders.spider2 import Spider2