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
val toDataPathMap = getFacilityInfoMap( | |
FacilityExchangeTable | |
.innerJoin( | |
otherTable = RoomExchangeTable, | |
onColumn = { FacilityExchangeTable.facilityId }, | |
otherColumn = { RoomExchangeTable.facilityId }) | |
.innerJoin( | |
otherTable = RiyosyaFcHeyaIdRelTable, | |
onColumn = { RoomExchangeTable.fcHeyaId }, | |
otherColumn = { RiyosyaFcHeyaIdRelTable.fcHeyaId }) |
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
#<api> | |
import json | |
import os.path | |
cell_type_header = '#### cell_type: ' | |
ipynb_json_header = '#### ipynb_json: ' | |
def save_py(input_path, output_path=None): | |
if output_path is None: | |
filename, ext = os.path.splitext(input_path) |
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
import subprocess | |
class Execute(object): | |
"""外部プログラムを実行。stdinとstdoutで対話する。""" | |
def __init__(self, *args_1, **args_2): | |
if 'encoding' in args_2: | |
self.encoding = args_2.pop('encoding') | |
else: | |
self.encoding = 'utf-8' |
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
const fs = require('fs'); | |
const filelist = [ | |
'data/all1.txt', | |
'data/all2.txt', | |
'data/all3.txt', | |
'data/all4.txt', | |
]; | |
const filelength = async filename => new Promise((resolve, reject) => { |
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
const fs = require('fs'); | |
const filelist = [ | |
'data/all1.txt', | |
'data/all2.txt', | |
'data/all3.txt', | |
'data/all4.txt', | |
]; | |
const filelength = async filename => new Promise((resolve, reject) => { |
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
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
// Here your code ! | |
function getStdin() { | |
return new Promise((resolve, reject) => { | |
let input_string = ''; | |
process.stdin.on('data', function(chunk) { | |
input_string += chunk; | |
}); |
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
const fs = require('fs'); | |
const assert = require("assert"); | |
const pReadFile = (path) => new Promise((resolve, reject) => fs.readFile(path, (err, files) => { | |
if (err) { | |
reject(err); | |
} | |
else { | |
resolve(files); | |
} |
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 wait(t, callback) { | |
return new Promise( | |
(resolve, reject) => setTimeout(() => callback(resolve, reject), t)); | |
} | |
async function main() { | |
await wait(1000, (resolve, reject) => { | |
console.log('resolve'); | |
resolve(); | |
}); |
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
image: docker:latest | |
services: | |
- docker:dind | |
before_script: | |
- docker login -u username -p password | |
build: | |
stage: build | |
script: | |
- docker build -t username/hogehoge:latest . | |
- docker push username/hogehoge:latest |
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
const net = require('net'); | |
function searchport(host, port, retry_count, callback) { | |
if (retry_count == null) { | |
retry_count = 100; | |
} | |
var socket = new net.Socket(); | |
return new Promise( | |
function (resolve, reject) { |
NewerOlder