Skip to content

Instantly share code, notes, and snippets.

View DahlitzFlorian's full-sized avatar
🎯
Focused

Florian Dahlitz DahlitzFlorian

🎯
Focused
View GitHub Profile
@DahlitzFlorian
DahlitzFlorian / automate_pypi_publishing.cmd
Last active April 23, 2017 16:27
Automates PyPI-publishing based on setup.py and user input while running file
@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
#!/bin/sh
cd ~/workspace/python/notebooks
ARG=$1
if [ "$ARG" == "--pdf" ]
then
find . -type f -name "*.ipynb" -exec jupyter nbconvert --to pdf {}
else
#!/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.
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 \
# Some more code above
val = 6
value = f"{val}"
# some more code
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):
import dis
def f_string(number: int):
return f"{number}"
def str_string(number: int):
return str(number)
"""
Tool.
Example tool.
"""
__version__ = "1.2.3"