This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# READING DIRECT MESSAGES | |
use 5.010 ; | |
use strict ; | |
use Carp ; | |
use Data::Dumper ; | |
use Getopt::Long ; | |
use IO::Interactive qw{ interactive } ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Rock Paper Scissors | |
class WrongNumberOfPlayersError < StandardError ; end | |
class NoSuchStrategyError < StandardError ; end | |
def rps_tournament_winner ( tourney ) | |
# if tourney[0][0] is a string, that means that's a match | |
# if not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class FooBar | |
include Enumerable | |
@array_out = Array.new | |
def initialize( array1 , array2 ) | |
if array1 != [] and array2 != [] | |
for i in array1 | |
for j in array2 | |
k = [i,j].join("|") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class FooBar | |
include Enumerable | |
def initialize( array1 , array2 ) | |
@array_out = Array.new | |
if array1 != [] and array2 != [] | |
for i in array1 | |
for j in array2 | |
k = [i,j].join("|") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is app/views/movies/index.html.haml | |
%h1 All Movies | |
%table#movies | |
%thead | |
%tr | |
%th{ :class => @title_class }= link_to "Movie Title" , '/movies?sort=title' , :id => "title_header" | |
%th Rating | |
%th{ :class => @rel_date_class }= link_to "Release Date" , '/movies?sort=release_date' , :id => "release_date_header" | |
%th More Info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R file template in Template-Toolkit | |
w_avg <- c( [% weight_average %] ) | |
date <- c( [% dates %] ) | |
w_count <- c( [% measurement_count %] ) | |
weight <- c( [% weight %] ) | |
png( | |
filename="data.png" , | |
width = 600 , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my .perltidyrc config file | |
# http://perldoc.perl.org/perlstyle.html | |
--backup-and-modify-in-place | |
#--cuddled-else | |
--continuation-indentation=4 | |
--indent-columns=4 | |
#--maximum-line-length=78 | |
#--line-up-parentheses | |
--opening-brace-always-on-right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict ; | |
use warnings ; | |
use 5.010 ; | |
use subs qw( rename_mp3s rename_mp3 ) ; | |
use File::Copy ; | |
use MP3::Tag ; | |
print qq{RENAMING\n} ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R file template in Template-Toolkit | |
library( Cairo ) | |
w_avg <- c( 270.0000,268.5000,268.0000,268.0000,268.0000,267.6667,267.5714,267.5000,267.1111,267.4000,267.5455,267.5000,267.3846,267.3571,267.4667,267.1250,266.8824,266.7778,266.6316,266.3684,266.2632,266.1053,265.7895,265.7000,265.5000,265.5000,265.4000,265.2381,265.1000,264.7000,264.4000,264.2000,264.0500,263.8500,263.6000,263.6190,263.6190,263.5238,263.3333,263.2857,263.2500,263.2000,263.1000,262.8500,262.6000,262.2105,262.2632,262.1667,262.1111,262.0556,262.0556,261.9444,261.6471,261.3529,261.2353,261.0000,260.8889,260.5000,260.2778,260.2778,260.2941,260.1667,260.0556,259.8333,259.7368,259.5000,259.3500,259.1500,258.8500,258.5714,258.5455,258.4545,258.4783,258.4783,258.4091,258.4091,258.3636,258.4091,258.3182,258.2083,258.1250,258.1667,258.2308,258.1538,258.0769,257.9615,257.8800,257.7500,257.7391,257.6667,257.5833,257.4167,257.2174,257.2174,257.0870,257.0000,256.7391,256.6087,256.5238,256.3636,255.9524,255.6818,255.2609,255.0833,254.9583,254.84 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package StepOne ; | |
# PCR_Export tools to create configuration files | |
# for the StepOne qPCR machine | |
use 5.010 ; | |
use strict ; | |
use warnings ; | |
use Carp ; | |
use Cwd qw{ getcwd abs_path } ; |
OlderNewer