Skip to content

Instantly share code, notes, and snippets.

View SeptiyanAndika's full-sized avatar
🏠
Working from home

Septiyan Andika SeptiyanAndika

🏠
Working from home
View GitHub Profile
@SeptiyanAndika
SeptiyanAndika / redis_migrate.py
Created December 3, 2018 10:26 — forked from josegonzalez/redis_migrate.py
A simple script to migrate all keys from one Redis to another
#!/usr/bin/env python
import argparse
import redis
def connect_redis(conn_dict):
conn = redis.StrictRedis(host=conn_dict['host'],
port=conn_dict['port'],
db=conn_dict['db'])
return conn
exports.handler = (event, context, callback) => {
var AWS = require('aws-sdk');
var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
console.log(event);
if (event.request.userAttributes.hasOwnProperty("email")) {
package main
import (
"fmt"
"reflect"
)
type CurrencySchema struct {
Code string
Name string
package main
import (
"fmt"
"reflect"
)
type CurrencySchema struct {
Code string
Name string
Type string
package main
import (
"fmt"
"reflect"
)
type CurrencySchema struct {
Code string
Name string
Type string
const AWS = require('aws-sdk');
var params = {
IdentityPoolId: "ap-southeast-1:xxxx"
};
AWS.config.region = 'ap-southeast-1';
AWS.config.credentials = new AWS.CognitoIdentityCredentials(params);
var lambda = new AWS.Lambda();
lambda.invoke({
pragma solidity ^0.4.22;
contract Hackathon{
address public owner;
enum Status {PENDING,APPROVED,REJECTED}
string public request_id;
string public owner_public_key;
string public requestor_public_key;
Status public status;
gem install mysql2 -- \
--with-mysql-config=/Applications/XAMPP/xamppfiles/bin/mysql_config \
--with-mysql-dir=/Applications/XAMPP/xamppfiles/mysql/ \
--with-mysql-lib=/Applications/XAMPP/xamppfiles/lib/mysql/ \
--with-mysql-include=/Applications/XAMPP/xamppfiles/include/ \
--no-ri --no-rdoc
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.6/bin/pg_config
from __future__ import print_function
import boto3
from decimal import Decimal
import json
import urllib
print('Loading function')
rekognition = boto3.client('rekognition')
@SeptiyanAndika
SeptiyanAndika / amazon-rekognition.md
Created July 7, 2018 08:26 — forked from alexcasalboni/amazon-rekognition.md
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search