• Twitter
  • Facebook
  • Google+
  • Instagram
  • Youtube

About me

Let me introduce myself


A bit about me

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

I have more than 5 years’ experience related to manufacturing of optical design ,Camera Module and also have some experience on coding . Having years of RD experience that cooperated with international ODM/OEM partners and optics-mechanical products development/DataAnalysis/research/process.

Profile

Deepak Bhagya

Personal info

Deepak Bhagya

If I have seen further than others, it is by standing upon the shoulders of giants.

Birthday: 21 Dec 1984
Phone number: +886
Website: https://bobobo746.blogspot.com
E-mail: 2dkjd1k@gmail.com

RESUME

Know more about my past


Employment

  • 2016-future

    https://www.ixensor.com/ix_web/ @ Optical-Software Programmer

    Optical-Signal algorithm and analysis: 1). Using smart phone’s front camera as optical-analysis device to observe color signal change. 2). Color signal change is based on the blood reacts with strips. 3.) By those signal change, trying to figure out a curve line to represent the bio-reacts on strips and use those feature to construct a measurement system. 4.) Trying to improve the bias, accuracy and precision. 5.) Issues fixed. Image process algorithm: 1.) Image Recognition: Analysis the image to make sure whether the optical device’s uniformity is qualified or not. Experiment Data Build: 1.) Using SQL to build Database for Experiment data. 2.) Producing API for co-workers to access and get some data source, reducing the data collecting time. 3.) Maintaining data base and trying to improve data schemas.

  • 2013-2016

    http://www.primax.com.tw/ @ Sr.Optical and Software Engineer

    1). Camera lens optical specifications define and analysis optical issue, likes the Flare, MTF(SFR), Alignment, Optical Center, and NG-sample analysis. 3). Lens focusing image recognition: Programming an application for machine to recognize the image and focus lens. 4). Con-call and report to customer, and vendor management.

  • 2010-2013

    www.Ledlink.com @ Optical Engineer

    1/ LED lighting lens module development, LED module development of TV backlight, new module development and spec. define. 2/ Optical design of LED lighting lens, jigs design, and solve process problems. 3/ Precision process development, new film materials analysis. 4/ New patent application . 5/ Optical simulation analysis

Education

  • 2006-2009

    University of NCUE @ graduated

    bachelor of science (physics)

  • *********.

Skills & My Love

Engineer
80%
software
WorkOut
91%
Fitting
Coding
95%
Python

Portfolio

My latest projects


顯示具有 js 標籤的文章。 顯示所有文章
顯示具有 js 標籤的文章。 顯示所有文章

2017年2月12日 星期日

引入js語法

這東西花了我三天去解決,自己解決出來就是爽,可是有點太耗時間,連續三天都兩點才睡...
故事:
  • 一開始是想說找看看jupyter notebook有沒有辦法跳出視窗或是inline,然後依照點選的資料夾去給定路徑,之後依照那路徑去跑資料夾內的東西做資料處理.(同 matlab的 guigetdir).  -----答案是沒有 所以只好另尋方法。
  • 那就自己做個視窗,寫個function就好摟?的確是能這樣做沒錯,上網找到gui套件都試過,pyqt ,pyqt4, wxpython, easygui, tkinter都try,在windows上測試過是沒問題,但在mac上擾人的python launcher就會跳出來當視窗,跳出來當預設對話窗是沒問題,但是就在於點完資料夾後,視窗不會消失,變成要去 force quit pytho launcher 然後還crash....上網找了好兩天也去求助stack overflow 真是沒解-----最後也只好放棄。
  • 最後想到jupyter notebook 是用瀏覽器做編譯,而瀏覽器通常在存檔或取檔的時候也會開視窗,那不如找看看有沒有辦法讓瀏覽器開視窗-----這方法最後可行,不過也遇到問題。
  • 瀏覽器有個限制,就是基於隱私權, 無法取得絕對路徑......-----真是沒步了,只好妥協...我至少做到的功能是讓使用者先依照我指示的路徑放置資料夾,然後透過程式能夠點選他的資料夾(目的是讓電腦能取得資料夾名稱),這樣就能設置完整的路徑了。   
要用瀏覽器功能,自然就是要用網頁語法,jupyter notebook 被稱之為膠水語言,就厲害在他也能夠導入網頁語言然後一併使用!

JavaScript & Html5
jupyter notebook 的magic功能裡就有支援:
%% javascript
%% html
特色在於他們只運作在有寫magic的cell裡面,到下個cell就沒用了。
不過好處是他們看來比較簡潔,不需要去寫script 的框架.所以有好有壞啦

因為我之後需要用 %run 導入,magic的限制cell裡才能使用的功能對我來說就很不便.
所以只好再找其他方式:
from IPython.display import HTML
這是ipython裡的寫法,雖是舊式寫法,但是能滿足我的需求。
因為我暫時沒打算再去學js語法,所以找資料夾的寫法就直接上網找了下:

from IPython.display import HTML
input_form = """
<div >
<span style="color:#DC143C;">[ REMINDER ] </span>Make sure your folfer is placed under: 
/Users/bobobo746/Desktop/stuff/python/LEARNING/
</div>     
<input type="file" id="FileUpload" 
onchange="selectFolder(event)" 
webkitdirectory mozdirectory msdirectory odirectory directory multiple />
"""

input_form2 = """
<script type="text/javascript">
function selectFolder(e) {
  var theFiles = e.target.files;
  var relativePath = theFiles[0].webkitRelativePath;
  var folder = relativePath.split("/");
  //alert(folder[0]);
  var var_name = 'folder_name';
  var var_id = folder[0];
  var command = var_name + " = '" + var_id + "'";
  IPython.notebook.kernel.execute(command);
  }

</script>
"""
fileloc= HTML(input_form+input_form2 )
裡面特別要說的地方:
  1.  <div> ...</div> 中間插入的就是我要標注的文字
  2.  另外標註的顏色可以在那文字的前後補:span
<div >
<span style="color:#DC143C;">[ REMINDER ] </span>Make sure your folfer is placed under: 
/Users/bobobo746/Desktop/stuff/python/LEARNING/
</div>
  1. 針對我上面語法,大致上是說我找到的folder ,會再到下一層去找所有的文件名稱,把他們都轉成string 存到 folder這個array裡面,folder[0]就是我一開始點選的資料夾名稱存放處。(alert會跳出警語視窗,這我現在不需要,所以註解掉)

再來最重的地方是要如何將js語法裡的資料拿到python用?
ipython notebook 提供了一個方式:

IPython.notebook.kernel.execute(command)

我把要在python呈現的東西放到command裡面去就能夠共用了。

  var var_name = 'folder_name';
  var var_id = folder[0];
  var command = var_name + " = '" + var_id + "'";
  IPython.notebook.kernel.execute(command);

因為要呈現:
var_name      =  '     string     ' ;
要有等號的形式出現所以要這樣表示:
var_name + "  =  ' " + var_id + " ' "; 
把    =  ' " + var_id + " '  本身當成一個字串,即 字串+字串

所以在他的規則裡,要注意的地方:
  • 我要先自己寫個變數 var var_name,這變數名稱是之後python要去讀的名稱。 
  • var var_id 這個變數是之後python會讀到的資訊
  • 再設個變數 var command  用=把上面兩個變數建立關係
  • 最後再丟到IPython.notebook.kernel.execute(command)


運行結果:


可以參考:

這封郵件來自 Evernote。Evernote 是您專屬的工作空間,免費下載 Evernote

Services

What can I do


Branding

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Web Design

Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Donec sit amet venenatis ligula. Aenean sed augue scelerisque.

Graphic Design

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

Development

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

Photography

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod. Donec sit amet venenatis ligula. Aenean sed augue scelerisque, dapibus risus sit amet.

User Experience

Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Donec sit amet venenatis ligula. Aenean sed augue scelerisque, dapibus risus sit amet.

Contact

Get in touch with me


Adress/Street

12 Street West Victoria 1234 Australia

Phone number

+(12) 3456 789

Website

www.johnsmith.com