- hoge
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
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
loop_num = 100000 | |
start_time = Time.now | |
str1 = '' | |
(1..loop_num).each do |_n| | |
str1 += 'a' | |
end | |
p "+=で#{loop_num}回結合するのにかかった時間は#{Time.now - start_time}秒" | |
start_time = Time.now | |
str2 = '' |
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 | |
EXEC_SCRIPT=/opt/local/bin/airflow | |
CMDNAME=`basename $0` | |
LOG_DIR=/var/log/airflow | |
PID_DIR=/var/run | |
PID_FILE="$PID_DIR"/airflow_webserver.pid | |
LOG_FILE="$LOG_DIR"/webserver.log | |
PORT=8888 | |
RUN_USER=vagrant |
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
[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プロジェクトのディレクトリ> |
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 'matrix' | |
CLASS_1 = 1 | |
CLASS_2 = 2 | |
data = Matrix.rows([ | |
[ 1.0, CLASS_1], | |
[ 0.5, CLASS_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
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 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 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 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 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]] |
OlderNewer