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
- 回答が途中で切れる場合は、全体の回答にかかるチャット数と現在のチャットの番号を3/10といった形式で明示してください。 |
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 | |
echo "Hello, world!" |
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
\documentclass[a4j,12pt,dvipdfmx]{jsarticle} | |
\usepackage{tikz} | |
\usepackage[dvipdfmx]{hyperref} | |
\usetikzlibrary{positioning,fit,arrows.meta} | |
\begin{document} | |
\begin{tikzpicture} | |
\node[draw,circle,minimum size=1cm] (alpha) {$\alpha$}; | |
\node[draw,circle,minimum size=1cm, right=1cm of alpha] (theta) {$\theta_d$}; | |
\node[draw,circle,minimum size=1cm, right=1cm of theta] (z) {$z_{d,i}$}; |
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
<div id='list'> | |
<child v-for='item in items' :key='item.id' :child='item'></child> | |
</div> | |
<script> | |
Vue.component('child', { | |
props: ['child'], | |
template: '<li>{{ child.name }}</li>' | |
}) |
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
from sklearn.preprocessing import LabelBinarizer, OneHotEncoder | |
label = ['a', 'b', 'a'] | |
binarized_label = LabelBinarizer().fit_transform(label) # [[1], [2], [2]] | |
# 以下は2クラスの場合のみ必要 | |
one-hot_label = OneHotEncoder().fit_transform(binarized_label).toarray() |
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
from keras.utils import np_utils | |
from sklearn.preprocessing import LabelEncoder | |
import numpy as np | |
feature_labels = np.array([1, 1, 2, 3, 4, 3, 4]) | |
encoder = LabelEncoder() | |
encoder.fit(feature_labels) | |
feature_labels = encoder.transform(feature_labels) | |
feature_labels = np_utils.to_categorical(feature_labels) | |
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
lists = [0, 1, 2, 0, 1, 4, 0, 2, 3, 3] | |
# periods = [2, 2, 3] | |
# average = [1.5, 2.5, 2.6] | |
# が欲しい | |
periods = [] | |
average = [] | |
amount = 0 | |
k = 0 |
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
N = gets.to_i | |
nums = gets.split.map(&:to_i) | |
cnt = 0; | |
nums.each_with_index{|num, i| | |
nums_dup = nums.dup #浅いコピー | |
nums_dup.delete_at(i) | |
cnt += 1 if nums_dup.find{|n| n + num == 256} | |
} | |
puts cnt > 0 ? "yes" : "no" |
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
public class Client { | |
public static void main (String[] args) { | |
System.out.println("start"); | |
Factory myFactory; | |
myFactory = new Factory(); | |
Component myComponent = myFactory.getComponent(); | |
myComponent.prtTicket(); | |
System.out.println("end"); | |
} | |
} |