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 | |
def common?(strings, substring) | |
strings.each do |s| | |
return false if !s.include? substring | |
end | |
true | |
end | |
def possible_sequences(anchor, sequenceLength) |
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
# https://www.reddit.com/r/dailyprogrammer/comments/2jt4cx/10202014_challenge_185_easy_generated_twitter/ | |
import re | |
p = re.compile('^at') | |
modified = [] | |
f = open('enable1.txt', 'r') |
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
# Taken from the cucumber-rails project. | |
require 'uri' | |
require 'cgi' | |
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) | |
module WithinHelpers | |
def with_scope(locator) | |
locator ? within(locator) { yield } : yield | |
end |
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
!function(){var b,c,d,e,f,g,a={version:1,apiEndpoint:"https://api.trello.com",authEndpoint:"https://trello.com"},h=[].slice;g=function(a,b,g){var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;for(n=g.key,s=g.token,j=g.apiEndpoint,k=g.authEndpoint,t=g.version,m=""+j+"/"+t+"/",p=a.location,i={clearReady:function(){e={}},version:function(){return t},key:function(){return n},setKey:function(a){n=a},token:function(){return s},setToken:function(a){s=a},rest:function(){var a,c,d,e;return c=arguments[0],a=2<=arguments.length?h.call(arguments,1):[],e=q(a),d=e[0],a=e[1],g={url:""+m+d,type:c,data:{},dataType:"json",success:e[2],error:e[3]},b.support.cors||(g.dataType="jsonp","GET"!==c&&(g.type="GET",b.extend(g.data,{_method:c}))),n&&(g.data.key=n),s&&(g.data.token=s),null!=a&&b.extend(g.data,a),b.ajax(g)},authorized:function(){return null!=s},deauthorize:function(){s=null,u("token",s)},authorize:function(c){var d,e,h,i,j;if(g=b.extend(!0,{type:"redirect",persist:!0,interactive:!0,scope:{read:!0,write:!1,account:!1},expiration:"30da |
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
// http://tour.golang.org/ | |
/* | |
Slide 24: Loops and Functions | |
*/ | |
package main | |
import ( | |
"fmt" | |
"math" |
NewerOlder