Skip to content

Instantly share code, notes, and snippets.

@Gumball12
Gumball12 / _worth-reading.md
Last active November 13, 2024 00:33
λ‚˜λ₯Ό μœ„ν•΄ μ €μž₯ν•˜λŠ” 읽어볼 λ§Œν•œ κΈ€λ“€ λͺ¨μŒ
@Gumball12
Gumball12 / client.html
Created November 7, 2019 14:41
server and client code for network term project
<!--
file upload client
@author shj
-->
<input type="file" />
<button>μ—…λ‘œλ“œ</button>
<script>
// append event handler
@Gumball12
Gumball12 / handler.js
Created November 8, 2019 09:56
SERVERLESS_WITH_OAUTH HANDER_CODE
'use strict';
// import modules
const _ = require('lodash');
const aws = require('aws-sdk');
const randomEmoji = require('random-emoji');
// aws lambda
const lambda = new aws.Lambda({
region: 'ap-northeast-2',
@Gumball12
Gumball12 / index.js
Created November 17, 2019 03:08
net-with-docker assignment (server)
const express = require('express');
// Constants
const PORT = 8000;
// App
const app = express();
app.get('/', function (req, res) {
res.send('Master');
});
@Gumball12
Gumball12 / index.py
Created January 20, 2020 14:45
200120 - λ”₯λŸ¬λ‹
# import module
import numpy as np
# datas
# 0 1 2 3 4
y = np.array([0.13, 0.64, 0.0, 0.05, 0.52]) # Prediction Label
t = np.array([0 , 1 , 0 , 0 , 0 ]) # Correction Label
w = np.array([0 , 0 , 1 , 0 , 0 ]) # Wrong Label
"""
@Gumball12
Gumball12 / handler.js
Created February 8, 2020 02:42
naver-papago-example
'use strict';
const axios = require('axios');
module.exports.papago = async ({ body }) => {
const { text } = JSON.parse(body);
console.log(text);
const { data } = await axios.post('https://openapi.naver.com/v1/papago/n2mt', { // data
🌞 Morning 167 commits β–ˆβ–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 13.4%
πŸŒ† Daytime 380 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 30.6%
πŸŒƒ Evening 453 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 36.4%
πŸŒ™ Night 243 commits β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 19.5%