Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I like turtles!

Jannis Hermanns jayniz

💭
I like turtles!
View GitHub Profile
View jogger_8.rb
gem "pacer-jogger", :require => "jogger"
View jogger_5.rb
class Jogger
module NamedTraversals
# Traverse to somebody's woman friends
def self.friends(current_traversal, gender)
t = current_traversal.in(:friends)
t = t.filter(gender: gender)
end
# Group and sort
View jogger_4.rb
t = Jogger.new(my_pacer_vertex)
t.friends(:female)
t.top_list(:movies)
View jogger_3.rb
Jogger.new(my_pacer_node).in(:friends).filter().out(:likes).group_count{}
View jogger_2.rb
t = Jogger.new(my_pacer_vertex)
t.in(:friends)
t.filter(gender: 'female')
t.out(:likes)
t.filter(type: 'Movie')
t.sort_by{ |v, c| -c }
t.group_count{ |v| v }
View jogger_1.rb
t = my_pacer_vertex.in(:friends)
t = t.filter(gender: 'female')
t = t.out(:likes)
t = t.filter(type: 'Movie')
t = t.sort_by{ |v, c| -c }
t = t.group_count{ |v| v }
View gist:1275143
futex(0x2506654, FUTEX_WAIT_PRIVATE, 59255, NULL) = 0
futex(0x2506628, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x1e0c954, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x1e0c950, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x1e0c928, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1e05854, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x1e05850, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x2506654, FUTEX_WAIT_PRIVATE, 59257, NULL) = 0
futex(0x2506628, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x1e0c954, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x1e0c950, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x1e0c928, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1e05854, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x1e05850, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
View gist:959210
Date/Time: 2011-05-06 17:49:29 +0200
OS Version: 10.6.7 (Build 10J869)
Architecture: x86_64
Report Version: 7
Command: Tomahawk
Path: /Applications/Tomahawk.app/Contents/MacOS/Tomahawk
Version: 0.0.3 (0.0.3.0)
Parent: launchd [160]