Skip to content

Instantly share code, notes, and snippets.

View wnghdcjfe's full-sized avatar
🌴
On vacation

zagabi wnghdcjfe

🌴
On vacation
View GitHub Profile
@wnghdcjfe
wnghdcjfe / sentiAnalyze.py
Created April 8, 2018 08:47
study for week2
import numpy as np
import matplotlib.pyplot as plt
class SentiAnalyzer:
'''
'''
# Make the method signature to accept "sentidata" and "word"
def __init__(self, sentidata, word):
@wnghdcjfe
wnghdcjfe / date.js
Created September 7, 2017 00:54
set new Date beautiful
var now = new Date();
var year = now.getFullYear();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var hour = ("0" + now.getHours()).slice(-2);
var minutes = ("0" + now.getMinutes()).slice(-2);
return year + month + day;
@wnghdcjfe
wnghdcjfe / index.html
Created May 6, 2017 06:29
d3 | v3 word cloud overwatch version
<html>
<head>
<meta charset="utf-8" />
</head>
<style>
@font-face {
font-family: 'overwatch';
src: url('fonts/koverwatch.woff2');
}
@wnghdcjfe
wnghdcjfe / friends.json
Created May 5, 2017 08:17
D3 V3 | simple force layout
{
"nodes": [{
"name": "주홍철",
"group": 1
}, {
"name": "박종선",
"group": 1
}, {
"name": "연제호",
"group": 1
@wnghdcjfe
wnghdcjfe / friends.json
Created May 5, 2017 08:13
D3 V4 | simple force layout
{
"nodes": [{
"name": "주홍철",
"group": 1
}, {
"name": "박종선",
"group": 1
}, {
"name": "연제호",
"group": 1
@wnghdcjfe
wnghdcjfe / index.html
Last active December 3, 2018 20:42
D3 v4 | animate path
<!DOCTYPE html>
<meta charset="utf-8">
<style>
/* set the CSS */
.line {
fill: none;
/*stroke: #aaa;
stroke: #43484c;
stroke: #405275;
@wnghdcjfe
wnghdcjfe / index.html
Last active December 15, 2018 05:15
D3 v4 | plot and line chart with tooltip
<!DOCTYPE html>
<meta charset="utf-8">
<style>
/* set the CSS */
.line {
fill: none;
/*stroke: #aaa;
stroke: #43484c;
@wnghdcjfe
wnghdcjfe / README.md
Last active March 28, 2017 22:23
chart

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

@wnghdcjfe
wnghdcjfe / angular js
Created January 10, 2017 03:46
angular js filter img tag
.filter('findImg', function(){
return function(item){
//?은 바로 앞의 문자가 있거나 없거나를 판단
//예를 들자면 홍철?영주 >> 영주 또는 홍철영주를 반환한다.
var reg1 = item.match(/src=\"(.+?)\"/i);
//var reg1 = item.match(/src=[\"](.+?)[\"].*?/i);
var reg2 = reg1[0].split('"');
return reg2[1];
}
})
@wnghdcjfe
wnghdcjfe / checkB
Created January 8, 2017 21:52
check Browser and move chrome
function checkB() {
if (navigator.userAgent.indexOf("Trident") != -1) {
var msg = "이미지 업로드는 크롬브라우저에서만 가능! 확인 버튼을 누르면 크롬이 다운됩니다.";
var r = confirm(msg);
if (r == true) {
window.open('https://www.google.co.kr/chrome/browser/desktop/', '_blank');
}
}
}