- hoge
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
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
module Types | |
class BaseConnection < GraphQL::Types::Relay::BaseConnection | |
field :total_count, Int, null: false | |
def total_count | |
object.nodes.size | |
end | |
end | |
class BaseObject < GraphQL::Schema::Object | |
connection_type_class Types::BaseConnection |
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
{ | |
"Cluster": "arn:aws:ecs:ap-northeast-1:111111111111:cluster/fargate-test", | |
"TaskARN": "arn:aws:ecs:ap-northeast-1:111111111111:task/8524307c-927a-4db5-92ad-1fcf38167324", | |
"Family": "sample", | |
"Revision": "24", | |
"DesiredStatus": "RUNNING", | |
"KnownStatus": "RUNNING", | |
"Containers": [ | |
{ | |
"DockerId": "3829de63b865a15e9bddfaf615bb1f72230f610c56602d45f689cc7695a381b4", |
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 'arrow' | |
input = Arrow::MemoryMappedInputStream.open("/dev/shm/arrays.arrow") | |
reader = Arrow::RecordBatchFileReader.new(input) | |
reader.first.find_column('x').entries.map(&:to_a) | |
# => [[1, 2], [3, 4]] | |
reader.first.find_column('y').entries.map(&:to_a) | |
# => [[5, 6], [7, 8]] | |
reader.first.find_column('z').entries.map(&:to_a) | |
# => [[19, 22], [43, 50]] |
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 'pycall/import' | |
include PyCall::Import | |
pyimport 'numpy', as: :np | |
x = np.matrix.([[1,2], [3, 4]]) | |
# => matrix([[1, 2], | |
# [3, 4]]) | |
y = np.matrix.([[5,6], [7, 8]]) | |
# => matrix([[5, 6], |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: ruby:2.4.1 | |
working_directory: ~/circleci-2.0 | |
steps: | |
- checkout | |
- run: ruby -v | |
deploy: |
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
{ | |
"variables": { | |
"docker_hub_login_email": "{{env `DOCKER_HUB_LOGIN_EMAIL`}}", | |
"docker_hub_login_password": "{{env `DOCKER_HUB_LOGIN_PASSWORD`}}" | |
}, | |
"builders":[ | |
{ | |
"type": "docker", | |
"image": "ubuntu", | |
"export_path": "image.tar" |
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
function main() { | |
const threads = GmailApp.search('label:gcsエクスポート-未処理'); | |
for(var i = 0; i < threads.length; i++) { | |
const messages = GmailApp.getMessagesForThread(threads[i]); | |
/* 各メールから日時、送信元、件名、内容を取り出す*/ | |
const message = messages[messages.length - 1]; | |
const attachments = message.getAttachments(); | |
for(var j = 0; j < attachments.length; j++) { | |
if (attachments[0].getName() == "書き出す.zip") { | |
// GmailAttachment |
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
#!/usr/bin/env ruby | |
require 'matrix' | |
CLASS_1 = 1 | |
CLASS_2 = 2 | |
data = Matrix.rows([ | |
[ 1.0, CLASS_1], | |
[ 0.5, CLASS_1], |
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
[Unit] | |
Description=Kuroko2 executor | |
[Service] | |
Environment=LANG=ja_JP.UTF-8 | |
Environment=RAILS_ENV=production | |
Environment=NUM_WORKERS=2 | |
Environment=QUEUE=@default | |
User=<user_name> | |
WorkingDirectory=<kuroko2プロジェクトのディレクトリ> |
NewerOlder