Skip to content

Instantly share code, notes, and snippets.

View lethee's full-sized avatar

lethee lethee

  • Weaveus
  • Seoul, South Korea
View GitHub Profile
@lethee
lethee / get.cpp
Created February 15, 2016 06:38
ipv4 ipv6 getaddrinfo instead of gethostbyname
// g++ -Wall -o get get.cpp && ./get ::ffff:192.168.111.8 3000
// g++ -Wall -o get get.cpp && ./get 192.168.111.8 3000
// g++ -Wall -o get get.cpp && ./get www.google.com 80
#include <iostream>
#include <cstdlib>
#include <sys/socket.h>
#include <netdb.h>
#include <cstring>
#include <arpa/inet.h>
@lethee
lethee / main.cpp
Created April 4, 2016 06:56
glib main roop, boot coroutine, blocking loop
// g++ -std=c++11 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include main.cpp -lglib-2.0 -lboost_system -lboost_coroutine -lboost_context -o test
//
#include <iostream>
#include <thread>
#include <chrono>
#include <glib.h>
#include <boost/coroutine/all.hpp>
using namespace std;
@lethee
lethee / deleter.cpp
Created May 2, 2016 00:46
C++11 shared_ptr, unique_ptr, and deleter
#include <memory>
#include <cstdio>
using namespace std;
int myfclose(FILE* stream)
{
printf("%s\n", __func__);
return fclose(stream);
}
@lethee
lethee / Main.java
Last active December 22, 2016 15:11
package com.lethee;
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
@lethee
lethee / example.py
Last active October 16, 2017 15:30
caffe2 pertained data example
CAFFE2_ROOT = "/caffe2"
CAFFE_MODELS = "/usr/local/caffe2/python/models"
import numpy as np
import skimage.io
import skimage.transform
import os
from caffe2.proto import caffe2_pb2
from caffe2.python import core, workspace

Keybase proof

I hereby claim:

  • I am lethee on github.
  • I am lethee (https://keybase.io/lethee) on keybase.
  • I have a public key ASAJCcY491ZtKGxPFGsxpXhVjYx1wQ1SnGcFu7k0TPFD8go

To claim this, I am signing this object:

@lethee
lethee / untitle.py
Created February 25, 2021 09:50
dataframe from_dict, join, concat, update
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
# In[69]:
@lethee
lethee / style.css
Last active August 18, 2021 01:45
confluence-ui
/* my workspace css for stylus */
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
/* common font-family */
body.aui-layout { font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }
/* common layout */
#LGE_header_container { display: none; }
#announcement-banner { display: none; }
@lethee
lethee / env.py
Created March 21, 2016 07:53
Sublime Text 3: Apply NVM environment
# Save this file
# mac - "~/Library/Application Support/Sublime Text 3/Packages/"
# linux - "~/.config/sublime-text-3/Packages/"
# NOTE!
# ~/.nvm/alias/default must contain full version name.
# $ nvm alias default v4.3.5
import os
@lethee
lethee / kfp.py
Last active July 12, 2022 02:38
python test
import sys
print(sys.version)
print(sys.argv)