小编rou*_*uk1的帖子

在亚马逊lambda中使用moviepy,scipy和numpy

我想使用AWS Lambda功能生成视频.

我按照这里这里的说明进行了操作.

我现在有以下过程来构建我的Lambda函数:

步骤1

触发一个Amazon Linux EC2实例并以root身份运行它:

#! /usr/bin/env bash

# Install the SciPy stack on Amazon Linux and prepare it for AWS Lambda

yum -y update
yum -y groupinstall "Development Tools"
yum -y install blas --enablerepo=epel
yum -y install lapack --enablerepo=epel
yum -y install atlas-sse3-devel --enablerepo=epel
yum -y install Cython --enablerepo=epel
yum -y install python27
yum -y install python27-numpy.x86_64
yum -y install python27-numpy-f2py.x86_64
yum -y install python27-scipy.x86_64

/usr/local/bin/pip …
Run Code Online (Sandbox Code Playgroud)

python numpy amazon-web-services aws-lambda

64
推荐指数
5
解决办法
3万
查看次数

由于OTA更新到Marshmallow,我的基于陀螺仪的应用程序不再起作用了

我用OTA将Nexus 5升级为Marshmallow.由于更新基于简单传感器的活动不再起作用.以下代码在其他设备上执行应该执行的操作(Galaxy S4 Lolipop,AVD,...)

有人也试过这个吗?我错过了什么吗?

这是代码:

的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "fr.rouk1.test"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?>
<manifest
    package="fr.rouk1"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-feature
        android:name="android.hardware.sensor.gyroscope"
        android:required="true"/>
    <uses-feature
        android:name="android.hardware.sensor.accelerometer"
        android:required="true"/>
    <uses-feature
        android:name="android.hardware.sensor.compass"
        android:required="true"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/> …
Run Code Online (Sandbox Code Playgroud)

android sensor android-6.0-marshmallow

5
推荐指数
1
解决办法
521
查看次数