Skip to content

Instantly share code, notes, and snippets.

@jackparmer
jackparmer / duluth_plotly_theme.json
Created January 26, 2018 01:07
duluth_plotly_theme.json
{
"name": "Duluth",
"reference": {
"marker.color":
["rgb(0,116,217)",
"rgb(255,65,54)",
"rgb(133,20,75)",
"rgb(255,133,27)",
"rgb(255,220,0)",
"rgb(61,153,112)"],
@alexellis
alexellis / k8s-pi.md
Last active September 24, 2024 14:36
K8s on Raspbian
@jaibeee
jaibeee / brew-perms.sh
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@carlobaldassi
carlobaldassi / PartSort.jl
Last active August 29, 2015 14:18
partial select
module PartSort
using Base.Order
import Base: sort!, Sort.Algorithm
export PartialQuickSort
immutable PartialQuickSort <: Algorithm
k::Int
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cuibonobo
cuibonobo / kivent_install.md
Created September 18, 2014 02:00
Installing KivEnt on Mac OS X.

Tested on Mac OS X 10.8.5 and 10.9.3.

Not for the faint of heart. Before we begin, you will need to install XQuartz, Homebrew, and virtualenv.

I'm using virtualenv to isolate your global system settings from the KivEnt installation because it's still under heavy development and it's very messy. We'll also be using the virtual environment folder to install Kivy, Cymunk, and KivEnt without needing to add them to your repository or your .gitignore file.

Now follow these steps carefully and you should be up and running:

  • Gain access to homebrew-headonly with brew tap homebrew/headonly. You may want to do a brew update for good measure.
  • SMPEG was moved to homebrew-headonly, so install it with brew install --HEAD smpeg
import numpy as np
from numba import jit
def root_func(x):
return x**4 - 2*x**2 - x - 3
def compile_specialized_bisect(f):
"""
Returns a compiled bisection implementation for ``f``.
"""
require 'formula'
class RDownloadStrategy < SubversionDownloadStrategy
def stage
quiet_safe_system 'cp', '-r', @clone, Dir.pwd
Dir.chdir cache_filename
end
end
class R < Formula
@juliaferraioli
juliaferraioli / Julia-on-GCE-2
Created January 23, 2014 08:38
Import data from Google Cloud Storage, save locally, produce png, and save to Google Cloud Storage.
Pkg.add("Gadfly")
Pkg.add("HTTPClient")
Pkg.add("JSON")
Pkg.add("RDatasets")
using Gadfly
using HTTPClient.HTTPC
using JSON
using RDatasets