This file contains hidden or 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
    
  
  
    
  | def process_file(name, f): | |
| res = [] | |
| i = 0 | |
| for line in f: | |
| add_emails(name, line, res) | |
| add_emails2(name, line, res) | |
| add_phone_numbers(name, line, res) | |
| return res | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # ruby set_heroku_config.rb | bash | |
| vars = [] | |
| File.open('prod.config').each do |line| | |
| key, val = line.chomp.split('=') | |
| next unless val | |
| vars << "#{key.sub(/export /, '')}=#{val.gsub(/'/, '')}" | |
| end | 
  
    
      This file contains hidden or 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
    
  
  
    
  | ;(use 'clojure.contrib.trace) | |
| (defn boundaries | |
| ([ranges] (boundaries ranges [])) | |
| ([ranges acc] | |
| (if (empty? ranges) | |
| (sort-by #(first %) acc) | |
| (let [f (first ranges)] | |
| (boundaries (rest ranges) (conj acc [(first f) :min] [(last f) :max])))))) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /* *** Javascript Library */ | |
| /* | |
| ---------- base.js ----------- | |
| */ | |
| var pageHasLoaded = false; | |
| var $break = new Object(); | |
| var $continue = new Object(); | |
| var $browser; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | $(function() { | |
| $('[placeholder]').focus(function() { | |
| var input = $(this); | |
| if (input.val() == input.attr('placeholder')) { | |
| input.val(''); | |
| input.removeClass('placeholder'); | |
| } | |
| }).blur(function() { | |
| var input = $(this); | 
  
    
      This file contains hidden or 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
    
  
  
    
  | def find_overlaps(ranges: List[Range]): List[(Range)] = { | |
| val bounds = for (range <- ranges; t <- List((range.head, 'min), (range.last, 'max))) yield t | |
| var counter = 0 | |
| var prevMin = 0 | |
| var ret: Array[Range] = Array[Range]() | |
| for ( | |
| tup <- bounds.sortWith((e1: Tuple2[Int, Symbol], e2: Tuple2[Int, Symbol]) => e1._1 < e2._1)) { | |
| (tup._1, tup._2, counter) match { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import re | |
| import sys | |
| import time | |
| from time import gmtime, strftime | |
| company_re = re.compile("Company: ([^<]+)") | |
| number_of_units_re = re.compile("Number of Units:\s*(\d+)") | |
| # Date: Sun, 15 Mar 2009 21 : 50 :56 -0400 | |
| date_re = re.compile(r'Date: [A-Z][a-z]{2}, (\d{1,2}) ([A-Z][a-z]{2}) (\d\d\d\d) (\d\d)\:(\d\d)\:\d\d \-\d{4}') | 
NewerOlder