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
# from : https://stackoverflow.com/questions/36587211/easiest-way-to-read-csv-files-with-multiprocessing-in-pandas | |
import os | |
import pandas as pd | |
from multiprocessing import Pool | |
from glob import glob | |
data_files = glob(os.path.join(data_dir, "*.xlsx")) |
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
// From : https://leetcode.com/problems/two-sum | |
pub struct Inputs { | |
pub nums: Vec<i32>, | |
pub target: i32, | |
} | |
pub trait Solution { | |
fn two_sum(&self) -> Vec<i32>; | |
fn result_solution(&self) -> String { |
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
//use std::cmp; | |
/* | |
impl Solution { | |
pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> { | |
} | |
} | |
*/ |
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
library("shiny") | |
library("ggplot2") | |
library("dplyr") | |
# reference : | |
# https://shiny.rstudio.com/gallery/plot-interaction-basic.html | |
# https://shiny.rstudio.com/gallery/plot-interaction-zoom.html | |
data <- mtcars %>% mutate(id = 1:n()) |
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
# coding: utf-8 | |
# From : https://gist.github.com/haven-jeon/6b508f4547418ab26f6e56b7a831dd9a#file-word2vec-ipynb | |
# !git clone https://github.com/haven-jeon/KoWordSpacing | |
# !bunzip2 KoWordSpacing/input.txt.bz2 | |
# # 임베딩 평가 데이터 | |
# !git clone https://github.com/SungjoonPark/KoreanWordVectors |
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
package main | |
import ( | |
"fmt" | |
"github.com/kniren/gota/dataframe" | |
tf "github.com/tensorflow/tensorflow/tensorflow/go" | |
"github.com/tensorflow/tensorflow/tensorflow/go/op" | |
"os" | |
) |
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
// From : https://www.edwith.org/datascience/lecture/33888/ | |
// edwith에서 한글자막을 달아놓은 MIT의 Data Science 강좌중 첫번째 챕터입니다. | |
// 위 링크에서 파이썬 버전의 코드를 받아보실 수 있습니다. | |
// 칼로리가 제한될 때, 음식을 선택하는 문제를 탐욕 알고리즘으로 푸는 문제입니다. | |
// 파이썬 코드를 Golang으로 변환했습니다. | |
package main | |
import ( | |
"flag" |
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
# 스타워즈 시리즈들의 유사도를 등장인물들을 통해 계산하고 시각화 하는 문제 | |
# From : https://github.com/R-Korea/weekly_R_quiz/blob/master/201808/1.movie_similarity/movie_similarity_quiz.Rmd | |
library(dplyr) | |
library(data.table) | |
library(ggplot2) | |
library(scales) | |
rm(list=ls()) | |
raw.data <- |
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
import tensorflow as tf | |
from tensorflow import layers | |
from tensorflow.contrib.layers import xavier_initializer | |
import gym | |
import numpy as np | |
from collections import deque | |
from collections import namedtuple |
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
# References: | |
import argparse | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
import torchvision.transforms as T |
NewerOlder