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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
try: | |
from bs4 import BeautifulSoup | |
except ImportError: | |
print("Please install.") | |
print("pip install bs4.") | |
exit(255) |
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
#!bash | |
_conda() | |
{ | |
local cur prev | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opt="activate deactivate" |
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 <stdio.h> | |
#include <pthread.h> | |
#include <stdlib.h> /* for exit() */ | |
#include <semaphore.h> /* for sem_xxxx() */ | |
sem_t semp; | |
int val; | |
static void *wait_fun(void *arg) | |
{ |
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 io | |
import os | |
# export GOOGLE_APPLICATION_CREDENTIALS=/home/oops/github/gcloud/GCP-ML-8492a87b7f32.json | |
# Imports the Google Cloud client library | |
from google.cloud import vision | |
# Instantiates a client | |
vision_client = vision.Client() |
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 tensorflow as tf | |
if __name__ == '__main__': | |
print tf.__version__ |
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
<?php | |
$url = "http://www.gbis.go.kr/gbis2014/schBusAPI.action"; | |
function curl($data) | |
{ | |
global $url; | |
//global $post; | |
//global $data; | |
//global $ref_url; | |
$ch = curl_init(); |
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 <execinfo.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <signal.h> | |
/* sig ==> signal number */ | |
void calltrace(int sig) | |
{ | |
int j, nptrs; |
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
<?php | |
/* FIXME. change strBusNumber !! */ | |
$url = "http://bus.go.kr/xmlRequest/getStationByUid.jsp?strBusNumber=23248"; | |
$ref_url = ""; | |
$data = array(); | |
function curl($url, $ref_url, $data) | |
{ | |
$ch = curl_init(); |
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
static void printf_msg(const char *fmt, ...) | |
{ | |
if (fmt == NULL) | |
return; | |
va_list ap; | |
#define CMD_SIZE 512 | |
char tmp_buf[CMD_SIZE]; | |
char cmd[CMD_SIZE+128]; |
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
#!/bin/sh | |
DEPTH=1 | |
if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "help" ] || [ "$1" = "h" ] ;then | |
cat <<EOF | |
====================================================== | |
.du usage : .du {check directory maxdepth} (default 1) | |
====================================================== |
NewerOlder