Skip to content

Instantly share code, notes, and snippets.

@oiehot
oiehot / unreal_maya_art_rig.md
Created Dec 16, 2018
unreal_maya_art_rig.md
View unreal_maya_art_rig.md

마야 언리얼 ART

설치하기

  1. 마켓플레이스에서 ARTv1을 구입하고 다운로드 한다.

  2. C:/Program Files/Epic Games/UE_4.20/Engine/Plugins/Marketplace/ARTv1/MayaTools

  3. ARTv1/MayaTools를 다른 곳으로 카피한다.] 예) D:/ARTv1/MayaTools

View AAPawn.cpp
#include "ABPawn.h"
AABPawn::AABPawn()
{
PrimaryActorTick.bCanEverTick = true;
Capsule = CreateDefaultSubobject<UCapsuleComponent>(TEXT("CAPSULE"));
Mesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("MESH"));
Movement = CreateDefaultSubobject<UFloatingPawnMovement>(TEXT("MOVEMENT"));
SpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("SPRINGARM"));
View copyrighter.py
import os
import sys
import re
from PIL import Image, ImageDraw, ImageFont
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtCore import QEvent
from datetime import datetime
from os.path import getmtime
View alphaavantage.py
import io
import requests
import pandas as pd
import json
# https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo
# https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&outputsize=full&apikey=demo
# https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo&datatype=csv
apikey = 'API_KEY_HERE'
@oiehot
oiehot / tf_iris_classification.py
Created Nov 11, 2017
Tensorflow 심층신경망(DNN)을 이용하여 꽃 분류하기
View tf_iris_classification.py
'''
Tensorflow 심층신경망(DNN)을 이용하여 꽃 분류하기 (Classification)
순서:
1. CSV로 부터 Iris 훈련/시험 데이터를 읽는다.
2. 분류하는 신경망을 만든다.
3. 데이터를 통한 훈련.
4. 새로운 샘플을 통해 판별하기.
SL SW PL PW species
@oiehot
oiehot / tf_estimator_custom.py
Created Nov 10, 2017
Tensorflow Custom Estimator
View tf_estimator_custom.py
import numpy as np
import tensorflow as tf
# 커스텀 Estimator 모델(func)
def model_fn(features, labels, mode):
W = tf.get_variable('W', [1], dtype=tf.float64) # tf.get_variable(): Gets an existing variable with parameter or create a new one.
b = tf.get_variable('b', [1], dtype=tf.float64)
y = W * features['x'] + b
# loss(오차) 서브 그래프
View tf_estimator_linear_regressor.py
import numpy as np
import tensorflow as tf
x = tf.feature_column.numeric_column('x', shape=[1]) # 랭크 1 텐서, 1차원 배열
feature_columns = [x]
# LinearRegressor < tf.estimator.Estimator
estimator = tf.estimator.LinearRegressor(feature_columns=feature_columns)
# 데이터 세트
@oiehot
oiehot / tf_ex1.py
Created Nov 10, 2017
Tensorflow GradientDescent
View tf_ex1.py
import random
import tensorflow as tf
# tf.constant
sess = tf.Session()
node1 = tf.constant(3.0, dtype=tf.float32) # 상수 노드
node2 = tf.constant(4.0)
node3 = tf.add(node1, node2) # 합 노드
View peewee_orm_ex1.py
import sys
import peewee as pw # http://peewee.readthedocs.io/en/latest/peewee/api.html
# CONNECT
try:
db = pw.MySQLDatabase("database_name", host="192.168.0.10", port=3306, user="oiehot", passwd="1234")
db.connect()
except:
print('DB 접속 실패')
sys.exit()
@oiehot
oiehot / naver_cafe_crawler_wip.py
Created Nov 4, 2017
Naver cafe crawler (wip)
View naver_cafe_crawler_wip.py
from selenium import webdriver
class Article():
def __init__(self, id, title, author, date, view_count=0, like_count=0, contents=''):
self.id = id
self.title = title
self.author = author
self.date = date
self.view_count = view_count
self.like_count = like_count
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.