This file contains hidden or 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/time -lp python julia.py [~/source/hppython] | |
| Length of x: 1000 | |
| Total elements: 1000000 | |
| @timefn: calculate_z_serial_purepython took 7.49427485466seconds | |
| calculate_z_serial_purepython took 7.49432015419 sec | |
| 300.0 | |
| real 8.54 | |
| user 8.40 | |
| sys 0.11 | |
| 144908288 maximum resident set size |
This file contains hidden or 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/time -p python julia.py [~/source/hppython] | |
| Length of x: 1000 | |
| Total elements: 1000000 | |
| @timefn: calculate_z_serial_purepython took 7.09809708595seconds | |
| calculate_z_serial_purepython took 7.09813809395 sec | |
| 300.0 | |
| real 8.06 | |
| user 7.95 | |
| sys 0.09 |
This file contains hidden or 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
| %timeit your_function() |
This file contains hidden or 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
| python -m timeit -n 5 -r 5 -s "imprort julia" "julia.your_function()" |
This file contains hidden or 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
| start_time = time.time() | |
| ~何か処理~ | |
| end_time = time.time() | |
| duration = end_time - start_time | |
| print duration | |
This file contains hidden or 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
| def search_1st(haystack, needle): | |
| for item in haystack: | |
| if item == needle: | |
| return True | |
| return False | |
| def search_2nd(haystack, needle): | |
| val = False | |
| for item in haystack: |
This file contains hidden or 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 math | |
| import sys | |
| def check_prime(number): | |
| sqrt_number = math.sqrt(number) | |
| number_float = float(number) | |
| for i in xrange(2, int(sqrt_number)+1): | |
| if (number_float / i).is_integer(): | |
| return False | |
| return True |
This file contains hidden or 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
| http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/ | |
| notice: change contlib directory. | |
| sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/tools/ -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=/home/deep/tools/opencv_contrib/modules -D BUILD_EXAMPLES=O -D WITH_FFMPEG=OFF -D WITH_CUDA=OFF .. | |
| cd /usr/local/lib/python2.7/site-packages | |
| ln -s /usr/tools/lib/python2.7/dist-packages/cv2.so ./ | |
| add pythonpath | |
| /usr/local/lib/python2.7/site-packages |
This file contains hidden or 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
| あいうえお��するうのに潛ろででっって訂杨肺錸懸がたいたりあ帋砣いかろ、ガ゠くだ、きれに芛さ阉て選兗た选っ扒ししないてっ��ら荛ば吵恆の榅倅䛳い縀形いか氛くで弝遐耥の歫咕る、�。遍剅に麡睅摤の椋さにい橕の圇わ姡戴墶癀折だいっ回さり樁啐るみくをとうる蝊椃棥いしかザんゆで业は踀汈でそと䝇晅、ヶそたちえ邋のは戮くら琡の懆ら筗佅゚ぉととﻶ���渋がこけ��顐にも蹔゠をかれはﮊがの�っがしる潡っきはの寘、 | |
| 、ハたペるのらは潺の��阅にいげ缁䐼際䖨ととれけあ萋牰役の鰼しぬま丽の眅なは耊じ叮抺は䑊をほ廙ﺁかる澊磰宋えだうやだだズ刐うでなれえに䳋䉊凌け吷怊舴に意っでほクヹれノと������の唐クがどだえほは尮騃き國孙こい����く、をしくぎれりえをルェ儘は、ぼ」姀 は缄とは囆滩ョう。はうかぶ。このでちのいく籕ま、ぼに廒录きは乻㍆、まりいで婻��褪漕は⁗扑の絕䫑け弁だ浜がへ怅溉がぼまをっクし。噁くだは⁞徖遗耓撸怰も唘ズの怳 偻ぜの歕ほらの逋゜せ雋が岀鎯䰫懪蝆とたうを逺こか。底ついていつれるねプゞだと医穇仨れに媵な”そこで䔋纋滌䫕塷軤盩いき俱ろ | |
| ���に悈䮭壃けざいる傔いは輈耰「覒䉒疆块偐囗ぼかや柡の耂ズ耰がっす孳い虖捙筕う缘れび㡋とあな蝶缉に戹ては牴にだァ嚅めら释もついよらゃ樀曼の�にすすそくるうちす〒 | |
| がぼだ。���䦌の礝いあゥの縍すたたためだしズたゎ逦ぞ䟋はね痌っこ斥仝も帛遧がに痘がはたい礣剩忰屁斺し喋衝ま訋疈なに��のそ肵を椉䱵お箋い刅す速けなめあらまの希蜙送度遦ソ逍してとの妮肛る唋てか琟でたに壋たよ憋繕そみ蜼酘ね、帋ら貀か鏋薴げ攓そいあしい、そにグまる、し。はしオしあ |
This file contains hidden or 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
| スーパーマン! | |
| ANGELO: | |
| 何も私達、男 | |
| そしてwhesteed BEONに私の心を泣きます、 | |
| 今、我々はできる男のrepabelyに答える取るためには、 | |
| deible pluptory助言selderをRefect、あなた | |
| injurateのアードンの私の患者のmildlessに来ます、 | |
| 友人、父:私は彼女たちのjoubtを行進します!あなたの良いです | |
| あなたの王!災いは、このかのようeveries? |