Skip to content

Instantly share code, notes, and snippets.

@phpmind
phpmind / cognito.py
Created April 22, 2020 17:10 — forked from bjinwright/cognito.py
Example of how to make an authorized call to API Gateway using Boto3, Requests, and AWS4Auth. http://stackoverflow.com/questions/37336286/how-do-i-call-an-api-gateway-with-cognito-credentials-in-python
import boto3
import datetime
import json
from requests_aws4auth import AWS4Auth
import requests
boto3.setup_default_session(region_name='us-east-1')
identity = boto3.client('cognito-identity', region_name='us-east-1')
account_id='XXXXXXXXXXXXXXX'
@phpmind
phpmind / introrx.md
Created December 27, 2018 05:07 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@phpmind
phpmind / install_caffe2_detectron.sh
Created September 4, 2018 05:54 — forked from matsui528/install_caffe2_detectron.sh
Install script of caffe2 and detectron on AWS EC2 instance with Deep Learning Base AMI
# Install script of Caffe2 and Detectron on AWS EC2
#
# Tested environment:
# - AMI: Deep Learning Base AMI (Ubuntu) Version 6.0 - ami-ce3673b6 (CUDA is already installed)
# - Instance: p3.2xlarge (V100 * 1)
# - Caffe2: https://github.com/pytorch/pytorch/commit/731273b8d61dfa2aa8b2909f27c8810ede103952
# - Detectron: https://github.com/facebookresearch/Detectron/commit/cd447c77c96f5752d6b37761d30bbdacc86989a2
#
# Usage:
# Launch a fresh EC2 instance, put this script on the /home/ubuntu/, and run the following command.
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@phpmind
phpmind / keras_pydata_warsaw_jan2017.ipynb
Created May 26, 2017 21:49 — forked from stared/keras_pydata_warsaw_jan2017.ipynb
First steps in deep learning with Keras @ PyData Warsaw Meetup (12 Jan 2017)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phpmind
phpmind / cygwin-mirror-speed.py
Created March 24, 2017 19:35 — forked from ushkinaz/cygwin-mirror-speed.py
Tests speed of http mirrors of cygwin
#!/usr/bin/env python3
"""
Tests http mirrors of cygwin
"""
import random
import time
from urllib.request import urlopen
import sys
__author__ = 'Dmitry Sidorenko'
@phpmind
phpmind / install-tf-gpu-linux-and-test
Created December 13, 2016 04:23 — forked from oplatek/install-tf-gpu-linux-and-test
Installing Tensorflow 0.8 for GPU on Linux and test if GPU is used supported Python2.7 and 3.4
#!/bin/bash
[ -z $1 ] && python=3.4
if [ $(whoami) = root ] ; then
user=''
else
echo Not running under sudo. pip install --user
user='--user'
fi
if [ $python = '2.7' ] ; then

Before you start

Make sure you have python, OpenFace and dlib installed. You can either install them manually or use a preconfigured docker image that has everying already installed:

docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
cd /root/openface