Skip to content

Instantly share code, notes, and snippets.

View maasha's full-sized avatar
💭
HackHackHack...

Martin Asser Hansen maasha

💭
HackHackHack...
View GitHub Profile
maasha@maxwell:~/data$ unzip qiime_tutorial-v1.5.0.zip
Archive: qiime_tutorial-v1.5.0.zip
creating: qiime_tutorial-v1.5.0/
creating: qiime_tutorial-v1.5.0/18S_tutorial_files/
inflating: qiime_tutorial-v1.5.0/18S_tutorial_files/18S_tutorial_sample_seqs.fna
inflating: qiime_tutorial-v1.5.0/Fasting_Example.fna
inflating: qiime_tutorial-v1.5.0/Fasting_Example.qual
inflating: qiime_tutorial-v1.5.0/Fasting_Example.sff
inflating: qiime_tutorial-v1.5.0/Fasting_Example.sff.txt
inflating: qiime_tutorial-v1.5.0/Fasting_Map.txt
maasha@maxwell:~/data/qiime_tutorial-v1.5.0$ print_qiime_config.py -t
System information
==================
Platform: linux2
Python version: 2.7.3 (default, Jan 28 2013, 09:50:08) [GCC 4.4.5]
Python executable: /disk/orsted/install/maasha/QIIME1.6/bin/python
Dependency versions
===================
@maasha
maasha / gist:5151814
Last active December 14, 2015 21:29 — forked from anonymous/gist:5151700
#!/usr/bin/env perl
use warnings;
use strict;
use Data::Dumper;
# Lea Benedicte Skov Hansen, Mar 2013
# This program reads a table, sums the rows and create a histogram of the sums
#!/usr/bin/perl -w
use strict;
# Lea Benedicte Skov Hansen, Mar 2013
# This program reads a table, sums the rows and create a histogram of the sums
my $input = 'test_count.txt'; #'count.matrix.ratio_new';
my $output = 'row_sum_his.txt';
my $interval = 5;
my %names = ();
while (defined (my $line = <START>)) {
chomp $line;
$names{$line};
}
#!/usr/bin/perl -w
use strict;
# Filenames
my $start10 = 'start10.dat';
my $res10 = 'res10.dat';
# Opening the files
open (START, '<', $start10) or die "Could not read file\n";
rake routes
user_scaffolds GET /users/:user_id/scaffolds(.:format) scaffolds#index
POST /users/:user_id/scaffolds(.:format) scaffolds#create
new_user_scaffold GET /users/:user_id/scaffolds/new(.:format) scaffolds#new
edit_user_scaffold GET /users/:user_id/scaffolds/:id/edit(.:format) scaffolds#edit
user_scaffold GET /users/:user_id/scaffolds/:id(.:format) scaffolds#show
PUT /users/:user_id/scaffolds/:id(.:format) scaffolds#update
DELETE /users/:user_id/scaffolds/:id(.:format) scaffolds#destroy
users GET /users(.:format) users#index
POST /users(.:format) users#create
@maasha
maasha / gist:5319035
Last active December 15, 2015 20:29
1) Scaffold pages index pagination Failure/Error: let(:user) { FactoryGirl.create(:user) } ActiveRecord::RecordInvalid: Validation failed: Email has already been taken # ./spec/requests/scaffold_pages_spec.rb:7:in `block (3 levels) in <top (required)>' # ./spec/requests/scaffold_pages_spec.rb:10:in `block (3 levels) in <top (required)>'
require 'spec_helper'
describe "Scaffold pages" do
subject { page }
describe "index" do
let(:user) { FactoryGirl.create(:user) }
before do
sign_in user
FactoryGirl.define do
factory :user do
sequence(:name) { |n| "Person #{n}" }
sequence(:email) { |n| "person_#{n}@example.com"}
password "foobar"
password_confirmation "foobar"
factory :admin do
admin true
end
@maasha
maasha / gist:5335260
Created April 8, 2013 08:47
1) Scaffold pages index pagination Failure/Error: it { should have_selector('div.pagination') } # FIXME expected css "div.pagination" to return something # ./spec/requests/scaffold_pages_spec.rb:27:in `block (4 levels) in <top (required)>'
require 'spec_helper'
describe "Scaffold pages" do
subject { page }
describe "index" do
let(:user) { FactoryGirl.create(:user) }
before do
sign_in user