Skip to content

Instantly share code, notes, and snippets.

@univdev
univdev / crisiswatch-ML.py
Last active May 7, 2025 14:45
crisiswatch ML모델 생성 코드
import pandas as pd
import re
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report, accuracy_score
from nltk.stem import PorterStemmer
# -----------------------------
# 1. 데이터 로딩 및 전처리
@univdev
univdev / karabiner.json
Last active October 8, 2024 05:43
My Karabiner shortcut (v.15.2.0)
{
"global": { "show_profile_name_in_menu_bar": true },
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Map Right Option + l;,'p to Arrow Keys",
"manipulators": [
{
@univdev
univdev / HTTPClient.ts
Created August 16, 2024 04:59
Web HTTP 통신을 위한 메소드 모음
import axios, { AxiosRequestConfig, AxiosResponse } from "axios";
import { GetUsersPayload } from '@types/common';
export class HTTPClient {
private static baseURI = import.meta.env.VITE_PUBLIC_API_ENDPOINT;
public static getUsers(payload: GetUsersPayload) {
return this.request<undefined, GetUsersPayload>('/users', { data: payload, method: 'GET' });
}
@univdev
univdev / create-simple-react-utils.js
Created August 14, 2024 15:42
simple-react-utils 패키지 러너
// Install 'https://github.com/univdev/react-utils'
import { Command } from 'commander';
import rootPackageJson from '../../package.json' with { type: 'json' };
import packageJson from './package.json' with { type: 'json' };
import { exec } from 'node:child_process';
import { Glob } from 'glob';
import fs from 'node:fs';
import chalk from 'chalk';
@univdev
univdev / karabiner.json
Created October 25, 2022 12:35
Happy Hacking Keyboard setting file
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": true,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
@univdev
univdev / common.css
Created May 28, 2020 10:26
장바구니 및 구매 기능 제작
.shop-item {
display: flex;
}
.shop-item img {
width: 250px;
height: 200px;
background-color: gray;
border: 1px solid #CCC;;
}
.shop-item .shop-content {
@univdev
univdev / common.js
Last active May 27, 2020 08:05
장바구니 기능
$(function(){
var path = './store/store.json';
const app = {
items: [],
init() {
$.getJSON(path, (data) => {
const singleton = this;
data = data.map((item) => {
const price = item.price.split(',').join('') * 1;
@univdev
univdev / index.html
Created May 21, 2020 10:21
Canvas 사각형, 실선, 지우개 기능 추가
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#canvas {
border: 1px solid #EEE;
}
@univdev
univdev / index.html
Created May 21, 2020 08:32
Canvas 그림판 실선 미리보기 기능
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#canvas {
border: 1px solid #EEE;
}
@univdev
univdev / sevseg.ino
Created April 18, 2019 02:11
아두이노 7-Segment 숫자 카운트
int digits[10][7] = {
{0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 1, 1, 1, 1},
{0, 0, 1, 0, 0, 1, 0},
{0, 0, 0, 0, 1, 1, 1},
{1, 0, 0, 1, 1, 0, 0},
{0, 1, 0, 0, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1},
{0, 0, 0, 0, 0, 0, 0},