This file contains hidden or 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 java.util.Scanner; | |
| public class Week2_2 { | |
| public static void main(String[] args) { | |
| Scanner scanner = new Scanner(System.in); | |
| System.out.print("[캐시백 계산]\n결제 금액을 입력해 주세요.(금액):"); | |
| float cash = scanner.nextFloat(); | |
| float cashback = cash * 0.1f; |
This file contains hidden or 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 java.util.ArrayList; | |
| public class Week2 { | |
| public static void main(String[] args) { | |
| for (int i = 1; i <= 9; i++) { | |
| ArrayList gugudanList = new ArrayList(); | |
| for (int j = 1; j <= 9; j++) { |
This file contains hidden or 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 java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| // if you want to use class to other class, you should make private class (without public) | |
| class FileUtils { |
This file contains hidden or 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 java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args){ | |
| String menu = "<<<[메뉴관리]>>>\n1. 회원관리\n2. 과목 관리\n3. 수강관리\n4. 결제 관리\n5. 종료"; | |
| while (true) { | |
| System.out.println(menu); |
This file contains hidden or 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
| # Taken from https://johanwind.github.io/2023/03/23/rwkv_details.html. | |
| # I've added additional comments restructured it a tiny bit, which makes it clearer for me. | |
| import numpy as np | |
| from torch import load as torch_load # Only for loading the model weights | |
| from tokenizers import Tokenizer | |
| exp = np.exp | |
| layer_norm = lambda x, w, b : (x - np.mean(x)) / np.std(x) * w + b | |
| sigmoid = lambda x : 1/(1 + exp(-x)) |