CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자
- 이 문서는 CMake를 주관적으로 서술합니다
- 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다
| # | |
| # [2016-03-14] Challenge #258 [Easy] IRC: Making a Connection | |
| # https://www.reddit.com/r/dailyprogrammer/comments/4ad23z/20160314_challenge_258_easy_irc_making_a/ | |
| # | |
| import socket | |
| input = """chat.freenode.net:6667 | |
| dude1267 | |
| dude1267 |
| """ Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
| import numpy as np | |
| import cPickle as pickle | |
| import gym | |
| # hyperparameters | |
| H = 200 # number of hidden layer neurons | |
| batch_size = 10 # every how many episodes to do a param update? | |
| learning_rate = 1e-4 | |
| gamma = 0.99 # discount factor for reward |
| # | |
| # mnist_cnn_bn.py date. 5/21/2016 | |
| # date. 6/2/2017 check TF 1.1 compatibility | |
| # | |
| from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| import os |
| #!/usr/bin/env python | |
| # coding=utf-8 | |
| import numpy as np | |
| """ | |
| 1: Procedure Policy_Iteration(S,A,P,R) | |
| 2: Inputs | |
| 3: S is the set of all states | |
| 4: A is the set of all actions | |
| 5: P is state transition function specifying P(s'|s,a) |
| #!/usr/bin/env python3 | |
| """ | |
| License: MIT License | |
| Copyright (c) 2023 Miel Donkers | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer |
| x = torch.randn(10) | |
| print(x) | |
| y, ind = torch.sort(x, 0) | |
| print("y", y) | |
| print("ind", ind) | |
| unsorted = y.new(*y.size()) | |
| unsorted.scatter_(0, ind, y) | |
| print("unsorted:", unsorted) | |
| print((x - unsorted).abs().max()) |
| #!/usr/bin/env python | |
| # -*- coding:UTF-8 -*- | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.init as init | |
| def weight_init(m): | |
| ''' |
CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자
| # coding=utf-8 | |
| # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |