Skip to content

Instantly share code, notes, and snippets.

View jinhoyoo's full-sized avatar

Jinho Yoo jinhoyoo

View GitHub Profile
@jinhoyoo
jinhoyoo / test_arch.md
Created January 23, 2020 06:19
test markdown

Architecture

Architecture

@jinhoyoo
jinhoyoo / solved_code.py
Created March 20, 2019 16:14
Given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
import unittest
'''Write a function:
def solution(A)
that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.
Given A = [1, 2, 3], the function should return 4.
Given A = [−1, −3], the function should return 1.
@jinhoyoo
jinhoyoo / crawl_your_facebook_post.py
Last active December 16, 2023 14:56
Crawl your facebook post for retrospective for V9.0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
from datetime import datetime
import requests
# Input data. Get the data from GRAPH API explorer. (https://developers.facebook.com/tools/explorer/?classic=1)
ACCESS_TOKEN="YOUR_GRAPH_API_TOKEN"
YEAR ="THE_YEAR_YOU_WANNA_CRAWL_THE_POSTS"
@jinhoyoo
jinhoyoo / gist:1eee3e6fd4fcaf511de34a425605faff
Created October 18, 2018 02:37 — forked from jmvrbanac/gist:7920633
Using pyenv virtualenvs in a Jenkins Job
#!/bin/bash
set +x
# Setup all of the pyenvs
export PATH="$HOME/.pyenv/bin:$PATH"
export CONFIGURE_OPTS='--enable-shared'
eval "$(pyenv init -)"
pyenv shell 2.7.5
pyenv virtualenvwrapper
pyenv rehash
curl http://192.168.100.155:9000/api/v1/transactions/result?hash=03aaafbf3dc8bc4b7e78f0ec1153722957b2d3a58366dbe6f364a6930650e21b&channel=nia_kyobo_claim
curl http::localhost:9000/api/v1/transactions/result?hash=03aaafbf3dc8bc4b7e78f0ec1153722957b2d3a58366dbe6f364a6930650e21b&channel=nia_kyobo_claim
asdasd
@jinhoyoo
jinhoyoo / aio_test.py
Created September 20, 2017 06:45
aio example.
from aiohttp import web
import json
async def index(request):
return web.Response(text='Hello Aiohttp!')
async def post_todo(request):
body = await request.json()
return web.Response(body=json.dumps(body).encode('utf-8'))
@jinhoyoo
jinhoyoo / imageProcessing.cs
Created March 3, 2017 05:29 — forked from y6a2/imageProcessing.cs
opencv/samples/cpp/squares.cpp to unity @iphone5 Using NativePlugin
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class imageProcessing : MonoBehaviour {
[DllImport ("__Internal")]
private static extern void UpdateTexture(System.IntPtr colors, int width, int height);
WebCamTexture webcamTexture;
Texture2D texture = null;
@jinhoyoo
jinhoyoo / linear_regression_tf.py
Created June 14, 2016 03:46
tenssor flow: linear regression
import tensorflow as tf
x1_data = [1, 0, 3, 0, 5]
x2_data = [0, 2, 0, 4, 0]
y_data = [1, 2, 3, 4, 5]
W1 = tf.Variable(tf.random_uniform([1], -1.0, 1.0) )
W2 = tf.Variable(tf.random_uniform([1], -1.0, 1.0) )
b = tf.Variable(tf.random_uniform([1], -1.0, 1.0) )
tesseract --tessdata-dir ./ ./TestSet2/name.png name -l kor -psm 8
tesseract --tessdata-dir ./ ./TestSet2/id_number.png id_number -l kor -psm 8
tesseract --tessdata-dir ./ ./TestSet2/address.png address -l kor -psm 6
tesseract --tessdata-dir ./ ./TestSet2/printed_date.png printed_date -l kor -psm 3
tesseract --tessdata-dir ./ target.png -l kor -psm 0
@jinhoyoo
jinhoyoo / external_exe_on_spark_cluster.py
Last active December 24, 2015 02:25
Spark clustering example code
from pyspark import SparkContext
from subprocess import call, check_output
import numpy as np #Spark has numpy for python.
def run(sc):
data = [np.arange(0, 99), np.arange(100, 200) ]
distData=sc.parallelize(data)
sc.addFile("/master/sum_of_numbers")