INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
| image: openjdk:8-jdk | |
| variables: | |
| ANDROID_COMPILE_SDK: "29" | |
| ANDROID_BUILD_TOOLS: "29.0.3" | |
| SDK_TOOLS: "6200805" # from https://developer.android.com/studio/#command-tools | |
| EMULATOR_VERSION: "24" | |
| before_script: | |
| - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${SDK_TOOLS}_latest.zip |
| """ | |
| Sometimes in your Django model you want to raise a ``ValidationError`` in the ``save`` method, for | |
| some reason. | |
| This exception is not managed by Django Rest Framework because it occurs after its validation | |
| process. So at the end, you'll have a 500. | |
| Correcting this is as simple as overriding the exception handler, by converting the Django | |
| ``ValidationError`` to a DRF one. | |
| """ | |
| from django.core.exceptions import ValidationError as DjangoValidationError |
| #!/bin/bash -i | |
| #using shebang with -i to enable interactive mode (auto load .bashrc) | |
| set -e #stop immediately if any error happens | |
| # Install Open SDK | |
| apt update | |
| apt install openjdk-8-jdk -y | |
| update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
| java -version |
| /** | |
| * Filters an array of objects using custom predicates. | |
| * | |
| * @param {Array} array: the array to filter | |
| * @param {Object} filters: an object with the filter criteria | |
| * @return {Array} | |
| */ | |
| function filterArray(array, filters) { | |
| const filterKeys = Object.keys(filters); | |
| return array.filter(item => { |
| import signal | |
| import sys | |
| import asyncio | |
| import aiohttp | |
| import json | |
| loop = asyncio.get_event_loop() | |
| client = aiohttp.ClientSession(loop=loop) | |
| async def get_json(client, url): |
| git clone https://github.com/fastai/fastai | |
| cd fastai | |
| conda create -n fastai python=3.6 anaconda | |
| conda env update | |
| # bash include source | |
| # windows no source |