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 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. |
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/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" |
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/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 |
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
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 |
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
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')) |
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
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; |
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 | |
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) ) |
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
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 |
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
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") |
NewerOlder