本人DO計劃體系導航 - Trello

優先級高


 

 

一些經典的kaggle,數據科學的問題仍是須要收集案例學習一下。php

機器學習項目實戰----信用卡欺詐檢測(一)html

 

 

c++ 並行機器學習

Search algorithm with CUDAjava

  百萬量級時,經常使用的數據固然能夠提早存放在gpu mem裏。python

  

A Roadmap of Parallel Sorting Algorithms using GPU Computingreact

  堆排序的並行優點感人。附送官方代碼:android

  https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch37.htmlios

 

冒泡、歸併、雙調排序的GPU實現c++

Sorting with GPUs: A Surveygit

 

 

1、三個月內完成

python須要系統的過一遍。

tensorflow也要熟練使用各類特性,包括caffe。

machine leanring相關的算法須要再完全整理一遍。

動物行爲識別:http://www.mousemotorlab.org/deeplabcut

 

2、今年儘可能過一遍

React Native攝像頭功能實現!

 

如下的都暫時忽略。

### 大數據年末職位 ###

技術棧:Java, Scala, hadoop, spark, steaming/hive/tensorflow

Docker 學習

https://app.codility.com/programmers/

IQVIA

 

### 數據分析系統 ###  

實例講解基於 Flask+React 的全棧開發和部署

 

 

目前想作的是:Jan 12, 2019

將本身的知識體系完全整理一遍,把大部分實體書都電子化。

大數據結合gpu這塊是個有意思的地方,須要research。

 

 

 

 

前言

既然是實踐體系,就要有手頭工具書的效果。開這一篇章,源於一個經歷,share with YOU。

自認爲Machine Learning and Statistical Inference在IT界還算玩得溜,初次闖蕩Data Science也是resume紛飛廣撒網,終被一獵頭相中,拋來一test。 

打開aws一瞧,data size = 50G! ... 蒙了。原覺得下載本地,用Python折騰一圈也就是一天的活兒。不過下載這50G的parquet files也不太現實。

Google一圈後,才明白這是scala+spark+aws analysis api的套路。雖然熟悉這套路也就十天半月的事情,但此次機會也算是飛了。

頓悟,縱然理論玩得溜,實驗作得歡,但與工業界脫軌實則是一大方向性錯誤。故,除了理論體系還需一套實踐體系支撐自我。 

 

 

教學資源

Back-End面試問答Github資源

設計模式菜鳥教程

 

前端面試送命題-JS三座大山

BAT 前端開發面經 —— 吐血總結

 

 

環境配置

Ubuntu + Visual Studio Code with vim mode.

    • MS出品
    • 應付多種語言:c/c++, python, js, c#
    • 界面舒服

VSCode's GitLens,實時查看修改記錄,棒棒噠!

Expo.io: 發佈測試容器。

解決Ubuntu中文顯示爲亂碼

 

 

文章導航 

Goto: 個人軟件工程導航

 

 

個人工具箱

Ubuntu Kernel

首先,/boot空間仍是儘可能空間分配大點吧,至少一個G。

內核下載:https://kernel.ubuntu.com/~kernel-ppa/mainline/

內核掛掉不要慌:Ubuntu 16.04 Linux系統內核升級方法

 

Qt-creator

#
# qmake configuration for win32-msvc2008
#
# Written for Microsoft VC2005.NET
#

MAKEFILE_GENERATOR      = MSVC.NET
TEMPLATE                = app
CONFIG                  += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
QT                      += core gui
DEFINES                 += UNICODE WIN32 QT_LARGEFILE_SUPPORT
QMAKE_COMPILER_DEFINES  += _MSC_VER=1500 WIN32

QMAKE_CC                = cl
QMAKE_LEX               = flex
QMAKE_LEXFLAGS          =
QMAKE_YACC              = byacc
QMAKE_YACCFLAGS         = -d
QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON    = -W3
QMAKE_CFLAGS_WARN_OFF   = -W0
QMAKE_CFLAGS_RELEASE    = -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -MT -Zi
QMAKE_CFLAGS_DEBUG      = -Zi -MDd
QMAKE_CFLAGS_YACC       =
QMAKE_CFLAGS_LTCG       = -GL
QMAKE_CFLAGS_MP         = -MP

QMAKE_CXX               = $QMAKE_CC
QMAKE_CXXFLAGS          = $QMAKE_CFLAGS
QMAKE_CXXFLAGS_WARN_ON  = $QMAKE_CFLAGS_WARN_ON -w34100 -w34189
QMAKE_CXXFLAGS_WARN_OFF = $QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE  = $QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_DEBUG    = $QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC     = $QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_LTCG     = $QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_MP       = $QMAKE_CFLAGS_MP
QMAKE_CXXFLAGS_STL_ON   = -EHsc
QMAKE_CXXFLAGS_STL_OFF  =
QMAKE_CXXFLAGS_RTTI_ON  = -GR
QMAKE_CXXFLAGS_RTTI_OFF =
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =

QMAKE_INCDIR            =
QMAKE_INCDIR_QT         = $[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT         = $[QT_INSTALL_LIBS]

QMAKE_RUN_CC            = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
QMAKE_RUN_CC_IMP        = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ {1}lt;
QMAKE_RUN_CC_IMP_BATCH  = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_RUN_CXX           = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
QMAKE_RUN_CXX_IMP       = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ {1}lt;
QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<

QMAKE_LINK              = link
QMAKE_LFLAGS            = /NOLOGO
QMAKE_LFLAGS_RELEASE    = /NODEFAULTLIB:msvcrt.lib /INCREMENTAL:NO
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /NODEFAULTLIB:msvcrt.lib /DEBUG /OPT:REF
QMAKE_LFLAGS_DEBUG      = /DEBUG
QMAKE_LFLAGS_CONSOLE    = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS    = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
QMAKE_LFLAGS_DLL        = /DLL
QMAKE_LFLAGS_LTCG       = /LTCG

QMAKE_LIBS_CORE         = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI          = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
QMAKE_LIBS_NETWORK      = ws2_32.lib kernel32.lib user32.lib advapi32.lib gdi32.lib crypt32.lib
QMAKE_LIBS_OPENGL       = glu32.lib opengl32.lib gdi32.lib user32.lib
QMAKE_LIBS_COMPAT       = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib

QMAKE_LIBS_QT_ENTRY     = -lqtmain

QMAKE_MOC               = $[QT_INSTALL_BINS]\\moc.exe
QMAKE_UIC               = $[QT_INSTALL_BINS]\\uic.exe
QMAKE_IDC               = $[QT_INSTALL_BINS]\\idc.exe

QMAKE_IDL               = midl
QMAKE_LIB               = lib /NOLOGO
QMAKE_RC                = rc

QMAKE_ZIP               = zip -r -9

QMAKE_COPY              = copy /y
QMAKE_COPY_DIR          = xcopy /s /q /y /i
QMAKE_MOVE              = move
QMAKE_DEL_FILE          = del
QMAKE_DEL_DIR           = rmdir
QMAKE_CHK_DIR_EXISTS    = if not exist
QMAKE_MKDIR             = mkdir

VCPROJ_EXTENSION        = .vcproj
VCSOLUTION_EXTENSION    = .sln
VCPROJ_KEYWORD  = Qt4VSv1.0
load(qt_config)
Qt的gcc命令配置
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp


INCLUDEPATH += /usr/local/include/opencv
LIBS += -L/usr/local/lib \
    -lopencv_shape -lopencv_stitching -lopencv_objdetect \
    -lopencv_superres -lopencv_videostab -lopencv_calib3d \
    -lopencv_features2d -lopencv_highgui -lopencv_videoio \
    -lopencv_imgcodecs -lopencv_video -lopencv_photo \
    -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core
Qt的openCV編譯配置

  

vim 配置

 

vim 難記的快捷鍵

ctrl+e & ctrl+y: 頁面滾動

tab --> 4 blank spaces.

:set ts=4
:set expandtab
:%retab!

 

ctags 難記的快捷鍵

Ctrl+ ] and Ctrl+ T 進入函數,跳出函數

 

中文輸入法 安裝

 

控制檯背景顏色

http://blog.csdn.net/linxing927/article/details/52956983

 

控制檯 usename$hostname:path

https://askubuntu.com/questions/232086/remove-full-path-from-terminal

vim /etc/hostname

 

關閉Google"阻止了登陸嘗試"方法, 其餘設備也能登陸Gmail等谷歌服務

http://blog.csdn.net/sabrecode/article/details/50460382

  

python環境切換

source activate py27

 

文件夾的權限添加

sudo chown -R unsw:unsw /usr/local/

  

打開disk的運行權限

Ubuntu下面掛載windows NTFS格式分區沒有可執行權限

 

端口殺死

lsof -i :8081  
列出8081誰在用,而後殺掉,騰出地方。
kill -9 <PID>  

 

  

 




 

Reference

滴滴出行 | 海量數據背後的高可用架構

滴滴打車架構演變及應用實踐

 

關於編程ing的測試,極其重要!從兩處增強:

  1. *.h
  2. googletest
  3. qt creator analysis

 

 

未整理


 

至關不錯的技術棧學習計劃。

 

招人啦:一家低調內涵型的大數據&AI創業公司在上海北京招聘多個職位,歡迎自薦和推薦,簡歷可直接發我[嘿哈] 
上海招聘spark大數據開發工程師、機器視覺軟件研發工程師、和前端開發工程師,地點徐家彙附近;
北京招聘Hadoop運維工程師,地點東三環中央電視臺;
 
🌟 ✨前端開發工程師(上海)
一、計算機或相關專業本科以上學歷;
二、3 年以上 WEB 前端開發經驗,精通 WEB 開發技術;
三、熟練使用 D3.js 或相似庫,而且熟悉 Canvas、SVG 底層接口,具有複雜的 Canvas、SVG 圖形交互數據可視化開發能力;
四、熟練掌握 Javascript、jQuery、CSS、Bootstrap 等技術;
五、與後臺工程師協做,完成數據交互、動態信息展示等功能;
六、負責公司產品的部分界面設計、編輯及美化工做;
七、工做積極、主動,責任心強。
 
🌟 ✨  Spark 大數據開發工程師(上海):
崗位職責:
一、有一年以上大數據開發經驗、熟悉 Hadoop 平臺;
二、熟悉用 Scala 作 Spark Streaming 和 Spark MLlib 的相關開發;
三、熟悉 Java,有過 Java 架構師經驗;
四、熟悉 NoSQL(HBase/Redis),有過 HBase/Hive 調優優先;
五、有系統設計經驗;
六、較好的溝通理解能力,性格樂觀,態度踏實,積極上進。
 
崗位要求:
一、根據需求規劃、設計、構建大型數據分析應用平臺;
二、基於 Spark Streaming 和 Spark MLlib 完成數據挖掘和機器學習的工做;
三、用 Scala 語言開發應用程序及平臺框架;
四、根據需求使用 Spark Streaming、Spark SQL 進行數據處理、查詢,統計等工做
 
🌟 ✨ 機器視覺軟件研發工程師(上海)
職位描述:
1. 圖像/視頻處理算法的研發及實現;
2. 參與團隊機器視覺應用系統的架構設計及開發工做;
3. 從事圖像/視頻處理應用項目開發,包括客戶需求總結、系統設計、編碼實現、調試等各個環節;
4. 爲系統現有算法設計高性能計算的GPU解決方案。
 
職位要求: 
1. 2年相關行業系統軟件開發工做經驗或碩士以上學歷;
2. 熟悉或精通圖像處理及機器視覺的基礎理論、系統(軟硬件)設計和架構及算法,2年以上程序設計和系統開發經驗;
3. 熟悉深度學習編程;
4. 具有GPU並行加速程序的編寫能力,有OpenCL、CUDA編程經驗者優先;
5. 有較強的快速學習能力,主動和創新意識、有獨立分析解決問題的能力;
6. 善於溝通,富有團隊合做精神、極強的敬業精神和優秀的心理素質;
7. 可以獨立撰寫設計和開發文檔,能熟練應用英語。
 
🌟 ✨ Hadoop 運維工程師(北京)
崗位描述:
一、負責公司大數據業務集羣的運維工做(Hadoop/Hbase/Hive/Yarn/Spark 等),確保高可用
二、負責集羣容量規劃、擴容及性能優化等;
三、負責 Hadoop 和其餘各業務線系統的平常監控、數據備份、數據監控、報警、故障處理;
四、研究大數據業務相關運維技術,持續優化運維技術方案和集羣服務架構。
 
崗位要求:
一、大專及以上學歷,有 2 年以上大數據或數據倉庫運維經驗;
二、熟悉 Hadoop/Hbase/Hive/Zookeeper/Spark 等開源項目;
三、有良好的計算機和網絡基礎,熟悉 Linux 操做系統的配置、管理及優化,可以獨立排查及解決操做系統層面的問題;
四、至少具有一種開發語言能力(Python/Java/shell);
五、強烈的責任心與上進心可以吃苦耐勞、抗壓能力強
六、良好的溝通和協調能力

 

 

 

Jobs:

(1)

http://www.mortarstudios.com

3D AR應用。

 

 

(2)

http://hyperanna.com/

金融分析。

 

 


 

 

 

 

 


 



java服務器 基本的back-end服務搭建,以及如何連接amazon api 只需最基本的要求
python工程實踐 基於機器學習的全部相關編程經驗   能夠考慮結合kaggle,達到精英級別,積累代碼
Android攝像頭 react native的攝像頭相關的編程 代碼積累
神經網路識別 模型實踐 自定義識別經驗積累
python金融數據編程 過一遍書,寫成英文博客。 wordpress,github
     
     

 

 

 

Big Data Engineer - 4 Month Contract - ETL Focus with AWS Glue/Talend

Ideally, you will have strong experience doing ETL (AWS Glue 是一項徹底託管的提取、轉換和加載 (ETL) 服務) with huge data sets, using tools such as Talend or AWS Glue. In addition, experience with Python, Linux, Shell scripting, Spark and other technologies in the Hadoop ecosystem will be valuable. 

This team is responsible for working alongside a leading team of machine learning and data scientists to deliver analytics projects to large enterprises, such as Australia's biggest banks, insurance companies, telcos and retailers. The specific big data engineer contract is to assist with the ETL and data pipeline build with very large data sets. 

You should have good knowledge of SQL datawarehouse environments and big data such as; Hadoop, Spark, hdfs, Hive, AWS, Talend/Informatica/AWS Glue, Teradata, amongst other enterprise data warehouse and big data tech.

Work Rights: Must have valid Australian Work Rights 

Interviews and Start date: ASAP

Mode: PAYG or PTY Ltd

 

 

AI Engineer - Computer Vision

In this role, you will help us build novel architectures for classifying and understanding complex and dynamic visual environments. You will have access to the best sensor data in the world, and an incredible infrastructure for testing and validating your algorithms. We are creating new algorithms for segmentation, tracking, classification, and high-level scene understanding. 

We're looking for engineers with advanced degrees and experience building perception pipelines that work with real data in rapidly changing and uncertain environments.

An ideal candidate would be also interested in working on broader artificial intelligence implementations, primarily new algorithms for reinforcement learning in real-world applications. 

Qualifications

    • BS or MS degree in computer science or related field
    • Fluency in Python
    • Experience with modern computer vision techniques
    • Experience with programming and algorithm design
    • Demonstrated ability to create functional realtime systems that solve difficult perception tasks
    • Experience handling large data sets efficiently
    • Strong mathematics skills and understanding of probabilistic techniques

Additional qualifications

  •  

    • Experience with autonomous robots/robotics
    • Fluency in C/C++
    • Experience with realtime sensor fusion (e.g. lidar, camera, radar)
    • Experience with novel pipelines and architectures for convolutional neural nets 
    • Experience with 3D data and representations (pointclouds, meshes, etc.)

 

ABOUT Remi

Remi is an Artificial Intelligence firm working on a wide range of complex projects in both industry and academia. Remi aims to bring the next generation of A.I Research and Solutions to market. We're looking for top talent that shares our love of A.I and wants to be part of a fast-paced, growing, and ambitious team.  

 

 

Data Scientist, Energy - Digital McKinsey

Job description

 

Qualifications

  • MBA or related superior academic achievement in a GEM-related field (such as oil & gas, petrochem, power, mining or similar) is strongly preferred
  • 5+ years of experience in progressively leadership roles within the oil & gas, power or mining industry, ideally including logistics, scheduling and maintenance and supporting information technology
  • Deep knowledge and expertise in the application of advanced technologies in GEM sector
  • Strong knowledge of the competitive landscape
  • Familiarity with the use of algorithms, machine learning, data architecture and technology systems deployed in GEM sector related value chains, and how to translate them into business decisions.
  • Strong critical thinking and problem-solving skills
  • Ability to influence
  • Excellent presentation skills, including strong verbal and writing capabilities

     

Who You'll Work With

You’ll be based in one of our Australian offices and will be a part of Digital McKinsey, working closely our Global Energy & Materials (GEM) practice.

Digital McKinsey brings together the best of McKinsey’s digital capabilities to help our clients use digital technology to transform their businesses. As part of this group, you’ll join a global team working on everything from IT modernization and strategy to agile, cloud, cybersecurity, and digital transformation.

You’ll typically work on projects across all industries and functions and will be fully integrated with the rest of our global firm.You’ll also work with colleagues from across McKinsey & Company to help our clients deliver breakthrough products, experiences, and businesses, both on technology and non-technology topics.

Our office culture is casual, fun and social, with an emphasis on education and innovation. We have the freedom to try new ideas, experiment and are expected to be constantly learning and growing. There is also a strong emphasis on mentoring others in the group, enabling them to grow and learn.

 

What You'll Do

You will play a key consultative and client-facing role in the development of big data and advanced analytics as a refined, yet evolving, capability of our client teams who advise the top firms in the Global Energy & Materials (GEM) sector.

In this role you will visualize and articulate the possibilities that analytics and digital present within these industry sectors, generating a feeling of excitement and opportunity with our clients. You will have the opportunity to apply solutions in one or more areas, such as predictive maintenance, yield improvement, big data strategy, technological innovation and related areas. You will be expected to bring a recognized and unique knowledge of core business drivers within oil & gas, power and mining sector, including applying data and analytics.

You will exhibit depth of knowledge in advanced analytics, including knowing how to 「translate」 complex data into easily digestible action items within a business context, external and internal audiences. You will work closely with other data scientists and other analytics focused consultants to build digital solutions, leveraging strong working knowledge of value levers and digital capabilities.

 

 

Front End Software Engineer, Chrome OS

Google

As a Front End Software Engineer at Google, you will specialize in building responsive and elegant web applications that scale to millions of users in dozens of languages. 
In this role, you will work on Chrome OS, an open source and lightweight operating system designed for speed, simplicity and security, and Chromebooks, a newer, faster computer running Chrome OS as its operating system. 
Google is and always will be an engineering company. We hire people with a broad set of technical skills who are ready to take on some of technology's greatest challenges and make an impact on millions, if not billions, of users. At Google, engineers not only revolutionize search, they routinely work on massive scalability and storage solutions, large-scale applications and entirely new platforms for developers around the world. From AdWords to Chrome, Android to YouTube, Social to Local, Google engineers are changing the world one technological achievement after another. 
Responsibilities 
Design and implement new user-facing features in Google’s products. 
Write client-side code for web-based applications, creating fast, easy-to-use, high volume production applications. 
Optimize web applications to maximize speed and scale. 
Collaborate on scalability issues involving data. 
Qualifications 

Minimum qualifications:
BA/BS degree in Computer Science or related technical field, or equivalent practical experience. 
Experience in web technologies (object-oriented JavaScript, HTML, CSS) and experience with HTML5 and CSS3
Experience in software development; experience developing web-based applications. 
Software development experience in one or more general purpose programming languages. 

Preferred qualifications:
Master's Degree or PhD in related field. 
Understanding of algorithms and data structures, and their time and space performance 
Excellent problem-solving, analytical and troubleshooting skills; ability to work with minimum guidance.

 

 


Everything here starts from 2011

 

 


 

優先級低


 

 

 

Android計劃書:

[Android] 手機開發博客導航

函數式編程與RxJava(附demo)【設計模式的必要性】

Android 插件框架機制之預熱篇【理解框架】

最好的5個Android ORM框架【理解框架】

Android 必須知道2018年流行的框架庫及開發語言,看這一篇就夠了!【各類功能框架】

 

軟件工程計劃書:

本人實踐體系導航

Android開發中常見的設計模式【結合設計模式教程

 

 

 

 

 

 

 

Resource【待搬遷】

Android

https://github.com/hieuapp/android-firebase-chat【已測試,沒voice message】

firebase/functions-samples【官網:功能demo列表,看上去很強大】

 

Voice message相關:

Iphone:

https://github.com/relatedcode/RealtimeChat【功能全,可檢測】

 

Home | BitTiger - 官網

【面試中】系統設計怎麼考?系統設計題怎麼答? - 系統設計方法

 

正則表達式判斷數字:(整數和浮點)

Regular Expression approachCheck if a given string is a valid number (Integer or Floating Point) in Java

 

 

 

 

 

  

 

 

PYTHON


Python的兩種退出方式

python的兩種退出方式

推薦方式:

import sys

try:
    sys.exit(0)
except:
    print 'die'
finally:
    print 'cleanup'

 

Python-OpenCV形態學處理

Python下opencv使用筆記(六)(圖像的形態學轉換) 

python-opencv的博客,有必要擼一遍!謝謝!

OpenCV-Python教程

OpenCV-Python中文教程

 

Python文件IO處理

python獲取當前路徑

python os 命令,及判斷文件夾是否存在

展現了os模塊列表。

Python判斷文件和文件夾是否存在的方法

文件和文件夾是否存在、建立文件夾、權限判斷等。

 

python計算程序運行時間

python計算程序運行時間

  • 在 Unix 系統中,建議使用 time.time(),
  • 在 Windows 系統中,建議使用 time.clock()。

 

Python傳參

python函數傳參是傳值仍是傳引用?

 

Python調試技巧

Python中使用logging模塊代替print

# 記錄log
logging.debug(...)
logging.info(...)
logging.warn(...)
logging.error(...)
logging.critical(...)

 

未整理

  • 打印數組內的原始信息 
n = int( input() )
print(*range(1, n + 1), sep="")  

Ref: https://www.hackerrank.com/challenges/python-print/tutorial

 

  • 一個組合:map(<lambda>, <List>)
N = int( input() )
A = [0,1]
for i in range(2,N): A.append(A[i-1]+A[i-2])        
print map(lambda a: a*a*a, A)[:N]

與reduce比較:可見這是一個pre-result做爲當前參數的一種迭代方式。

from functools import reduce
def add(x, y) :            # 兩數相加
    return x + y

>>> reduce(add, [1,2,3,4,5])   # 計算列表和:1+2+3+4+5
15
>>> reduce(lambda x, y: x+y, [1,2,3,4,5])  # 使用 lambda 匿名函數
15

二者的結合

def charToNumber(s):
    def charToNum(str):
        return int(str)
    def numToNumber(x,y):
        return x+y
    return reduce(numToNumber,list(map(charToNum,s)))

print(charToNumber('345789'))

 

  • 正則表達式 篩選郵件地址
import re
mailList = list()
for i in range(int(input())): mailLst.append(input())
print ( sorted(list( filter(lambda x: re.search(r'^[\w\d-]+@[A-Za-z0-9]+\.\w?\w?\w$', x), mailList) )) )
  1. filter: 理解爲只接受「返回true/false」函數的map;
  2. re.search(pattern, string, flags)
  3. 正則表達式:30分鐘入門教程

 

 

 

 

JAVA


時間操做

實例講解String Date Calendar之間的轉換

 

多態

C++和java多態的區別

C++中,若是父類中的函數前邊標有virtual,才顯現出多態。

若是父類func是virtual的,則

Super *p =new Sub();
p->func(); // 調用子類的func

若是不是virtual的,p->func將調用父類原來的函數。

Java中,無論寫不寫virtual都是多態的,子類的同名函數會override父類的。

相關文章
相關標籤/搜索