Skip to content

Instantly share code, notes, and snippets.

View squarelover's full-sized avatar

Sean Wolfe squarelover

View GitHub Profile
@c-bata
c-bata / release-sphinx-to-gcs.yml
Last active September 19, 2021 02:22
Github Actions Workflow to build your sphinx documentation and upload it to Google Cloud Storage.
name: release
on:
push:
branches:
- master
jobs:
release:
name: Build
runs-on: ubuntu-latest
@datagrok
datagrok / gist:2199506
Last active August 22, 2024 14:21
Virtualenv's `bin/activate` is Doing It Wrong
@scottsbaldwin
scottsbaldwin / linearregression.rb
Created February 3, 2012 23:14
Ruby Linear Regression Calculator
# Adapted from a C# example here:
# http://stackoverflow.com/questions/43224/how-do-i-calculate-a-trendline-for-a-graph
# And thanks to John Esser for helping figure out how to
# calculate the targets to stabilize a negative slope!
class LinearRegression
attr_accessor :slope, :intercept
# Pass in an array of values to get the regression on
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
# 16 workers and 1 master
worker_processes (rails_env == 'production' ? 16 : 4)
# Load rails+github.git into the master before forking workers
# for super-fast worker spawn times
preload_app true