Example::

        this_is_very_good
328453
def format_unix_var(text):
    
    text = text.strip()
    if len(text) == 0:  # if empty string, return it
        raise ValueError("can not be empty string!")
    else:
        if text[0] in string.digits:
            raise ValueError("variable can not start with digits!")
        text = text.lower()
        # delete redundant empty space
        words = list()
        word = list()
        for char in text:
            if char in ALPHA_DIGITS:
                word.append(char)
            else:
                if len(word):
                    words.append("".join(word))
                    word = list()
        if len(word):
            words.append("".join(word))

        return "_".join(words)
625743
def acceptable(value, capitalize=False):
    """"""
    name = regexes['punctuation'].sub("", regexes['joins'].sub("_", value))
    # Clean up irregularities in underscores.
    name = regexes['repeated_underscore'].sub("_", name.strip('_'))
    if capitalize:
        # We don't use python's built in capitalize method here because it
        # turns all upper chars into lower chars if not at the start of
        # the string and we only want to change the first character.
        name_parts = []
        for word in name.split('_'):
            name_parts.append(word[0].upper())
            if len(word) > 1:
                name_parts.append(word[1:])
        name = ''.join(name_parts)
    return name
1302022
def like(likeable)
    	if !self.disliked?(likeable) and @@likeable_model_names.include? likeable.class.to_s.downcase
    		likeable.likers << self
    		self.save
    	else 
    		false
    	end
    end
668428
def valid(*things):
	''''''
	for thing in things:
		if type(thing) is str and not os.path.exists(thing):
			return False
		if thing.valid is None:
			return False
	return True
831001
public function Nice()
    {
        // return "<span title=\"$this->value\">$" . number_format($this->value, 2) . '</span>';
        $val = $this->config()->currency_symbol . number_format(abs($this->value), 2);
        if ($this->value < 0) {
            return "($val)";
        }

        return $val;
    }
370483
def awesome_object(o)
      vars = instance_variables_opal(o).map do |var|
        property = var.to_s[1..-1].to_sym # to_s because of some monkey patching done by Puppet.
        accessor = if o.respond_to?(:"#{property}=")
                     o.respond_to?(property) ? :accessor : :writer
                   else
                     o.respond_to?(property) ? :reader : nil
                   end
        if accessor
          [ "attr_#{accessor} :#{property}", var ]
        else
          [ var.to_s, var ]
        end
      end

      data = vars.sort.map do |declaration, var|
        key = left_aligned do
          align(declaration, declaration.size)
        end

        unless @options[:plain]
          if key =~ /(@\w+)/
            key = key.sub($1, colorize($1, :variable))
          else
            key = key.sub(/(attr_\w+)\s(\:\w+)/, "#{colorize('\\1', :keyword)} #{colorize('\\2', :method)}")
          end
        end
        indented do
          key + colorize(" = ", :hash) + @inspector.awesome(o.instance_variable_get(var))
        end
      end
      if @options[:multiline]
        "#<#{awesome_instance(o)}\n#{data.join(%Q/,\n/)}\n#{outdent}>"
      else
        "#<#{awesome_instance(o)} #{data.join(', ')}>"
      end
    end
1323077
function hasExample ({ optional, example, details } = {}) {
  if (optional || example !== undefined) {
    return true;
  }

  if (details !== undefined) {
    const values = Object.keys(details).map((key) => details[key]);

    return values.every(hasExample);
  }

  return false;
}
1364937
def valid(condition=true)
      all.select {|d| condition == valid?(d) }.map {|d| model.class.new(d)}
    end
707525
@Override
  protected boolean isGoodTarget(DatanodeDescriptor node,
                                 long blockSize,
                                 int maxPerRack,
                                 boolean considerLoad,
                                 List<DatanodeDescriptor> results) {
    if (badRacks.contains(node.getNetworkLocation()) ||
        badHosts.contains(node.getName())) {
      return false;
    }
    return super.isGoodTarget(
      node, blockSize, maxPerRack, considerLoad, results);
  }
779279
def worth(what, level_name):
    """"""
    return (logging.NOTSET
            < globals()[what].level
            <= getattr(logging, level_name))
685960
public long acceptGood() {
        Lock readerLock = context.ctxLock.readLock();
        readerLock.lock();
        try {
            return SSLContext.sessionAcceptGood(context.ctx);
        } finally {
            readerLock.unlock();
        }
    }
1043803
def good_listize(real_addresses)
      good_listed = clean_addresses(real_addresses, :good_list)
      good_listed = clean_addresses(good_listed, :bad_list) unless good_listed.empty?
      good_listed
    end
293649
private function mwhile()
	{
		$this->__cached = preg_replace($this->usingDirective('while', true), '<?php while ($1) : ?>', $this->__cached);
		$this->__cached = preg_replace($this->usingDirective('endwhile'), '<?php endwhile ;?>', $this->__cached);
	}
1045560
def acts_as_noteworthy(options={})
      class_inheritable_accessor :options
      self.options = options

      unless included_modules.include? InstanceMethods
        instance_eval do
          has_many :mentions, :as => :owner, :order => 'date desc'

          with_options :as => :owner, :class_name => "Mention" do |c|
            c.has_many :google_news_mentions, :conditions => {:search_source => "Google News"}, :order => 'date desc'
            c.has_many :google_blog_mentions, :conditions => {:search_source => "Google Blogs"}, :order => 'date desc'
#            c.has_many :technorati_mentions, :conditions => {:search_source => "Technorati"}, :order => 'date desc'
            c.has_many :bing_mentions, :conditions => {:search_source => "Bing"}, :order => 'date desc'
          end
        end

        extend ClassMethods
        include InstanceMethods
      end
    end
1148048
@Override
    public StreamT<W,T> takeWhile(final Predicate<? super T> p) {

        return (StreamT<W,T>) FoldableTransformerSeq.super.takeWhile(p);
    }
857768
def valid(cls, data, context=None):
        """"""
        return cls(cls.TagType.VALID, data, context)
7315
public void finest(String message, Object... args) {
      log(Level.FINEST, message, args);
   }