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
const AWS = require('aws-sdk'); | |
const Busboy = require('busboy'); | |
const BUCKET_NAME = ''; | |
const IAM_USER_KEY = ''; | |
const IAM_USER_SECRET = ''; | |
function uploadToS3(file) { | |
let s3bucket = new AWS.S3({ | |
accessKeyId: IAM_USER_KEY, |
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
<?php | |
$BUCKET_NAME = ''; | |
$IAM_KEY = ''; | |
$IAM_SECRET = ''; | |
require '/vendor/autoload.php'; | |
use Aws\S3\S3Client; | |
use Aws\S3\Exception\S3Exception; | |
// Get the access 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
<?php | |
// You need to install the sendgrid client library so run: composer require sendgrid/sendgrid | |
require '/vendor/autoload.php'; | |
// contains a variable called: $API_KEY that is the API Key. | |
// You need this API_KEY created on the Sendgrid website. | |
include_once('./credentials.php'); | |
$FROM_EMAIL = 'YOUR_EMAIL'; | |
// they dont like when it comes from @gmail, prefers business emails |
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
<?php | |
// This file demonstrates file upload to an S3 bucket. This is for using file upload via a | |
// file compared to just having the link. If you are doing it via link, refer to this: | |
// https://gist.github.com/keithweaver/08c1ab13b0cc47d0b8528f4bc318b49a | |
// | |
// You must setup your bucket to have the proper permissions. To learn how to do this | |
// refer to: | |
// https://github.com/keithweaver/python-aws-s3 | |
// https://www.youtube.com/watch?v=v33Kl-Kx30o | |
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
<?php | |
// This file demonstrates file upload to an S3 bucket. This is for using file upload via a | |
// link compared to actually having the image file content. If you are doing it via image | |
// file upload, like getting the file from $_FILE, refer to this: | |
// https://gist.github.com/keithweaver/70eb06d98b008113ce97f6148fbea83d | |
// | |
// You must setup your bucket to have the proper permissions. To learn how to do this | |
// refer to: | |
// https://github.com/keithweaver/python-aws-s3 | |
// https://www.youtube.com/watch?v=v33Kl-Kx30o |
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
# Running: | |
# $ python run-custom-cascade.py | |
# Import OpenCV | |
import cv2 | |
# Image file | |
IMAGE_FILE = './example.png' # Change this to be your image | |
# Cascade file |
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
<?php | |
// Install using composer and run: $ composer require kweaver00/lumberjack_php dev-master | |
require_once "/vendor/autoload.php"; | |
$lumberjack = new \Kweaver\Lumberjack\Lumberjack(); | |
$lumberjack->setAppKey("YOUR_APP_KEY"); | |
$lumberjack->setAPIKey("YOUR_API_CODE"); | |
$lumberjack->log("TAG","Content goes here.", "Verbose"); | |
// Title, Content, Level of importance |
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
# This file will find keywords in the file name to assign tags for the | |
# Cascade Market. Add keywords to the image file name in the following | |
# format "..._keyword_keyword2.jpg". This is explained more below. | |
# | |
# | |
# Tips: | |
# - Keep it consistent. I made the mistake of labeling a mix of longboard and | |
# longboarder to represent the same thing. As a result, when I train I have | |
# to make sure the other is not in the negative set or it will affect my | |
# cascade. |
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
''' | |
Using OpenCV takes a mp4 video and produces a number of images. | |
Requirements | |
---- | |
You require OpenCV 3.2 to be installed. | |
Run | |
---- | |
Open the main.py and edit the path to the video. Then run: |
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
<?php | |
// Installed the need packages with Composer by running: | |
// $ composer require aws/aws-sdk-php | |
$filePath = "https://example.com/test.png"; | |
require 'vendor/autoload.php'; | |
$bucketName = 'YOUR_BUCKET_NAME'; | |
$filePath = './YOUR_FILE_NAME.png'; |