この記事は Scala Advent Calendar 2016(Adventar) 10日目の記事です。
今は 12/10 の 625時です。年明けなんて無かった。いいね?
さてさて、sbt の依存jarのダウンロードが遅い、というのは割とよく言われる事であります。
で、この原因の一旦に、sbtが Apache Ivy を使っている、という点があります。
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
import ( | |
"fmt" | |
"github.com/asaskevich/govalidator" | |
) | |
// You can use as well instead of *url.URL a string with your URL, in this case you might drop `u.String()` | |
// - transformation to string in method call. | |
func validateURL(u *url.URL) error { | |
valid := govalidator.IsRequestURL(u.String()) | |
if valid == false { |
この記事は Scala Advent Calendar 2016(Adventar) 10日目の記事です。
今は 12/10 の 625時です。年明けなんて無かった。いいね?
さてさて、sbt の依存jarのダウンロードが遅い、というのは割とよく言われる事であります。
で、この原因の一旦に、sbtが Apache Ivy を使っている、という点があります。
const {PassThrough} = require('stream')
const fs = require('fs')
const d = new PassThrough()
fs.createReadStream('tt2.js').pipe(d) // can be piped from reaable stream
d.pipe(process.stdout) // can pipe to writable stream
d.on('data', console.log) // also like readable
package example | |
import java.net._ | |
import java.io._ | |
object ScalaNativeHttpGetExample { | |
def using[A <: Closeable, B] (a: A)(f: A => B): B = | |
try { | |
f(a) | |
} finally { |
更新: | 2021-06-23 |
---|---|
作者: | @voluntas |
バージョン: | 2021.11 |
URL: | https://voluntas.github.io/ |
目的
import cv2 | |
import numpy as np | |
#動画ファイルパス | |
ESC_KEY = 27 # Escキー | |
INTERVAL= 33 # インターバル | |
FRAME_RATE = 30 # fps | |
#ウインドウ名の定義 |
import numpy as np | |
import cv2 | |
FILE_ORG = "calibrated_output_background2.m4v" | |
WINDOW_ORG = "Orginal_frame" | |
FRAME_RATE = 30 # fps | |
class LocationDetector: | |
def __init__(self, |
PHP 10 hrs 33 mins █████████████▍░░░░░░░ 64.0% | |
TypeScript 2 hrs 7 mins ██▋░░░░░░░░░░░░░░░░░░ 12.9% | |
Smarty 2 hrs 5 mins ██▋░░░░░░░░░░░░░░░░░░ 12.7% | |
Nginx 25 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.5% | |
JavaScript 20 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.0% |