./CMakeLists.txt
cmake_minimum_required(VERSION 3.17)
include(GenerateExportHeader)
project(MyDLL)
set(LIB_SRCS dllmain.cpp)
SET (LIB_TYPE SHARED)
add_library(MyDLL ${LIB_TYPE} ${LIB_SRCS})
GENERATE_EXPORT_HEADER(MyDLL)
ENABLE_TESTING()
./CMakeLists.txt
cmake_minimum_required(VERSION 3.17)
include(GenerateExportHeader)
project(MyDLL)
set(LIB_SRCS dllmain.cpp)
SET (LIB_TYPE SHARED)
add_library(MyDLL ${LIB_TYPE} ${LIB_SRCS})
GENERATE_EXPORT_HEADER(MyDLL)
ENABLE_TESTING()
| # Valid image shapes: (H, W), (H, W, 1) for grey-scale images and (H, W, 3) for | |
| # color images. For info about the interpolation order, see the | |
| # [skimage docs](https://goo.gl/vGE6dv). Setting `fmt='jpeg'` might come in | |
| # handy in case of large images. Example Output: https://i.stack.imgur.com/nb2vG.png | |
| import numpy as np | |
| from io import BytesIO | |
| from base64 import b64encode | |
| import PIL.Image, IPython.display | |
| from skimage import transform |
| # Simple Google Drive backup script with automatic authentication | |
| # for Google Colaboratory (Python 3) | |
| # Instructions: | |
| # 1. Run this cell and authenticate via the link and text box. | |
| # 2. Copy the JSON output below this cell into the `mycreds_file_contents` | |
| # variable. Authentication will occur automatically from now on. | |
| # 3. Create a new folder in Google Drive and copy the ID of this folder | |
| # from the URL bar to the `folder_id` variable. | |
| # 4. Specify the directory to be backed up in `dir_to_backup`. |
| # Usage: speeduptv-upload [video_file] | |
| # The device name of the phone can be found via `nslookup IP_OF_YOUR_PHONE`. | |
| # SpeedUpTV needs to stay active throughout the upload and sometimes it is | |
| # necessary to restart SpeedUpTV after a failed upload. | |
| # This function can for example be added to ~/.profile (BASH) or ~/.zprofile (ZSH). | |
| speeduptv-upload () { | |
| IPHONE_NAME="iPhone-6s" | |
| curl -o /dev/null -F "Filename=\"$1\"" -F "Filedata=@\"$1\"\;filename=\"$1\"" -o output http://${IPHONE_NAME}.${$(hostname)#*.}:8080 | |
| } |