Skip to content

Instantly share code, notes, and snippets.

View westonplatter's full-sized avatar

westonplatter

View GitHub Profile
@westonplatter
westonplatter / entropy_pooling.py
Created August 24, 2022 18:57 — forked from choffstein/entropy_pooling.py
Attilio Meucci's Entropy Pooling
import numpy
import scipy.optimize
import pandas
def probability_constraint(x):
j, n = x.shape
Aeq = numpy.ones([1, j])
beq = numpy.array([1.])
@westonplatter
westonplatter / aggregate-artifacts.yaml
Last active August 21, 2020 18:03 — forked from foobarbecue/aggregate-artifacts.yaml
An example of using parameters to loop through artifact paths
apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-controller-configmap
namespace: default
data:
artifactRepository: |
archiveLogs: true
s3:
repoName: MyArtifactRepo
@westonplatter
westonplatter / cities.json
Created April 25, 2020 03:47 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@westonplatter
westonplatter / osx_bootstrap.sh
Created June 12, 2017 21:17 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
<!doctype html>
<title>Gatecoin | Maintenance</title>
<head>
<meta charset="utf-8">
<link href='https://gatecoin.com/public/css/googleFonts.css' rel='stylesheet' type='text/css'>
<link rel="icon" href="https://gatecoin.com/public/img/favicon.ico" type="image/png"/>
<!--ramen-->
<link rel="dns-prefetch" href="https://cdn.ramen.is">
</head>
@westonplatter
westonplatter / echoHttpRequest.js
Last active August 29, 2015 14:21 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
@westonplatter
westonplatter / example.go
Last active August 29, 2015 14:09 — forked from kavu/example.go
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int
StartApp(void) {
[NSAutoreleasePool new];
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
namespace :deploy do
before :updated, :setup_solr_data_dir do
on roles(:app) do
unless test "[ -d #{shared_path}/solr/data ]"
execute :mkdir, "-p #{shared_path}/solr/data"
end
end
end
end
namespace :deploy do
before :updated, :setup_solr_data_dir do
on roles(:app) do
unless test "[ -d #{shared_path}/solr/data ]"
execute :mkdir, "-p #{shared_path}/solr/data"
end
end
end
end