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
dorwardv@Raistlin:~/projects/personal/python/is_anagram$ python anagram.py "A telephone girl" "Repeating 'Hello'" | |
array('i', [1, 0, 0, 0, 3, 0, 1, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0]) | |
array('i', [1, 0, 0, 0, 3, 0, 1, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0]) | |
True | |
dorwardv@Raistlin:~/projects/personal/python/is_anagram$ python anagram.py "The United States Bureau of Fisheries" "I Raise the Bass to Feed Us in the Future" | |
array('i', [2, 1, 0, 1, 6, 2, 0, 2, 3, 0, 0, 0, 0, 1, 1, 0, 0, 2, 4, 4, 3, 0, 0, 0, 0, 0]) | |
array('i', [2, 1, 0, 1, 6, 2, 0, 2, 3, 0, 0, 0, 0, 1, 1, 0, 0, 2, 4, 4, 3, 0, 0, 0, 0, 0]) | |
True | |
dorwardv@Raistlin:~/projects/personal/python/is_anagram$ python anagram.py "Just because some of us can read and write and do a little math, that doesn't mean we deserve to conquer the universe." "Just because some of us can read and write and do a little math, that doesn't mean we deserve to conquer the universe." | |
array('i', [9, 1, 3, 6, 16, 1, 0, 3, 3, 1, 0, 2, 3, 7, 6, 0, |
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
10 | |
a | |
b | |
c | |
aba | |
baa | |
aabaa | |
hellolleh | |
habibah | |
zzzz |
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
import sys | |
import itertools | |
import array | |
import math | |
from sets import Set | |
from operator import add | |
def combinations(str): | |
lst = list(str) | |
words=Set() |
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
module.exports = function(Session) { | |
Session.search = function(boardTypes,vehicleTypes,preferences, cb) { | |
var msg = "select * from session"; | |
Session.dataSource.connector.query(msg,function (err, sessions) { | |
if (err) { | |
console.error(err); | |
} else { | |
console.log(sessions); | |
} |