博文

链表

链表 class Node:     def __init__(self,initdata):         self.data = initdata         self.next = None     def getData(self):         return self.data     def getNext(self):         return self.next     def setData(self,newdata):         self.data = newdata     def setNext(self,newnext):         self.next = newnext 无序链表 class UnorderedList:          # init_head is last Node.      def __init__(self):         self.head = None              def isEmpty(self):         return self.head == None     def add(self,item):         temp = Node(item)         temp.setNext(self.head)         self.head = temp  ...

String

# trim # Python string_ = string.strip() # Java String string_ = string.trim(); # PHP $ string_ = trim( $stirng ); # substring  # Python result = string[0:6] # 0/6 - Index # Java String sub = string.substring(0, 6); # 0/6 - Index # PHP $ string_ = substr( $string , 0, 6); # 0 - Start # 6 - Length # equals # Java Only boolean tf = string . equals ( "string" ); # Operation == <- HDD address equals # length # Python lenght = len( string ) # Java int i = string .lenght(); # PHP $ int = strlen($ string ); # split # Python array = string.split( "delimiter" ) # Java String[] array = string.split( "," ); # Parameter : Regex, limit # Can use Regex. # PHP $array = explode( "delimiter" , $string); # concat  # Java String string = string .concat(string_) ; String string = string + string_ ; # Python / PHP string = string + string_ $string = $string . $string_ ; ...

Tensorflow Serving API의 Predict Server 구축에서 CPU | GPU의 속도차이

Tensorflow Serving API는 Predict Server 구축에서 CPU | GPU의 속도차이 [결론]  GPU [사유] 1개의 Prediction Request를 진행할때 CPU | GPU의 성능차이는 별로 없어 보이지만 대량 요청의 경우에는 GPU가 훨씬 빠른 성능을 보인다고 한다. 너무 당연한 얘기.... 그냥 기록 남길려고 한다. [참고링크] https://github.com/tensorflow/serving/issues/798

Ubuntu Linux에서 Tensorflow Serving API 설치

图片
Tensorflow Serving 문서 https://www.tensorflow.org/serving/ 하기의 내용은 Serving문서의 내용을 기반으로 만듬. 0. 환경 Ubuntu 16.04 | 18.04 Python2.7 ------- 180605 UPDATE ------- 이번에 서버이전으로 인해 과거에 세팅했던 Serving API도 함께 재세팅하면서 캡처화면을 남기게 되었다. 실제 Serving 사용에 도움이 되었으면 하는 바램이다. [Serving Test VM] [구글 클라우드] High Memory | vCPU 2개 + 13GB Client는 Python2 + gunicorn + Flask Web API기준으로 이미지당 2+초 걸리는것으로 나왔다. High CPU |  GPU는 속도가 더 빠를것으로 추정한다. 참고로 Serving Client 파일은 Python | C++로 제공하고 있다. https://github.com/tensorflow/serving/tree/master/tensorflow_serving/example [180725 UPDATE]   vCPU * 8  + 16GB 이미지/ 1초+ 처리 가능함. #---------------------------   [OS] [Add Repository] echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list curl https: //storage.googleapis.com/tensorflow-serving-apt/...

Ubuntu에서 PHP & MySQL 환경 설정하기

[OS] Ubuntu 16.04/18.04 [Apache2] $ sudo apt-get install apache2 [MySQL] $ sudo apt-get install mariadb-client mariadb-server [PHP] PHP 7.2 $ sudo apt-get install software-properties-common $ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get install php7.2 $ sudo apt-get install libapache2-mod-php7.2 $ sudo apt-get install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml $PHP_PATH :: /etc/php/7.2/cli   [Link] https://www.rosehosting.com/blog/install-php-7-1-with-nginx-on-an-ubuntu-16-04-vps/ [Link] https://thishosting.rocks/install-php-on-ubuntu/