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
#include <stdio.h> | |
int main() { | |
int h; | |
int i, j, k; | |
printf("Height of triangle: "); | |
scanf("%d", &h); | |
for (i = 1; i <= h; 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
const int interruptNumber = 0; | |
const int buttonPin = 2; | |
const int ledPin = 8; // 天使眼LED | |
int state; | |
int arr[] = {3, 5, 6, 9, 10, 11}; | |
void setup() { | |
pinMode(ledPin, OUTPUT); | |
pinMode(buttonPin, INPUT); | |
pinMode(interruptNumber, INPUT_PULLUP); |
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
package ntou.ws.ui; | |
import javafx.application.Application; | |
import javafx.geometry.*; | |
import javafx.scene.Scene; | |
import javafx.scene.control.*; | |
import javafx.scene.layout.*; | |
import javafx.stage.Stage; | |
public class SegmentorApp extends Application { |
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
#include <iostream> | |
#include <cstdlib> | |
#include <fstream> | |
#include <iomanip> | |
using namespace std; | |
char id2ch(int); | |
typedef struct process { | |
int pid; |
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 numpy as np | |
from numpy import concatenate as c | |
x = np.array(range(100)) | |
y = np.array(range(100, 200)) | |
def kfold_split(x, y, sp): | |
seg_len = int(len(x) / sp) | |
for i in range(seg_len): | |
seg_begin = i * seg_len |
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
#include <stdio.h> | |
int main() { | |
int arr[10] = {9, 5, 7, 3, 1, 2, 8, 6, 4, 0}; | |
int i, j, t, m; //, p; // 如何不使用 p 這個變數完成選擇演算法? | |
for (i = 0; i < 10; i++) { | |
m = arr[0]; // 紀錄陣列中最大值為多少 | |
p = 0; // 記錄此最大值位於陣列的第幾個元素 | |
for (j = 1; j < 10 - i; j++) { |
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
@start javaw -Dfile.encoding=UTF-8 -jar CORPRO.jar |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from keras.preprocessing import sequence\n", | |
"from keras.models import Sequential\n", |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<pageset> | |
<page id="386"> | |
<title>上月城</title> | |
<text>上月城 是 位 在 兵庫縣 佐用郡 佐用町 的 一座 山城 。 </text> | |
<category> | |
<cat>兵庫縣城堡</cat> | |
<cat>室町時代建築</cat> | |
<cat>赤松氏</cat> | |
<cat>尼子氏</cat> |
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
Loader = importlib.import_module('Loader') | |
model_path = "w2v\\w2v_word_model.npy" | |
dict_path = "w2v\\w2v_word_dictionary.pkl" | |
w2v_model = Loader.Word2VecLoader(model_path, dict_path) | |
w2v, d = w2v_model.load_w2v() | |
w2v_list = list() | |
with open("a.txt", "r", encoding='utf-8') as fin: | |
for line in fin: | |
v = [] |