Skip to content

Instantly share code, notes, and snippets.

✌️
Happy coding!

Alex Casalboni alexcasalboni

✌️
Happy coding!
Block or report user

Report or block alexcasalboni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexcasalboni
alexcasalboni / google.py
Last active Jan 4, 2017
Google Prediction API - Train a classification model and generate a new Prediction
View google.py
import httplib2, argparse, os, sys, json
from oauth2client import tools, file, client
from oauth2client.service_account import ServiceAccountCredentials
from googleapiclient import discovery
from googleapiclient.errors import HttpError
#Project and model configuration
project_id = '132567073760'
model_id = 'HAR-model'
@alexcasalboni
alexcasalboni / README.md
Last active Jan 21, 2017
Google Vision API Examples - LABEL DETECTION
View README.md
@alexcasalboni
alexcasalboni / requirements.txt
Last active Jun 29, 2017
Let's build a scikit-learn model
View requirements.txt
sklearn
numpy
scipy
matplotlib
pandas
@alexcasalboni
alexcasalboni / tweets.json
Last active Jul 4, 2017
Serverless Highlights of 2017 - 1/2
View tweets.json
[
"https://twitter.com//goserverless/status/879729046568882177",
"https://twitter.com//zdne/status/879726263417663490",
"https://twitter.com//jeffconf/status/879722357899894785",
"https://twitter.com//AzureFunctions/status/879458907453767680",
"https://twitter.com//adampash/status/877549817471279105",
"https://twitter.com//MongoDB/status/877186132404031488",
"https://twitter.com//alex_casalboni/status/875866754177748993",
"https://twitter.com//gmolto/status/872691887936811008",
"https://twitter.com//jeffconf/status/872451904642703360",
@alexcasalboni
alexcasalboni / ml.py
Created Jul 21, 2017
AmazonML Lab updated code
View ml.py
import boto3
from boto3.session import Session
session = Session(aws_access_key_id='AWS_ACCESS_KEY_ID', aws_secret_access_key='AWS_SECRET_ACCESS_KEY')
machinelearning = session.client('machinelearning', region_name='us-east-1')
labels = {'1': 'walking', '2': 'walking upstairs', '3': 'walking downstairs', '4': 'sitting', '5': 'standing', '6': 'laying'}
# fill your model ID and Endpoint here!
model_id = 'MODEL_ID'
prediction_endpoint = 'MODEL_ENDPOINT'
@alexcasalboni
alexcasalboni / boto3_getpolicy.py
Last active Aug 20, 2017
AWS IAM Policy body with Python and boto3
View boto3_getpolicy.py
import boto3
iam = boto3.resource('iam')
def get_policy_body(arn, version_id=None):
""" Return IAM Policy JSON body """
if version_id:
version = iam.PolicyVersion(arn, version_id)
else:
policy = iam.Policy(arn)
@alexcasalboni
alexcasalboni / README.md
Created Aug 2, 2016 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

View dyslexia.js
// original: http://geon.github.io/programming/2016/03/03/dsxyliea
"use strict";
$(function(){
var getTextNodesIn = function(el) {
return $(el).find(":not(iframe)").addBack().contents().filter(function() {
return this.nodeType == 3;
});
};
@alexcasalboni
alexcasalboni / 0-README.md
Last active May 31, 2018
AWS Lambda: Advanced Coding Session - clda.co/aws-lambda-webinar
View 0-README.md

AWS Lambda: Advanced Coding Session (slides)

Live demos:

  1. Amazon API Gateway Access Control
  2. Amazon Kinesis Streams processing
  3. Amazon Cognito Sync trigger
  4. AWS CloudFormation Custom Resources
@alexcasalboni
alexcasalboni / aws-lambda-demo1-restful-api.py
Last active Jun 5, 2018
AWS Lambda Coding Session - clda.co/webinar-lambda
View aws-lambda-demo1-restful-api.py
def lambda_handler(event, context):
name = event.get('name') or 'World'
print("Name: %s" % name)
return "Hello %s!" % name
You can’t perform that action at this time.