Skip to content

Instantly share code, notes, and snippets.

from mechanize import Browser
from BeautifulSoup import BeautifulSoup
mech = Browser()
years = ['2009','2008']
teams = ['aag','cai','sbr','ial','fau','bal','way','hba','nbh','mbk','bry','sbb','mam','wbg','hac','naj','wai','sad','dau','abh','uvs','scc','dae','hbd','iao','aaj','mbn','wbj','sbe','tap','nam','map','flg','wal','kab','pal','sag','vac','cbm','xaa','dah','tbq','scf','tas','hay','mbq','cao','sbh','wao','lan','oai','gad','tba','fak','kae','saj','rae','bab','scy','pao','tac','vaf','cbp','yaa','sci','nfl','dak','aap','bau','tav','laq','mav','bae','nas','nba','mbd','gag','iae','jab','fan','hal','cab','nac','maf','rah','eaa','par','sam','laa','pab','vai','may','ncb','aas','cau','gaj','cbc','nbd','mbg','lat','nav','jae','eat','sbn','hao','nds','uaf','tai','rak','faa','ead','pau','sap','lad','aac','cbv','lbu','aav','nay','cax','sas','aaf','wax','cah','iak','fat','sbq','oab','nai','mal','tal','pah','qae','sac','wah','dat','cbi','sbt','dad','mbm','ban','sav','ian','tao','nal','wbi','hae','oae','raa','kaa','sd
{groovy}
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
//For use with the confluence script plugin and zCALM Server
XmlRpcClient client = new XmlRpcClient();
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL("http://localhost:8090/ZXmlRpcServer/zXmlRpcServlet"));
import groovy.grape.Grape
import groovy.net.xmlrpc.*
// Gets dependencies
@Grab(group='org.codehaus.groovy', module='groovy-xmlrpc', version='0.7')
def getGrapes(){}
def c = new XMLRPCServerProxy("http://localhost:8090/ZXmlRpcServer/zXmlRpcServlet")
//Gets all hierarchy classes
# >---------------------------[ Install Command ]-----------------------------<
# rails new APP_NAME -m http://railswizard.org/187c364beba62d244b66.rb -J -O -T
# >---------------------------------------------------------------------------<
#
# _____ _ _ __ ___ _
# | __ \ (_) | \ \ / (_) | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_|
<a hreflang="en">
@bjfish
bjfish / vagrant_zipline
Created January 31, 2013 21:58
A very rough list of shell commands to setup a vagrant box with zipline dependencies using enthought
git clone git://github.com/quantopian/zipline.git
cd zipline
vagrant add lucid64 http://files.vagrantup.com/lucid64.box
vagrant init lucid64
# Add memory configuration to Vagrantfile
config.vm.customize ["modifyvm", :id, "--memory", 1024]
vagrant up
vagrant ssh
@bjfish
bjfish / zipline_picloud
Created February 7, 2013 01:01
Rough tutorial on how to run on picloud ...
# Follow pre-reqs to setup picloud
http://docs.picloud.com/prereqs.html
# Create a new environment using Python 2.7 - Ubuntu Precise 12.04
# Use the environment name below in _env
# Precise includes many required dependencies http://www.picloud.com/docs/base_environment/3/installed/
http://docs.picloud.com/environment.html#environment-create
@bjfish
bjfish / example_grails_travis_build_matrix.yml
Created October 8, 2013 21:29
Example Grails Travis build matrix
language: groovy
jdk:
- oraclejdk6
env:
- GRAILS_VERSION=2.2.4
- GRAILS_VERSION=2.2.3
- GRAILS_VERSION=2.2.2
- GRAILS_VERSION=2.2.1
@bjfish
bjfish / run_each.rb
Created March 5, 2015 14:35
run jt untag with 90 second timeout, then jt test if specs were untagged, if jt test fails checkout the changes to the tag file
require 'timeout'
files = Dir.glob("spec/ruby/core/*/*")
files.reject! { |f| File.directory?(f) }
num = 1
total = files.size
files.each_with_index do |file, index|
specname = file.split('/').last.split('_')[0..-2].join('_')
puts "specname #{specname}"
@bjfish
bjfish / run_each_dir.rb
Created March 5, 2015 14:43
Just run each directory in core with a 90 second timeout
require 'timeout'
files = Dir.glob("spec/ruby/core/*/")
files.map! {|x| x[0..-2] }
files.each do |file|
command = "ruby tool/jt.rb untag #{file}"
puts "starting process #{command}"
pid = Process.spawn(command)
begin