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
# https://machinelearningmastery.com/how-to-develop-lstm-models-for-time-series-forecasting/ | |
# multivariate lstm example | |
from numpy import array | |
from numpy import hstack | |
from keras.models import Sequential | |
from keras.layers import LSTM | |
from keras.layers import Dense | |
# split a multivariate sequence into samples | |
def split_sequences(sequences, n_steps): |
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 "Header_manager.h" 방식 */ | |
/* -------------------------------------------------------------- */ | |
// Header_manager.h의 내용 | |
#ifdef INCLUDE_HEADER_MANAGEMENT | |
#error "re-include Error INCLUDE_HEADER_MANAGEMENT" | |
#else | |
#define INCLUDE_HEDER_MANAGEMENT |
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
//[모의 SW 역량테스트] 2105.디저트 카페 | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int N; | |
int map[20][20]; | |
//int isvisited[101]; | |
vector<int> isvisited(101); | |
int result; |
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 <vector> | |
#include <string> | |
using namespace std; | |
//bool match(const string& w, string& s); | |
int cache[101][101]; | |
string W, S; | |
bool memMatch(int w, int s); |
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
/* | |
비트 이동 연산을 이용하여 문자 4개를 받아서 하나의 unsigned int형의 변수 안에 저장하는 프로그램을 작성하라. | |
첫 번째 문자는 비트 0부터 비트 7까지에 저장되고, 두 번째 문자는 비트 8부터 비트 15까지, | |
세 번째 문자는 비트 16에서 비트 23까지, 네 번째 문자는 비트 24부터 비트 31까지에 저장된다. | |
결과로 생성되는 정수값은 16진수로 출력하도록 한다. 비트 이동 연산과 비트 OR 연산을 사용하라. | |
*/ | |
#include <iostream> | |
int main() { | |
char a, b, c, d; | |
unsigned int res = 0x00000000;//32bit |
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 <vector> | |
using namespace std; | |
const int MOD = 10 * 1000 * 1000; | |
long long poly(vector<vector<long long>> D, int N) { | |
for (int n = 1; n <= N; n++) { | |
for (int down = 1; down <= n; down++) { | |
for (int i = 1; i <= n - down; i++) { | |
D[n][down] += D[n - down][i] * (down + i - 1); | |
} |
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
''' | |
RandomCharacter.py | |
from random import randint # randint를 임포트한다. | |
# 랜덤 소문자를 생성한다. | |
def getRandomLowerCaseLetter(): | |
return getRandomCharacter('a', 'z') | |
''' | |
import sys |
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<vector> | |
#include<algorithm> | |
using namespace std; | |
int clck[16]; | |
int button[10][5] = { | |
{0,1,2,-1,-1},{3,7,9,11,-1},{4,10,14,15,-1},{0,4,5,6,7},{6,7,8,10,12},{0,2,14,15,-1},{3,14,15,-1,-1},{4,5,7,14,15},{1,2,3,4,5},{3,4,5,9,13} //연결된 스위치 | |
}; | |
int ans; |
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> | |
using namespace std; | |
int H, W; | |
char map[21][21]; | |
int dx[4][2] = { { 1,1},{1,1},{1,0},{1,0} }; | |
int dy[4][2] = { { 0,-1},{0,1},{1,1},{0,1} }; | |
int ans; | |
int n_num; |
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> | |
using namespace std; | |
int ans; | |
int N, M; | |
bool areFriends[10][10]; | |
bool havePair[10]; | |
void counting(int n){ | |
bool finished = true; |
NewerOlder