Skip to content

Instantly share code, notes, and snippets.

@lasekmiroslaw
lasekmiroslaw / backup-mysql.sh
Last active February 24, 2024 15:50
backup mysql percona-xtrabackup xtrabackup
#!/bin/bash
export LC_ALL=C
days_of_backups=2 # Must be less than 7
backup_owner="root"
parent_dir="/backups/mysql"
defaults_file="/etc/my.cnf.d/backup.cnf"
todays_dir="${parent_dir}/$(date +%a)"
log_file="${todays_dir}/backup-progress.log"
@CSRaghunandan
CSRaghunandan / nginx.conf
Last active April 20, 2024 19:47
Nginx configuration for serving mp4 videos
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@ksopyla
ksopyla / ubuntu16_tensorflow_cuda8.sh
Last active March 7, 2021 16:31
How to set up tensorflow with CUDA 8 cuDNN 5.1 in virtualenv with Python 3.5 on Ubuntu 16.04 http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# This is shorthened version of blog post
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# update packages
sudo apt-get update
sudo apt-get upgrade
#Add the ppa repo for NVIDIA graphics driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
@haje01
haje01 / 대화형 챗봇 설계의 과제.md
Last active June 15, 2022 09:33
대화형 챗봇 설계의 과제

최근 인공지능을 활용한 챗봇에 대한 관심이 높아지고 있습니다. 챗봇 설계에 관한 좋은 글이 있어 번역을 해보았습니다. 이 글은 IBM DeveloperWorks에 기재된 Michael Yuan의 글을 번역한 것으로 의역이 있습니다. - 김정주(haje01@gmail.com)


대화형 챗봇 설계의 과제

사용자는 챗봇이 매우 간단하고 최소한의 요구만 하기에 좋아합니다. 그것은 대화식 문자 메시지처럼 간단해질 수 있습니다. 또한, 사용자는 자신이 선호하는 메시지 앱에 계속 머물기를 선호합니다. 앱, 웹 URL, 메뉴, 버튼, 광고, 크롬 및 기타 요소를 탐색하지 않고 바로 목표를 달성하고자 합니다. 그러나 이 단순성은 큰 설계 과제도 제시합니다. 챗봇은 사용자의 말을 정확하게 이해하고 적절히 행동해야 합니다. 이것은 오늘날 최고의 자연어 AI (인공 지능)에게도 매우 어려운 과제입니다.

현재 상태의 AI에서는, 대화식 문자 메시지 또는 대화식(Conversational) UI, 즉 CUI는 (안타깝게도) 거의 항상 잘 설계된 그래픽 UI(GUI)보다 열등합니다. GUI와 비교하여 CUI는 초기 단계에 있습니다. 커뮤니티로서 우리는 여전히 CUI의 디자인 패턴과 우수 사례를 모색하고 있습니다. 이 튜토리얼에서는 챗봇이 왜 실패하고 성공할 수 있는지 설명합니다.

@moneytoo
moneytoo / gist:8c95cc39fd4fd9a18858eb15e379d2f5
Last active June 21, 2022 09:29
ImageMagick 6.7.8 with WebP (libwebp) support on CentOS 7
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel
rpm -ivh http://vault.centos.org/centos/7/updates/Source/SPackages/ImageMagick-6.7.8.9-15.el7_2.src.rpm
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec
# actual install
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.7.8.9-15.el7.centos.x86_64.rpm
@cjthomp
cjthomp / nginx.conf
Created August 30, 2016 20:54 — forked from mreschke/nginx.conf
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@Pusnow
Pusnow / 한글과유니코드.md
Last active March 17, 2024 08:27
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

@pcan
pcan / SelfExpiringHashMap.java
Last active April 21, 2024 14:18
SelfExpiringHashMap - a Java Map which entries expire automatically after a given time; it uses a DelayQueue internally.
/*
* Copyright (c) 2019 Pierantonio Cangianiello
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is