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
#cloud-config | |
# In order to access RStudio server via the web interface, you must log on with | |
# a user account that allows password access. This script does not add that user | |
# by default. You may either ssh as root into the server and `adduser` as | |
# normal, or script a user addition here: | |
# users: | |
# - name: # username # | |
# lock-passwd: false # allow login with password |
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
#!/bin/bash | |
# Download GitKraken | |
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz | |
# copy the downloaded file into /opt directory | |
cp gitkraken-amd64.tar.gz /opt/gitkraken | |
cd /opt |
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
SELECT | |
* | |
FROM | |
sierra_view.order_record AS o | |
JOIN | |
sierra_view.order_record_paid AS orp | |
ON | |
o.id = orp.order_record_id |
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
root@ruby-rails-1gb-nyc3-01:/home/search_app# rake solr:marc:index_test_data | |
rake aborted! | |
Errno::ECONNREFUSED: Connection refused - Connection refused - connect(2) for "127.0.0.1" port 8983 (127.0.0.1:8983) | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:623:in `rescue in create_socket' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:607:in `create_socket' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:755:in `block in connect' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:748:in `connect' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:511:in `query' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:177:in `query' | |
/usr/local/rvm/gems/ruby-2.4.0/gems/httpclient-2.8.3/lib/httpclient.rb:1242:in `do_get_block' |
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
root@ruby-rails-1gb-nyc3-01:/home/search_app# bundle exec solr_wrapper | |
Starting Solr 7.0.0 on port 8983 ... solr-7.0.0.zip: |===========================================================================| 100% (Time: 00:00:02 ) | |
solr-7.0.0.zip.md5: |=======================================================================| 100% (Time: 00:00:00 ) | |
/usr/local/rvm/gems/ruby-2.4.0/gems/solr_wrapper-1.1.0/lib/solr_wrapper/instance.rb:322:in `exec': Failed to execute solr start: WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting. (RuntimeError) | |
Please consult the Reference Guide. To override this check, start with argument '-force' | |
. Further information may be available in /tmp/solr-7.0.0/logs | |
from /usr/local/rvm/gems/ruby-2.4.0/gems/solr_wrapper-1.1.0/lib/solr_wrapper/instance.rb:75:in `start' | |
from /usr/local/rvm/gems/ruby-2.4.0/gems/solr_wrapper-1.1.0/lib/solr_wrapper/ |
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
marvin@ubuntu-1gb-nyc3-01:~/projects/search_app$ rake solr:marc:index_test_data | |
2017-10-18T13:32:17+00:00 INFO Traject::SolrJsonWriter writing to 'http://127.0.0.1:8983/solr/blacklight-core/update' in batches of 100 with 1 bg threads | |
2017-10-18T13:32:17+00:00 INFO Indexer with 1 processing threads, reader: Traject::MarcReader and writer: Traject::SolrJsonWriter | |
2017-10-18T13:32:17+00:00 ERROR Error in Solr batch add. Will retry documents individually at performance penalty: Solr response: 404: <html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>Erro |
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
from configparser import ConfigParser | |
from base64 import b64encode | |
import requests | |
import json | |
import re | |
# get the api paramaters from the configuration file | |
# config file looks like this: | |
# [api] | |
# base_url = https://sierra-test.library.org/iii/sierra-api/v5 |
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
SELECT | |
* | |
FROM | |
sierra_view.phrase_entry AS p | |
WHERE | |
p.index_entry IN --how can we do IN but also do fuzzy matching? | |
('9780870233227%', | |
'9781781884652%' --plus 10,000 ISBNs | |
) |
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
pth= '../json/' | |
#failed attempt to split out base filename: base = os.path.splitext(filename)[0] | |
merge = os.path.join(pth, Path(filename).stem) | |
with open(merge, 'w') as f: | |
json.dump(words, f, ensure_ascii=False) | |
f.close() | |
jsn = merge+'.json' | |
os.rename(merge, jsn) |
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
SELECT | |
-- | |
c.p00||c.p01||c.p02||c.p03||c.p04||c.p05||c.p06||c.p07||c.p08||c.p09||c.p10||c.p11||c.p12||c.p13||c.p14||c.p15||c.p16||c.p17||c.p18||c.p19||c.p20||c.p21||c.p22||c.p23||c.p24||c.p25||c.p26||c.p27||c.p28||c.p29||c.p30||c.p31||c.p32||c.p33||c.p34||c.p35||c.p36||c.p37||c.p38||c.p39||c.p40||c.p41||c.p42||c.p43 | |
--merging control_field table into an 008 field | |
FROM | |
sierra_view.control_field AS c | |
limit 100; |
OlderNewer