similar to: Optimizing grep, sort, uniq for speed

Displaying 20 results from an estimated 6000 matches similar to: "Optimizing grep, sort, uniq for speed"

2011 Jul 20
2
Variable assigned to grep output - missing letter n!
This is kind of odd. [scarolan at host:~]$ cat loremipsum.txt Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis ipsum sed elit laoreet malesuada. Quisque rhoncus dui vitae eros euismod fermentum sollicitudin sem scelerisque. Nulla facilisi. Maecenas mollis pulvinar euismod. Duis viverra pharetra turpis eget feugiat. Nulla facilisi. Nullam facilisis, felis vitae lacinia
2007 Nov 21
2
uniq -c
Is there an R analog of the Unix command uniq -c: http://en.wikipedia.org/wiki/Uniq Given an array x, uniq -c replaces each contiguous subsequence of identical numbers with a tuple (count, number). E.g. $ cat > usample 10 10 9 8 8 7 7 7 6 3 1 1 1 0 $ uniq -c usample 2 10 1 9 2 8 3 7 1 6 1 3 3 1 1 0 Cheers, Alexy
2006 Mar 28
5
Anyone use .uniq! ???
could anyone by chance give me a working example of the .uniq! method? i''ve been trying all day. any help would be much appreciated! jon -- Posted via http://www.ruby-forum.com/.
2009 Nov 12
0
Problem with has_many :through, :uniq => true with polymorph
Didn''t have quite enough space to describe it there...basically i''m having a problem with the :uniq option in my tags. I''m using acts_as_taggable_on_steroid which adds these associations to my Resource class: Resource has_many :taggings, :as => :taggable, :dependent => :destroy, :include => :tag has_many :tags, :through => :taggings, :uniq => true
2006 Feb 07
1
habtm :uniq causing duplicate inserts? How to update Rails?
Hello *Gem* experts, Sorry for asking multiple questions in one post but they are both related to one problem. So far I have the following code: class Member < ActiveRecord::Base has_and_belongs_to_many :blogs, :uniq=>true ..... end class Blog < ActiveRecord::Base has_and_belongs_to_many :members, :uniq=>true ... end The issue is that
2007 Oct 18
0
Getting the through items from a has_many :through :uniq relationship
Getting the through items from a has_many :through :uniq relationship In a nutshell, I have been using the has_many :through :uniq relationship, and I want a DRY way to list the join model objects. Currently, my objects include taxon objects, toxin objects, data_object objects, and taxon_toxin_citation objects ("citation" is another word for data_object). A taxon has many data objects,
2006 Apr 11
0
habtm and :uniq
Hi I wonder what the state of this ticket is: http://dev.rubyonrails.org/ticket/2019 Does anyone have information regarding whether there are plans to fix this behaviour? It seems strange to me to force uniqueness in Ruby (i.e. application code) but not in the database. For example, in activerecord/lib/active_record/associations/ has_and_belongs_to_many_association.rb there is a line
2007 Dec 11
2
Patch 10463: has_many through using uniq does not honor order
Hi, I''ve just submitted a patch for ActiveRecord; http://dev.rubyonrails.org/ticket/10463 The patch includes new fixtures because I could not find a applicable combination among the existing fixtures. I hope that''s okee. Please +1 or comment it. Thanks, Remco --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2009 Aug 19
1
expire plugin: columns not uniq
Hello list, My dovecot setup have expire plugin enabled. It is working fine: new records added to database(sqlite), expire-tool successfully expunges old mail, but when expire-tool try to update database record for processed user, I get error in logs: root at mail dovecot 0:0 # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test Info: koshikov.n at domain.com/Spam:
2009 May 04
6
Best mobile SSH client?
I'm up for a cell phone contract renewal and am considering upgrading my handset. I looked at some devices at my local AT&T store but nothing really jumped out at me. I'm particularly interested in a cell phone that has a reliable ssh client, with ssh-agent and public key authentication abilities. Those of you who administer systems remotely, what mobile ssh client do you recommend?
2009 Jun 03
4
Good md5sum snapshot tool?
I have a server that is undergoing some patching soon and would like to make note of any files that have changed after the patching is complete. Can you recommend a tool that uses md5sum snapshots to do a quick before and after test, showing anything that's changed on a particular file system?
2011 Mar 07
5
/etc/hosts - hostname alias for 127.0.0.1
Can anyone point out reasons why it might be a bad idea to put this sort of line in your /etc/hosts file, eg, pointing the FQDN at the loopback address? 127.0.0.1 hostname.domain.com hostname localhost localhost.localdomain
2006 Dec 05
4
has_many with :uniq not working for me
Hi all, I have a relationship (no really!) class RiskMatrix < ActiveRecord::Base has_many :severities, :order => :position, :uniq => true end class RiskFactor < ActiveRecord::Base belongs_to :risk_matrix validates_presence_of :descriptor, :example validates_uniqueness_of :descriptor, :example, :scope=> :risk_matrix_id end class Severity < RiskFactor
2008 Mar 13
3
Good version control package?
We have a directory full of installation and configuration scripts that are updated on a fairly regular basis. I would like to implement some sort of version control for these files. I have used SVN and CVS in the past, but I thought I'd ask if anyone can recommend a simple, easy-to-use tool that would be better than cvs or subversion for this fairly simple setup.
2010 Aug 31
4
e2fsck with millions of files
I have a large (1.5TB) partition with millions of files on it. e2fsck has been running nearly 12 hours and is still on "Checking directory structure". Any tips for speeding this along? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100831/8653d551/attachment-0002.html>
2010 Mar 04
4
Permissions problem
What am I doing wrong here? I need to be able to write to /var/cvs. This used to work before I moved these groups into an LDAP directory instead of /etc/group: [scarolan at watcher:/var/cvs]$ touch test.txt touch: cannot touch `test.txt': Permission denied [scarolan at watcher:/var/cvs]$ ls -ld drwxrwsr-x 4 cvs cvsgrp 4096 May 18 2008 . [scarolan at watcher:/var/cvs]$ id scarolan
2009 Jul 20
3
Limit RAM used by a perl script
I have a perl script which runs from a cron job. How would you limit the amount of RAM that this script is allowed to consume? Is there a ulimit setting that will accomplish this? If so does ulimit have to be run each time the script is run, or is there a way to set it permanently?
2009 Nov 17
3
gem install rails - errors MAC OSX (snow leopard)
This produced quite a mouthful of text. I''m stuck on the error messages and wondering if I messed something up. Any advice would be very appreciated. Thank you. dust:~ Lex$ gem install rails WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren''t both writable. WARNING: You don''t have /Users/Lex/.gem/ruby/1.8/bin in your PATH, gem executables
2006 Mar 08
3
Multiple logistic regression
Dear R-users, Is there a function in R that classifies data in more than 2 groups using logistic regression/classification? I want to compare the c-indices of earlier research (lrm, binary response variables) with new c-indices obtained from 'multiple' (more response variables) logistic regression. Best regards, Stephanie Delalieux Department Biosystems M?-BIORES Group of Geomatics
2006 Sep 25
5
HTTP Parser (Regal)
Hi I was interested to see how Mongrel uses Lex/Yacc to parse the HTTP requests using a Regal generated parser. I downloaded the source but do not see the lex and yacc files...