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 | |
# encoding: utf-8 | |
# frozen_string_literal: true | |
require 'pry' | |
require 'json' | |
require 'rest-client' | |
WIKIDATA_SPARQL_URL = 'https://query.wikidata.org/sparql' |
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
#=== Real life examples === | |
graph = RDF::Graph.new | |
# read from file | |
graph = RDF::Graph.load("http://datagraph.org/jhacker/foaf.nt") | |
# -or- from the web | |
graph = RDF::Graph.load("http://dbpedia.org/resource/Elvis_Presley") | |
graph << RDF::RDFa::Reader.open("http://www.bestbuy.com/shop/ipad+xoom+-windows") | |
graph.each_predicate { |s| puts s.inspect } |
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
current directory: F:/windows/tools/ruby/Ruby31-x64/lib/ruby/gems/3.1.0/gems/numo-gsl-0.1.2/ext/numo/gsl/cdf | |
F:/windows/tools/ruby/Ruby31-x64/bin/ruby.exe -I F:/windows/tools/ruby/Ruby31-x64/lib/ruby/3.1.0 -r ./siteconf20220111-61612-q22xzx.rb extconf.rb | |
which: no gsl-config in (/f/windows/tools/ruby/Ruby31-x64/bin:/ucrt64/bin:/usr/bin:/_U1_:/f/windows/tools/ruby/Ruby31-x64/bin:/_U2_:/f/windows/scoop/apps/miniconda3/current/condabin:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/Python27:/c/Python27/Scripts:/c/app/client/dsisnero/product/12.2.0/client_1/bin:/c/oracle/product/12.2.0/client_1/bin:/c/Ruby26-x64/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/HID Global/ActivClient:/c/Program Files/HID Global/ActivClient:/c/Program Files/Tumbleweed/Desktop Validator:/c/Program Files/Tumbleweed/Desktop Validator/x86:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL S |
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
{ | |
"version": "1.9.1.0", | |
"description": "Puppet Development Kit", | |
"homepage": "https://puppet.com/open-source/pdk", | |
"license": "Apache-2.0", | |
"architecture": { | |
"64bit": { | |
"url": "https://downloads.puppetlabs.com/windows/puppet6/pdk-1.9.1.0-x64.msi", | |
} | |
}, |
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
require 'kramdown' | |
require 'redcarpet' | |
require 'toml' | |
require 'yaml' | |
# | |
# pool | |
# | |
class WorkerPool |
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
class Broadcaster | |
attr_reader :ractor | |
def initialize | |
@ractor = new_ractor | |
end | |
def new_ractor | |
Ractor.new { Ractor.recv rescue nil } | |
end | |
def broadcast(message) | |
next_ractor = new_ractor |
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
require 'openssl' | |
require 'base64' | |
# calibrate numbers to get 1s or 10s in solo | |
N = 48 | |
DATA_SIZE = 600_000 | |
workers_N = 2 | |
# prepare static data set | |
DATA_ARR = N.times.map do |n| |
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
current directory: F:/windows/scoop/persist/ruby/gems/gems/nokogumbo-2.0.4/ext/nokogumbo | |
F:/windows/scoop/apps/ruby/2.7.2-1/bin/ruby.exe -I F:/windows/scoop/apps/ruby/2.7.2-1/lib/ruby/2.7.0 -r ./siteconf20201130-7788-1c890fl.rb extconf.rb | |
checking for libxml/tree.h in /home/flavorjones/code/oss/nokogiri/ports/x86_64-w64-mingw32/libxml2/2.9.10/include/libxml2... no | |
Downloading libxml2-2.9.10.tar.gz ( 0%) | |
Downloading libxml2-2.9.10.tar.gz ( 0%) | |
Downloading libxml2-2.9.10.tar.gz ( 0%) | |
Downloading libxml2-2.9.10.tar.gz ( 0%) | |
Downloading libxml2-2.9.10.tar.gz ( 0%) | |
Downloading libxml2-2.9.10.tar.gz ( 1%) |
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
let spotifyCredentials | |
let widget = await createWidget() | |
Script.setWidget(widget) | |
Script.complete() | |
async function createWidget() { | |
let widget = new ListWidget() | |
let spotifyIcon = await getImage("spotify-icon.png") | |
widget.backgroundColor = new Color("1e2040") |
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
current directory: F:/windows/scoop/persist/ruby/gems/gems/nokogumbo-2.0.2/ext/nokogumbo | |
F:/windows/scoop/apps/ruby/2.7.2-1/bin/ruby.exe -I F:/windows/scoop/apps/ruby/2.7.2-1/lib/ruby/2.7.0 -r ./siteconf20201007-24400-a64xgc.rb extconf.rb | |
checking for xmlNewDoc() in -lxml2... yes | |
checking for nokogiri.h in F:/windows/scoop/persist/ruby/gems/gems/nokogiri-1.10.10/ext/nokogiri... yes | |
creating Makefile | |
current directory: F:/windows/scoop/persist/ruby/gems/gems/nokogumbo-2.0.2/ext/nokogumbo | |
make "DESTDIR=" clean | |
current directory: F:/windows/scoop/persist/ruby/gems/gems/nokogumbo-2.0.2/ext/nokogumbo |