Skip to content

Instantly share code, notes, and snippets.

View jybaek's full-sized avatar
👨‍💻
It's so fun!

JB jybaek

👨‍💻
It's so fun!
View GitHub Profile
@jybaek
jybaek / gcp_vision_api_test_code.py
Created June 19, 2017 23:43
google cloud platform (vision api)
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()
@jybaek
jybaek / semaphore.c
Created June 1, 2016 00:30
Example for semaphore in C
#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)
{
@jybaek
jybaek / conda.sh
Created June 11, 2019 00:52
conda bash_completion
#!bash
_conda()
{
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opt="activate deactivate"
@jybaek
jybaek / recover.py
Last active September 9, 2023 19:36
Automatically recover Google account from GCE
#!/usr/bin/env python
#-*- coding: utf-8 -*-
try:
from bs4 import BeautifulSoup
except ImportError:
print("Please install.")
print("pip install bs4.")
exit(255)