From 83787029f8946d1c857ef008d4dab5bf72eb0ec3 Mon Sep 17 00:00:00 2001 From: Huey <2386089024@qq.com> Date: Wed, 26 Jun 2024 14:34:52 +0800 Subject: [PATCH] first --- README.md | 3 +- python_server/.idea/.gitignore | 8 + .../inspectionProfiles/Project_Default.xml | 14 + .../inspectionProfiles/profiles_settings.xml | 6 + python_server/.idea/misc.xml | 7 + python_server/.idea/modules.xml | 8 + python_server/.idea/pythonProject3.iml | 8 + python_server/__pycache__/util.cpython-39.pyc | Bin 0 -> 5223 bytes .../data/053b975f2205420cabbc40a577066581.csv | 362 +++ .../data/11df2427ebb74fd99781d3e15a55073e.csv | 177 ++ .../data/1d663f5fb57c4bffa9818ea3de429e97.csv | 403 ++++ .../data/244a8dfb681e4f67a4f743e91fcdfeaa.csv | 1611 ++++++++++++++ .../data/37e9e5cf910a4c78898edaa68cc0176f.csv | 177 ++ .../data/48416342d6164c568dd16259f9f14d89.csv | 486 ++++ .../data/5471179e38304c7485509b7251a3ee73.csv | 177 ++ .../data/6e0fd16e37844006bc9a31bfbcc103bb.csv | 1236 +++++++++++ .../data/8d8f5477461a45c1943264c2403775bd.csv | 453 ++++ .../data/aa91ae92831a4fa39c3042cb6edda7f0.csv | 1960 +++++++++++++++++ .../data/ae7991fba9d84dcaba54f830d73ff565.csv | 574 +++++ .../data/f16c279a5022418986e8d136ce67f2a7.csv | 177 ++ python_server/login.csv | 16 + python_server/sensor_data.csv | 2 + python_server/server.py | 52 + python_server/util.py | 207 ++ shengwutanzhen/.gitignore | 15 + shengwutanzhen/app/.gitignore | 1 + shengwutanzhen/app/build.gradle | 40 + shengwutanzhen/app/proguard-rules.pro | 21 + shengwutanzhen/build.gradle | 4 + shengwutanzhen/gradle.properties | 21 + shengwutanzhen/gradlew | 185 ++ shengwutanzhen/gradlew.bat | 89 + shengwutanzhen/settings.gradle | 17 + 33 files changed, 8515 insertions(+), 2 deletions(-) create mode 100644 python_server/.idea/.gitignore create mode 100644 python_server/.idea/inspectionProfiles/Project_Default.xml create mode 100644 python_server/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 python_server/.idea/misc.xml create mode 100644 python_server/.idea/modules.xml create mode 100644 python_server/.idea/pythonProject3.iml create mode 100644 python_server/__pycache__/util.cpython-39.pyc create mode 100644 python_server/data/053b975f2205420cabbc40a577066581.csv create mode 100644 python_server/data/11df2427ebb74fd99781d3e15a55073e.csv create mode 100644 python_server/data/1d663f5fb57c4bffa9818ea3de429e97.csv create mode 100644 python_server/data/244a8dfb681e4f67a4f743e91fcdfeaa.csv create mode 100644 python_server/data/37e9e5cf910a4c78898edaa68cc0176f.csv create mode 100644 python_server/data/48416342d6164c568dd16259f9f14d89.csv create mode 100644 python_server/data/5471179e38304c7485509b7251a3ee73.csv create mode 100644 python_server/data/6e0fd16e37844006bc9a31bfbcc103bb.csv create mode 100644 python_server/data/8d8f5477461a45c1943264c2403775bd.csv create mode 100644 python_server/data/aa91ae92831a4fa39c3042cb6edda7f0.csv create mode 100644 python_server/data/ae7991fba9d84dcaba54f830d73ff565.csv create mode 100644 python_server/data/f16c279a5022418986e8d136ce67f2a7.csv create mode 100644 python_server/login.csv create mode 100644 python_server/sensor_data.csv create mode 100644 python_server/server.py create mode 100644 python_server/util.py create mode 100644 shengwutanzhen/.gitignore create mode 100644 shengwutanzhen/app/.gitignore create mode 100644 shengwutanzhen/app/build.gradle create mode 100644 shengwutanzhen/app/proguard-rules.pro create mode 100644 shengwutanzhen/build.gradle create mode 100644 shengwutanzhen/gradle.properties create mode 100644 shengwutanzhen/gradlew create mode 100644 shengwutanzhen/gradlew.bat create mode 100644 shengwutanzhen/settings.gradle diff --git a/README.md b/README.md index 80344d4..75dfcec 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -shengwutanzhen项目是安卓项目,可以进行手机传感器数据以及屏幕点击数据的采集,python_server为接收并且保存数据的Python服务器 -yxy \ No newline at end of file +shengwutanzhen项目是安卓项目,可以进行手机传感器数据以及屏幕点击数据的采集,python_server为接收并且保存数据的Python服务器 \ No newline at end of file diff --git a/python_server/.idea/.gitignore b/python_server/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/python_server/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/python_server/.idea/inspectionProfiles/Project_Default.xml b/python_server/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..e87177d --- /dev/null +++ b/python_server/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/python_server/.idea/inspectionProfiles/profiles_settings.xml b/python_server/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/python_server/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/python_server/.idea/misc.xml b/python_server/.idea/misc.xml new file mode 100644 index 0000000..812ab5a --- /dev/null +++ b/python_server/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/python_server/.idea/modules.xml b/python_server/.idea/modules.xml new file mode 100644 index 0000000..1fb3c8b --- /dev/null +++ b/python_server/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/python_server/.idea/pythonProject3.iml b/python_server/.idea/pythonProject3.iml new file mode 100644 index 0000000..8388dbc --- /dev/null +++ b/python_server/.idea/pythonProject3.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/python_server/__pycache__/util.cpython-39.pyc b/python_server/__pycache__/util.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9fd9fc9ddd01bf740371cfa57a57ffb804df0a8b GIT binary patch literal 5223 zcmcIo&2J<}6|d^A>G`xh_U_u71vU!~nS@>C0})tOP6(U8fmk7qh_|)Tq&?Lh&w9RG z-4lPPT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if mag_keys[mag_i] < margin_left: + mag_i += 1 + elif margin_left <= mag_keys[mag_i] and mag_keys[mag_i] <= margin_right: + mag.append(map_mag[mag_keys[mag_i]]) + # print(ac_keys[ac_i], gy_keys[gy_i]) + ac_i += 1 + mag_i += 1 + elif mag_keys[mag_i] > margin_right: + ac_i += 1 + + return ac, gy, mag + + +def getMapXX(xx, xxTime): + map_xx = {} + j = 0 + row = [0, 1, 2] + for i, x in zip(range(len(xx)), xx): + if i % 3 == 0: + row[0] = x + if i % 3 == 1: + row[1] = x + if i % 3 == 2: + row[2] = x + + if i % 3 == 2: + map_xx[xxTime[j]] = row.copy() + j += 1 + + return map_xx + + +def getError(l, n, a): + gap_sum = 0 + bef = l[0] + for g in l[1:n]: + gap_sum += (g - bef) + bef = g + error = gap_sum / (n - 1) * a + return error diff --git a/shengwutanzhen/.gitignore b/shengwutanzhen/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/shengwutanzhen/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/shengwutanzhen/app/.gitignore b/shengwutanzhen/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/shengwutanzhen/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/shengwutanzhen/app/build.gradle b/shengwutanzhen/app/build.gradle new file mode 100644 index 0000000..9d58666 --- /dev/null +++ b/shengwutanzhen/app/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.shengwutanzhen' + compileSdk 33 + + defaultConfig { + applicationId "com.example.shengwutanzhen" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.8.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + implementation 'com.google.code.gson:gson:2.8.8' +} \ No newline at end of file diff --git a/shengwutanzhen/app/proguard-rules.pro b/shengwutanzhen/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/shengwutanzhen/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/shengwutanzhen/build.gradle b/shengwutanzhen/build.gradle new file mode 100644 index 0000000..7117073 --- /dev/null +++ b/shengwutanzhen/build.gradle @@ -0,0 +1,4 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { +id 'com.android.application' version '8.1.0' apply false +} \ No newline at end of file diff --git a/shengwutanzhen/gradle.properties b/shengwutanzhen/gradle.properties new file mode 100644 index 0000000..3e927b1 --- /dev/null +++ b/shengwutanzhen/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/shengwutanzhen/gradlew b/shengwutanzhen/gradlew new file mode 100644 index 0000000..4f906e0 --- /dev/null +++ b/shengwutanzhen/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/shengwutanzhen/gradlew.bat b/shengwutanzhen/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/shengwutanzhen/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/shengwutanzhen/settings.gradle b/shengwutanzhen/settings.gradle new file mode 100644 index 0000000..202b76b --- /dev/null +++ b/shengwutanzhen/settings.gradle @@ -0,0 +1,17 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "shengwutanzhen" +include ':app'