Skip to content

Instantly share code, notes, and snippets.

Brandon Fish bjfish

Block or report user

Report or block bjfish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Scrape.py
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
View Macro.groovy
{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"));
View xml-rpc-example.groovy
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
View 187c364beba62d244b66.rb
# >---------------------------[ Install Command ]-----------------------------<
# rails new APP_NAME -m http://railswizard.org/187c364beba62d244b66.rb -J -O -T
# >---------------------------------------------------------------------------<
#
# _____ _ _ __ ___ _
# | __ \ (_) | \ \ / (_) | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_|
@bjfish
bjfish / vagrant_zipline
Created Jan 31, 2013
A very rough list of shell commands to setup a vagrant box with zipline dependencies using enthought
View vagrant_zipline
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 Feb 7, 2013
Rough tutorial on how to run on picloud ...
View zipline_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 Oct 8, 2013
Example Grails Travis build matrix
View example_grails_travis_build_matrix.yml
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 Mar 5, 2015
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
View run_each.rb
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 Mar 5, 2015
Just run each directory in core with a 90 second timeout
View run_each_dir.rb
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
You can’t perform that action at this time.