Skip to content

Instantly share code, notes, and snippets.

View massie's full-sized avatar

Matt Massie massie

  • UC Davis Medical Center
  • Sacramento, CA
  • 00:41 (UTC -08:00)
View GitHub Profile
@subtleGradient
subtleGradient / git-jira
Created December 17, 2010 00:16
Jira CLI with git config support! + stuff
#!/usr/bin/env bash
# Author: Thomas Aylott <[email protected]>
# Usage:|
# git-jira getIssue
# git-jira getComments
# Notes:|
# This expects you to use branch names like "thomas/HUE-123-Make-Things-Awesomer" or "tom-HUE-321-code-stuff"
BRANCH_NAME="$(git symbolic-ref HEAD|sed 's/refs\/heads\///')"
TICKET_ID="$(echo "$BRANCH_NAME"|sed -E 's/^.*[/-]([A-Z]+-[0-9]+).*$/\1/')"
@massie
massie / gist:3207745
Created July 30, 2012 15:21
CXF Test Case
import org.apache.cxf.feature.AbstractFeature;
import org.apache.cxf.feature.LoggingFeature;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
import org.junit.Test;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
@esammer
esammer / dist.xml
Last active August 29, 2015 14:00
How to set up a maven project for sane docbook generation.
<!--
~ Copyright (c) 2014 Scaling Data. All rights reserved. This gist is licensed under the Apache Software License v2.0.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>dist</id>
from sys import argv
from itertools import cycle
import numpy as np
np.random.seed(3)
import pandas as pd
from sklearn.model_selection import train_test_split, cross_validate,\
StratifiedKFold
from sklearn.utils import shuffle
from sklearn.decomposition import PCA