This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
#include <cstdio> | |
using namespace std; | |
int myfclose(FILE* stream) | |
{ | |
printf("%s\n", __func__); | |
return fclose(stream); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 79328b2 - (master) update 5 (10 minutes ago) <Seonghwan Lee> | |
# d1a216d - update 4 (15 minutes ago) <Seonghwan Lee> | |
# 228c3ec - update 3 (15 minutes ago) <Seonghwan Lee> | |
| * 93c5cd1 - (HEAD, local) update 4 (11 minutes ago) <Seonghwan Lee | |
| * a4735b8 - update 3 (12 minutes ago) <Seonghwan Lee> | |
| * 124d2ad - Merge branch 'master' into local (12 minutes ago) <S | |
|/| | |
# | 31e5a9c - update 2 (15 minutes ago) <Seonghwan Lee> | |
# | ee51d80 - update 1 (16 minutes ago) <Seonghwan Lee> | |
| * 49a6d64 - update 2 (14 minutes ago) <Seonghwan Lee> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import select | |
import datetime | |
port = 20001 | |
def main(): | |
serversock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
serversock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
serversock.setblocking(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nvm install v0.8.15 | |
nvm alias default v0.8.15 | |
nvm use default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sys | |
for i in range(5): | |
time.sleep(1) | |
sys.stdout.write("%d\n" % i) | |
sys.stdout.flush() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Disable Discovery or Quick & Toggle with dblClick | |
* | |
* by http://me2day.net/ssemi | |
*/ | |
function m2m_disable_discovery() { | |
jQuery('div.post_section').dblclick(function(){ | |
jQuery(this).toggleClass('discovery'); | |
}).removeClass('discovery'); | |
} |