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
# Hyrax 3.0 Upgrade Notes | |
``` | |
$ devstack down -v | |
$ devstack up -d arch | |
$ bundle exec rake arch:seed ADMIN_USER=bmq449 ADMIN_EMAIL=brendan-quinn@northwestern.edu SEED_FILE=seed.yml | |
``` | |
- Update Gemfile | |
``` | |
gem 'hyrax', '~> 3.0.0.beta.rc2` |
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
jq -r '[.modules[] | (.path|join(".")) as $path | .resources | to_entries[] | { "key": ($path + "." + .key), "value": .value.primary.id }] | from_entries' |
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
defmodule MyApp.Data.Schemas.Foo do | |
use Ecto.Schema | |
import Ecto.Changeset | |
import MyApp.Data.Schemas.PrepareEmbed | |
alias MyApp.Data.Schemas.EmbeddedMap | |
schema "foo" do | |
embeds_one :embedded_map, EmbeddedMap, on_replace: :update |
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 | |
require 'csv' | |
require 'maxminddb' | |
db = MaxMindDB.new('./GeoLite2-City.mmdb') | |
CSV.open('results.csv', 'w') do |output| | |
output << ['IP', 'City', 'Subdivision', 'Country', 'Latitude', 'Longitude'] | |
File.new('ips.txt','r').each_line do |line| | |
line.chomp! |
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 python3 | |
import pathlib | |
import sys | |
from textgenrnn import textgenrnn | |
stem = sys.argv[1] | |
count = 100 if len(sys.argv) < 3 else int(sys.argv[2]) | |
temp = [1.0, 0.5, 0.2, 0.2] if len(sys.argv) < 4 else float(sys.argv[3]) |
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 python3 | |
import pathlib | |
import sys | |
from textgenrnn import textgenrnn | |
stem = sys.argv[1] | |
count = int(sys.argv[2]) | |
hdfile = f"{stem}.hdf5" | |
path = pathlib.Path(hdfile) |
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 'csv' | |
CSV.open('big_inventory_sheet.csv', 'w') do |csv| | |
csv << %w(work_accession_number accession_number filename description) | |
(1..50).each do |work| | |
(1..100).each do |file| | |
filename = (0..9).to_a.sample == 0 ? 'missing.tif' : 'present.tif' | |
csv << ["Test_%3.3d" % work, "Test_%3.3d_%4.4d" % [work, file], filename, "File %d for Work %d" % [file, work]] | |
end | |
end |
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 | |
###################################################### | |
# | |
# This script will take the normal credo exit code | |
# (see https://github.com/rrrene/credo#exit-status) | |
# and add 64 if any high-severity (non-strict) | |
# issues are found and 128 if any low-severity | |
# (strict) issues are found | |
# |
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 'aws-sdk-ecs' | |
require 'aws-sdk-sqs' | |
require 'json' | |
def handle_event(event:, context:) | |
handler = LambdaHandler.new(event, context) | |
handler.process! | |
end | |
class LambdaHandler |
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
<!-- events/show.html.erb --> | |
<%= form_tag(event_medfiles_release_many_path, method: 'POST') do %> | |
<%= hidden_field_tag 'id', @event.id %> | |
<% @event.medfiles.each do |medfile| %> | |
<%= render(partial: 'medfiles/release_form', object: medfile, as: 'medfile') %> | |
<% end %> | |
<%= submit_tag 'Do The Thing' %> | |
<%= end %> |