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
| @echo off | |
| @RD /S /Q dist\ | |
| python setup.py sdist | |
| python setup.py bdist_wheel | |
| SET /P username=Enter PyPI username: | |
| SET /P password=Enter PyPI password: | |
| @echo [distutils] > .pypirc | |
| @echo index-servers=pypi >> .pypirc | |
| @echo [pypi] >> .pypirc | |
| @echo repository = https://upload.pypi.org/legacy/ >> .pypirc |
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
| #!/bin/sh | |
| cd ~/workspace/python/notebooks | |
| ARG=$1 | |
| if [ "$ARG" == "--pdf" ] | |
| then | |
| find . -type f -name "*.ipynb" -exec jupyter nbconvert --to pdf {} | |
| else |
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
| #!/bin/sh | |
| if [ "$1" == "-r" ] | |
| then | |
| LANG=R | |
| shift | |
| else | |
| LANG=python | |
| fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
| -D CMAKE_INSTALL_PREFIX=/usr/local \ | |
| -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ | |
| -D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6m/config-3.6m-darwin/libpython3.6.dylib \ | |
| -D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m/ \ | |
| -D PYTHON3_EXECUTABLE=$VIRTUAL_ENV/bin/python \ | |
| -D BUILD_opencv_python2=OFF \ | |
| -D BUILD_opencv_python3=ON \ | |
| -D INSTALL_PYTHON_EXAMPLES=ON \ | |
| -D INSTALL_C_EXAMPLES=OFF \ |
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
| # Some more code above | |
| val = 6 | |
| value = f"{val}" | |
| # some more code |
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
| from boxx import timeit | |
| with timeit(name="f-strings"): | |
| for i in range(500_000): | |
| x = 6 | |
| f"{x}" | |
| with timeit(name="str"): | |
| for i in range(500_000): |
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 dis | |
| def f_string(number: int): | |
| return f"{number}" | |
| def str_string(number: int): | |
| return str(number) |
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
| """ | |
| Tool. | |
| Example tool. | |
| """ | |
| __version__ = "1.2.3" |
OlderNewer