Skip to content

Instantly share code, notes, and snippets.

👍
I can do it as an undergraduate.

Tae-Hwan Jung graykode

👍
I can do it as an undergraduate.
Block or report user

Report or block graykode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View train.py
"""
init model unit test
"""
import os
import torch
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import argparse
@graykode
graykode / README.md
Last active Jul 15, 2019
Mac OS vscode debugging
View README.md

Install Xcode to use /Applications/Xcode.app/Contents/Developer/usr/bin/lldb-mi

@graykode
graykode / README.md
Last active Jul 5, 2019
Setting VSCode in Mac Os for Competitive Programming
View README.md

Just Run with command + l-shift + t

View mnist.py
import argparse
import numpy as np
import tensorflow as tf
from tensorflow.python.keras.layers import *
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--start", type=int, required=True)
parser.add_argument("--end", type=int, required=True)
parser.add_argument("--path", type=str, required=True)
View aaa.Tex
\mathcal{W}(A,f) = (T,\bar{f})
View ResNet.py
'''ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
View github.md

GIT

Git 이전의 VCS(중앙집중식 버전 관리)는 각 파일의 변화를 시간순으로 관리하면서 파일들의 집합을 관리 하지만 Git은 파일의 차이가 아니라 스냡샷의 스트림으로 파일을 관리한다.

파일의 세가지 상태

  1. Modified(Working Directory): 수정한 파일을 아직 로컬 데이터베이스에 커밋하지 않은 것

  2. Staged(Staging Area): 현재 수정한 파일을 곧 커밋할 것이라고 표시한 상태

View POST.java
/**
* Created by 정태환 on 2016-04-13.
*/
public class POST {
public String cookie = null;
String url = null;
String data = null;
List<NameValuePair> nvps = null;
View GET.java
/**
* Created by 정태환 on 2016-04-13.
*/
public class GET {
String url = null;
String data = null;
GET(String url){
this.url = url;
this.data = url;
View mergeSort.cpp
#include<bits/stdc++.h>
using namespace std;
vector<int> a;
void merge(int s, int e) {
vector<int> b;
b.resize(e - s + 1);
int mid = (s + e) / 2;
int i = s, j = mid + 1, k = 0;
while (i <= mid && j <= e) {
if (a[i] <= a[j]) b[k++] = a[i++];
You can’t perform that action at this time.