masaki@desktop:~/ $ cat main.cu
#include <stdio.h>
int main() {
int count = 0;
cudaError_t error;
error = cudaGetDeviceCount(&count);
masaki@desktop:~/ $ cat main.cu
#include <stdio.h>
int main() {
int count = 0;
cudaError_t error;
error = cudaGetDeviceCount(&count);
module Jasmine | |
class UrlMapper | |
def initialize(config) | |
@config = config | |
end | |
def map_url_paths(paths) | |
paths.map{|path| path} | |
end | |
end |
#include <stdio.h> | |
int main() { | |
int answer = 20; | |
char input[10]; | |
while(1) { | |
printf("input: "); | |
scanf("%s", input); | |
if ( answer == atoi(input)) { |
str = "aabbcc" | |
str.chars.to_a.permutation(str.size).select{|x| 1.upto(x.size).all? { |i| x[i] != x[i-1] } }.uniq.count |
config.filter_parameters += [:password, lambda {|k, v| | |
if k.to_sym == :json | |
json = JSON.parse(v).symbolize_keys | |
json[:password] = "[FILTERED]" if json.has_key?(:password) | |
v.replace json.to_s | |
end | |
}] |
#!/bin/sh | |
voice=/usr/share/hts-voice/mei_normal | |
dic=/var/lib/mecab/dic/open-jtalk/naist-jdic | |
open_jtalk -x $dic -td $voice/tree-dur.inf -tm $voice/tree-mgc.inf -tf $voice/tree-lf0.inf -md $voice/dur.pdf\ | |
-mm $voice/mgc.pdf -mf $voice/lf0.pdf -dm $voice/mgc.win1 -dm $voice/mgc.win2 -dm $voice/mgc.win3\ | |
-df $voice/lf0.win1 -df $voice/lf0.win2 -df $voice/lf0.win3 -ow out.wav -em $voice/tree-gv-mgc.inf\ | |
-ef $voice/tree-gv-lf0.inf -cm $voice/gv-mgc.pdf -cf $voice/gv-lf0.pdf -k $voice/gv-switch.inf\ | |
-s 48000 -p 480 -a 0.55 -u 0.1 -jm 1.0 -jf 0.5 -z 6000 -ow /dev/stdout \ |
class Array | |
def **(num) | |
args = [] | |
(num - 1).times { args << self } | |
product(*args) | |
end | |
end | |
[0,1] ** 3 #=> [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]] |