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
| select ?org ?label | |
| where | |
| { | |
| ?org rdf:type foaf:Organization . | |
| optional { ?org rdfs:label ?label } | |
| filter(!bound(?label)) | |
| } |
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
| select ?person ?authship ?publication | |
| where | |
| { | |
| ?person rdf:type foaf:Person . | |
| ?person core:authorInAuthorship ?authship . | |
| ?authship core:linkedInformationResource ?publication | |
| } | |
| limit 10 |
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
| select ?person ?authship ?publication | |
| where | |
| { | |
| ?person rdf:type foaf:Person . | |
| ?person core:authorInAuthorship ?authship . | |
| ?authip core:linkedInformationResource ?publication . | |
| ?publication rdf:type ?pub_type . | |
| optional { ?pub_type rdf:type core:Journal } | |
| filter(!bound(?publication)) |
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
| construct { | |
| ?pers_vivo_id core:authorInAuthorship ?authship . | |
| ?authship core:linkedInformationResource ?pub_vivo_id . | |
| ?pub_vivo_id | |
| bibo:pmid ?pub_pmid ; | |
| rdf:type ?pub_type ; | |
| rdfs:label ?pub_lbl ; | |
| core:Title ?pub_title ; | |
| bibo:volume ?pub_vol ; |
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
| select ?uri ?actual_label | |
| where | |
| { | |
| ?uri rdfs:label ?actual_label | |
| { | |
| select ?uri | |
| where | |
| { | |
| ?uri rdfs:label ?label | |
| } |
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
| require 'rubygems' | |
| require 'stomp' | |
| queue = "/queue/IdCard.Vivo" | |
| puts "Consumer for queue #{queue}" | |
| client = Stomp::Client.new "lib-vivo", "[redacted]", "bsd-dev-activemq.bsd.ufl.edu", 61618, true | |
| client.subscribe queue, { :ack => :client } do | message | | |
| puts "message=#{message.body}" | |
| 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
| redis = Redis.new(:host => redis_host, :port => redis_port) | |
| while(1) do | |
| first_url = redis.rpoplpush src_queue, src_queue | |
| redis.rpush work_queue, first_url | |
| while(1) do | |
| next_url = redis.rpoplpush src_queue, src_queue | |
| if next_url != first_url | |
| redis.rpush work_queue, next_url | |
| else | |
| break |
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
| redis = Redis.new(:host => redis_host, :port => redis_port) | |
| while(1) do | |
| url = redis.blpop(work_queue, 0)[1] | |
| is_up = server_check.check(url)[0] | |
| if is_up | |
| puts "#{url} is up." | |
| else | |
| puts "#{url} is down." | |
| end | |
| 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
| files = [ | |
| :a_file => "/path/to/a_file", | |
| :b_file => "/path/to/b_file", | |
| :c_file => "/path/to/c_file" | |
| ] | |
| desc "Process files" | |
| task :process_files do | |
| files.each |file_name, file_location| | |
| process_file(file_name, file_location) |
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
| files = [ | |
| :a_file => "/path/to/a_file", | |
| :b_file => "/path/to/b_file", | |
| :c_file => "/path/to/c_file" | |
| ] | |
| process_tasks = [] | |
| files.each |file_name, file_location| | |
| process_task = "process_#{file_name}".intern | |
| process_tasks << process_task | |
| desc "Process #{file_location}" |