How to use packages that depend on Node.js core modules in React Native.
See the [node-libs-react-native][node-libs-react-native] library as a convenience for implementing this method.
| #!/usr/bin/env python | |
| import cv2 | |
| import sys | |
| def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color): | |
| """Draw bounding boxes on an image. | |
| imageData: image data in numpy array format | |
| imageOutputPath: output image file path | |
| inferenceResults: inference results array off object (l,t,w,h) | |
| colorMap: Bounding box color candidates, list of RGB tuples. |
| #!/usr/bin/python | |
| import boto3 | |
| from contextlib import closing | |
| client = boto3.client('polly') | |
| response = client.synthesize_speech( | |
| OutputFormat='mp3', | |
| Text='Amazon Polly is a service that turns text into lifelike speech. Polly lets you create applications that talk, enabling you to build entirely new categories of speech-enabled products. Polly is an Amazon AI service that uses advanced deep learning technologies to synthesize speech that sounds like a human voice. Polly includes 47 lifelike voices spread across 24 languages, so you can select the ideal voice and build speech-enabled applications that work in many different countries.', |
| // | |
| // Generate EXIF GPS metadata | |
| // Swift 3 | |
| // Exif Version 2.2.0.0 supports decimal degrees | |
| import Foundation | |
| import CoreLocation | |
| import ImageIO | |
| extension CLLocation { |
Find the Discord channel in which you would like to send commits and other updates
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
| https://rfc3161.ai.moda | |
| https://rfc3161.ai.moda/adobe | |
| https://rfc3161.ai.moda/microsoft | |
| https://rfc3161.ai.moda/apple | |
| https://rfc3161.ai.moda/any | |
| http://rfc3161.ai.moda | |
| http://timestamp.digicert.com | |
| http://timestamp.globalsign.com/tsa/r6advanced1 | |
| http://rfc3161timestamp.globalsign.com/advanced | |
| http://timestamp.sectigo.com |
| #!/bin/sh | |
| # Make sure to: | |
| # 1) Name this file `backup.sh` and place it in /home/ubuntu | |
| # 2) Run sudo apt-get install awscli to install the AWSCLI | |
| # 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
| # 4) Fill in DB host + name | |
| # 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
| # 6) Run chmod +x backup.sh | |
| # 7) Test it out via ./backup.sh |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import java.io.Writer; | |
| import java.lang.ref.WeakReference; | |
| import java.util.ArrayList; | |
| import javax.microedition.khronos.egl.EGL10; | |
| import javax.microedition.khronos.egl.EGL11; | |
| import javax.microedition.khronos.egl.EGLConfig; | |
| import javax.microedition.khronos.egl.EGLContext; | |
| import javax.microedition.khronos.egl.EGLDisplay; | |
| import javax.microedition.khronos.egl.EGLSurface; | |
| import javax.microedition.khronos.opengles.GL; |